
Welcome toExcel2007.Tips.Net
Bugs and Pests Tips
Car Tips
Word2007 Tips
WordTips
Specifying the Number of MRU Files
Seeing How Excel Evaluates Formulas
Highlighting a Cell if It Contains Specific Text
Creating a List of Worksheet Formulas
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: