Please click here if you are not redirected within a few seconds.

Tip: Other languages are Google-Translated. You can visit the English version of this link.

Log in

x

or



x


x


Register

x


or



  • Office Tips & Tricks
  • Tips & Tricks for Excel
    • Tips & Tricks in German Language
    • Tips & Tricks in French Language
    • Tips & Tricks in Chinese (Simplified)
    • Tips & Tricks in Chinese (Traditional)
  • Tips & Tricks for Word
  • Tips & Tricks for Outlook
0
0
0
s2smodern

How to highlight cells based on length of text in Excel?

Supposing you are working with a worksheet which has list of text content, and now, you want to highlight all the cells that the length of the text is greater than 15. In Excel, there is no direct way for you to highlight the cells, but you can apply the Conditional Formatting function along with a formula to solve it.

Highlight cells based on length of text in Excel

Recommended Productivity Tools

Office Tab: Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer. Try now

Kutools for Excel: 200 new features for Excel, make Excel much easy and powerful, increase productivity immediately. Try now


arrow blue right bubble Highlight cells based on length of text in Excel

Hot
excel-tab-banner-2014-12-02

Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

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

Note: Conditional Formatting tool is a dynamic function, if you change the length of the text string, the color will be adjusted as well.


Related articles:

How to highlight / conditional formatting cells with formulas in Excel?

How to highlight odd or even numbers in Excel?

How to highlight all error cells in Excel?

How to highlight all named ranges in Excel?

How to highlight cells with external links in Excel?

How to highlight all subtotal rows at once in Excel?


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don’t need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools…

Screen shot of Kutools for Excel

btn read more       btn download     btn purchase


  • 4 Comments

  • RSS
  • Login

  • Sort by Newest

    • Best
    • Popular
    • Newest
    • Oldest
You are guest
( Sign Up? )
or post as a guest, but your post won’t be published automatically.




Loading comment…


The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.

    Herman Acker


    ·

    6 months ago

    In 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.

    • Reply

    • Share

  • To post as a guest, your comment is unpublished.

    Lori


    ·

    1 years ago

    I 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.
    • Reply

    • Share

    • To post as a guest, your comment is unpublished.

      KZ


      ·

      8 months ago

      you 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.
      • Reply

      • Share

    • To post as a guest, your comment is unpublished.

      radgar


      ·

      9 months ago

      you’ll need to strip the string of its ‘padding’ spaces. Try a formula like =Len(Trim(A1))<>4
      • Reply

      • Share