Written by Allen Wyatt (last updated February 21, 2026)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365
Bonnie has a worksheet that contains a large number of text values. She wonders if it is possible to use a conditional format to highlight cells that contain text that is longer than 25 characters. Due to restrictions at her company, she needs to do this without using a macro.
This is quite easy to do without a macro, but you do need to set up a conditional formatting rule that relies on a formula. Follow these steps:

Figure 1. The New Formatting Rule dialog box.
The formula you use in step 6 should reference the active cell in the range you selected in step 1. In this example, it assumes that the active cell is A1, but you should replace it with the cell that is appropriate for the cells you selected. In addition, you can modify the number of characters from 25 to whatever fits your needs.
If it is possible that some of the cells in the range could contain numeric values, then you may want the change the step 6 formula slightly:
=AND(ISTEXT(A1),LEN(A1)>25)
The formula checks that the cell contains text and its length. In this case, there are two references to cell A1 that should be modified to reflect the active cell in the cell range you selected.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13460) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.
Best-Selling VBA Tutorial for Beginners Take your Excel knowledge to the next level. With a little background in VBA programming, you can go well beyond basic spreadsheets and functions. Use macros to reduce errors, save time, and integrate with other Microsoft applications. Fully updated for the latest version of Office 365. Check out Microsoft 365 Excel VBA Programming For Dummies today!
If you want to get rid of conditional formatting rules, but retain any formatting that was applied by those rules, then ...
Discover MoreSetting up conditional formatting can be challenging under some circumstances, but once set it can work great. Unless, of ...
Discover MoreWhen preparing a report for others to use, it is not unusual to add a horizontal line between major sections of the ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2026 Sharon Parq Associates, Inc.
Comments