Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Maintaining Text Formatting in a Lookup.
by Allen Wyatt
(last updated January 25, 2014)
When you enter text into a worksheet, you can format that text in either of two ways: You can format all the text in the cell, or you can format just some of the text in the cell. Formatting all the text should be familiar to all readers, as it is quite common to make the contents of a cell bold or change its font.
Formatting some of the text within a cell may not be done as often, but it is just as easy to do as formatting the entire cell. All you need to do is, while editing the cell contents, select the text you want to format and then apply the desired formatting properties. For instance, you could make some portion of the text bold or some of it underlined. You can also change the font used by certain characters in a cell, which is often done to insert symbols in a cell or to use foreign-language characters within your regular text.
While formatting can make your information more understandable, and may in fact be required for your particular worksheet, there are some drawbacks. One of the biggest drawbacks is when you use formulaic references to the formatted text. Excel will only copy the bare contents of the referenced cell, not the formatting applied to text within that cell.
As an example, suppose you have a cell that contains Greek letters interspersed within the text of a cell, and you reference that cell in a formula such as the following:
Excel dutifully copies the contents of the cell, returning as the results of the formula, but it does not copy the formatting of the cell being referenced. This behavior is not limited to lookup functions, either; Excel behaves this way even with simple formulas, such as =B7.
There is no way around this drawback, short of writing a rather complicated macro that copies formats as well as content. Macros that copy cell formatting have been covered in past issues of ExcelTips; macros that copy individual character formatting within a cell are complex enough that they are beyond the scope of ExcelTips itself.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8107) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Maintaining Text Formatting in a Lookup.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
What are you to do if you are trying to format a worksheet, only to find out that one of the tools you need is not available? ...Discover More
It's easy to automatically set the contents of one cell to be equal to another cell. But what if you want to copy the ...Discover More
Want to draw attention to some information in a particular cell? Make the cell flash, on and off. Here's how you can ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.