Highlighting Static Values

Written by Allen Wyatt (last updated June 11, 2026)

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:

  1. Press F5. Excel displays the Go To dialog box. (See Figure 1.)
  2. Figure 1. The Go To dialog box.

  3. Click the Special button. Excel displays the Go To Special dialog box. (See Figure 2.)
  4. Figure 2. The Go To Special dialog box.

  5. Select the Constants radio button. The four check boxes under the Formulas option then become available. (This can be a bit confusing. Why Microsoft made the Constants radio button control some check boxes under a different radio button is not immediately clear.)
  6. Make sure that all the check boxes under the Formulas radio button are selected. (They should be selected by default.)
  7. Click OK. Excel selects all the constants (cells that don't contain formulas) in the worksheet.
  8. Use the tools on the Home tab of the ribbon to fill the selected cells any way you desire. (Bill wanted to use a yellow fill color.)

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:

  1. Select cell A1.
  2. Press Ctrl+A to select all the cells in the worksheet. (If you want the conditional formatting rule to apply to just a range of cells, then select just those cells.)
  3. Make sure the Home tab of the ribbon is displayed.
  4. Click the Conditional Formatting tool in the Styles group. Excel displays a series of choices.
  5. Click New Rule. Excel displays the New Formatting Rule dialog box. (See Figure 3.)
  6. Figure 3. The New Formatting Rule dialog box.

  7. In the Select a Rule Type area at the top of the dialog box, choose Use a Formula to Determine Which Cells to Format. (See Figure 4.)
  8. Figure 4. Use a Formula to Determine Which Cells to Format.

  9. In the Format Values Where This Formula Is True box, enter the following formula. (If cell A1 is not the active cell in your selected cells, then change A1 to the appropriate cell.)
  10.         =AND(NOT(ISFORMULA(A1)),NOT(ISBLANK(A1)))
    
  11. Click Format to display the Format Cells dialog box.
  12. Set the formatting options to highlight the Fridays as desired.
  13. Click OK to dismiss the Format Cells dialog box.
  14. Click OK.

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.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Using Multiple References to the Same Footnote

Do you want to have multiple footnote references to the same actual footnote in a document? The easiest way to do this is ...

Discover More

Creating One-time Labels

Need to create a set of labels for a specific purpose? The easiest way is to let Word create a set of blank labels and ...

Discover More

Quickly Moving Your Table

For those who love to use the mouse during editing, you can use the little critter to help move your tables to exactly ...

Discover More

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!

More ExcelTips (ribbon)

Changing Cell Patterns

You can shade your cells by filling them with a pattern. Here's how to select the pattern you want used.

Discover More

Converting Dates to Text

Need to use a date as part of a larger string of text? Here are some handy ways to go about the process.

Discover More

Changing the Default Vertical Alignment

By default, Excel vertically aligns cell contents to the bottom of cells. If you prefer a different default alignment, ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three less than 4?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.