Monday, 28 March 2016

EXCEL:How to highlight cells based on length of text ?

With a simple LEN function in Conditional Formatting feature, you can quickly highlight the cells which text length in a certain characters.
1. Select the data range or the whole worksheet that you want to highlight the cells.
2. Click Home > Conditional Formatting > New Rule, see screenshot:
doc-highligh-by-text-length1
3. In the New Formatting Rule dialog, click Use a formula to determine which cells to format option, and then enter this formula =LEN(A1)>15 (A1 is the first cell which contains the value and >15 is the criteria that you want to base on, in this case is greater than 15 characters, you can change them as you need) into the Format values where this formula is true text box, see screenshot:
doc-highligh-by-text-length1
4. Then click Format button, and in the Format Cells dialog, choose one color you like under Fill tab, see screenshot:
doc-highligh-by-text-length1
5. Then click OK > OK to close the dialogs, and all the cells which character length is greater than 15 are highlighted with your selected color at once.
doc-highligh-by-text-length1
NoteConditional Formatting tool is a dynamic function, if you change the length of the text string, the color will be adjusted as well.


No comments:

Post a Comment