Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Conditionally Highlighting Cells Containing Formulas.
by Allen Wyatt
(last updated June 21, 2018)
You probably already know that you can select all the cells containing formulas in a worksheet by pressing F5 and choosing Special | Formulas. If you need to keep a constant eye on where formulas are located, then repeatedly doing the selecting can get tedious. A better solution is to use the conditional formatting capabilities of Excel to highlight cells with formulas.
Before you can use conditional formatting, however, you need to create a user-defined function that will return True or False, depending on whether there is a formula in a cell. The following macro will do the task very nicely:
Function HasFormula(rCell As Range) As Boolean Application.Volatile HasFormula = rCell.HasFormula End Function
To use this with conditional formatting, select the cells you want checked, and then follow these steps:
Figure 1. The Conditional Formatting dialog box.
Figure 2. The Format Cells dialog box.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3188) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Conditionally Highlighting Cells Containing Formulas.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Straining your eyes to see the comments in a document? You can modify the size of the default font used for the comments, ...Discover More
A handy way to store latitude and longitude values in Excel is to treat them as regular time values. When it comes around ...Discover More
Sometimes Excel does things that may appear just plain wacky. This particular tip deals with an issue that could crop up ...Discover More
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.