Bill has a large worksheet in which he would like to locate and highlight all the cells that contain static values. He wonders if there is an easy way to fill all those cells with yellow.
There are actually two easy ways, and the method you choose should depend on how you work with data in your worksheet.
The first method is great for data that doesn't change too much. Follow these steps:

Figure 1. The Go To dialog box.

Figure 2. The Go To Special dialog box.
If your data is more dynamic in nature and you want the fill color updated automatically, then you can create a conditional formatting rule to handle the highlighting. Follow these steps:

Figure 3. The New Formatting Rule dialog box.

Figure 4. Use a Formula to Determine Which Cells to Format.
=AND(NOT(ISFORMULA(A1)),NOT(ISBLANK(A1)))
The rule you specified in step 7 results in all non-blank cells that contain constants being highlighted. As your data changes in the worksheet, then the highlighted cells change as well.
Note that this conditional formatting approach will work just fine if you are using Excel 2013 or later, when the ISFORMULA function was introduced. If you are using an earlier version of Excel, then you will need to create a macro that returns TRUE if a cell contains a constant and then reference that function in the formula in step 7.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10509) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Excel in Microsoft 365.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!
You can shade your cells by filling them with a pattern. Here's how to select the pattern you want used.
Discover MoreNeed to use a date as part of a larger string of text? Here are some handy ways to go about the process.
Discover MoreBy default, Excel vertically aligns cell contents to the bottom of cells. If you prefer a different default alignment, ...
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