Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Conditionally Highlighting Cells Containing Formulas.
by Allen Wyatt
(last updated January 23, 2021)
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 New Formatting Rule dialog box.
Microsoft introduced the ISFORMULA function with Excel 2013. The ISFORMULA function allows you to highlight cells that contain formulas without using a macro. To use this function with conditional formatting, select the cells you want checked, and then follow these steps:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9900) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365. You can find a version of this tip for the older menu interface of Excel 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!
Want to know where duplicates are in a list of names? There are a couple of ways you can go about identifying the ...Discover More
Conditional formatting is a great tool for changing the format of cells based on whether certain conditions (rules) are ...Discover More
Need to conditionally highlight an entire row based on the contents of a single cell in each row? This tip explains how ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.