Excel: Combine text and formulas in a cell
When I analyze data in Excel, I format the spreadsheet to make it easier to read. A little attention to fonts, boxes and shading can help people understand the data faster.
One way to give yourself flexibility with formatting is to combine text and the results of a formula in a single cell. Use the “&” operator to concatenate the text and the formula.
Consider this formula:
Enter it into a cell, press enter and (assuming you have numeric values in cells A1 through A20) it will present this result in a single cell:
That kind of output’s pretty handy when you want to create a worksheet in your spreadsheet that aggregates data from other sheets while keeping the formatting simple.
Anthony DeBarros is the author of Practical SQL: A Beginner’s Guide to Storytelling with Data from No Starch Press.