How to highlight cells based on length of text in Excel?
Supposing you are working with a worksheet which has list of text strings, and now, you want to highlight all the cells that the length of the text is greater than 15. This artical, I will talk about some methods for solving this task in Excel.
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 that you want to highlight the cells.
2. Click Home > Conditional Formatting > New Rule, see screenshot:
3. In the New Formatting Rule dialog, click Use a formula to determine which cells to format option, and then enter this formula =LEN(A2)>15 into the Format values where this formula is true text box, see screenshot:
Note: In the above formula, A2 is the first cell which contains the value, and >15 is the criteria that you want to highlight cells based on, in this case the text length is greater than 15 characters, you can change them as you need.
4. Then click Format button, and in the Format Cells dialog, choose one color you like under Fill tab, see screenshot:
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.
Note: The Conditional Formatting tool is a dynamic function, if you change the length of the text string, the color will be adjusted automatically as well.
If you have Kutools for Excel, with its Super Find function, you can quickly select the cells based on various criteria as you need.
After installing Kutools for Excel, please do as this:
1. Select the data range that you want to use, and then click Kutools > Find > Super Find, see screenshot:
2. In the opened Super Find pane, please do with the following operations:
3. After finishing the settings, click Select button, and all the cells meet the criteria you created have been selected, then you can format the selected cell as you need.
More relative articles:
- Highlight / conditional formatting cells with formulas in Excel
- Supposing you have a large worksheet which contains both constants and formulas, and now you want to know the location of all the formula cells. Of course, you can select all the formulas easily and quickly by using Go To Special function. But if your data or formulas need to be changed now and then, you must apply this function repeatedly.
- Highlight Duplicate Values In Different Colors In Excel
- In Excel, we can easily highlight the duplicate values in a column with one color by using the Conditional Formatting, but, sometimes, we need to highlight the duplicate values in different colors to recognize the duplicates quickly and easily as following screenshot shown. How could you solve this task in Excel?
- Highlight Rows Based On Drop Down List In Excel
- This article will talk about how to highlight rows based on drop down list, take the following screenshot for example, when I select “In Progress” from the drop down list in column E, I need to highlight this row with red color, when I select “Completed” from the drop down list, I need to highlight this row with blue color, and when I select “Not Started”, a green color will be used to highlight the row.
- Highlight The Cells Linked By Hyperlinks In Excel
- If there are some hyperlinks linked to the same worksheet or workbook, now, I need the destination cell of the clicked hyperlink to be filled in a color to stand out the linked cell, when another hyperlink is clicked, the first goes back to normal as below screenshot shown. Is this possible to be solved in Excel?
- Auto-Highlight Row And Column Of Active Cell In Excel
- When you view a large worksheet with numerous data, you may want to highlight the selected cell’ row and column so that you can easily and intuitively read the data to avoid misreading them. Here, I can introduce you some interesting tricks to highlight the row and column of the current cell, when the cell is changed, the column and row of the new cell are highlighted automatically.
You are guest
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 1 years agoHello , i need some help please. Is there a way to configurate a Cell to highlight after the 41st character? i would be able to write more than 40 characters...but there would be a highlight in the remaining text... Thanks for your help!
To post as a guest, your comment is unpublished.· 1 years agoHello , can someone help me , please ? I need to configurate a Cell in a way that if it has more than 40 characters , it would highlight starting on the 41st character ...:) any idea how? thank you!
To post as a guest, your comment is unpublished.· 2 years agoHi,
Please can you help me in highlighting the first 6 characters in the cell.
eg: In the below list, I would like to highlight ABC123, ABC234, ABC345
To post as a guest, your comment is unpublished.· 3 years agoIn the Dutch version of Office, LEN did not work, but LENGTE (Dutch for length) dit the trick...
Something similar might be the case for other languages as well.
To post as a guest, your comment is unpublished.· 3 years agoI tried to use the conditional formatting formula to highlight cells based on length of text, but am not getting the desired results. Here is my scenario: I have a spreadsheet and in one column, every entry consists of 5 "characters". Some of the entries contain 5 letters and some contain 4 letters with a "blank" space at the end. This blank space is being counted as a character. I'm trying to format to highlight all entries with 4 letters and a blank space. Is this possible? Thank you in advance.
To post as a guest, your comment is unpublished.· 3 years agoyou can use len(trim(cell containg value)) this will give you the exact count of characters in a cell then you can format the cell you see with different amount of characters.
To post as a guest, your comment is unpublished.· 3 years agoyou'll need to strip the string of its 'padding' spaces. Try a formula like =Len(Trim(A1))<>4