» Formatting Cells Containing Formulas
CATEGORY - Working with Formulas
VERSION - All Microsoft Excel Versions
Step 1: Add the following VBA Function to a regular Module:
Function IsFormulaInCell (Cell) As Boolean
IsFormulaInCell= Cell.HasFormula
End Function
Step 2: Use the Custom Function to identify and format cells containing formulas:
1. Select the cells in the sheet by pressing Ctrl+A, in Excel 2003 press Ctrl+A+A from a cell inside a region.
2. From the Format menu, select Conditional Formatting.
3. In Condition 1, select Formula is from the dropdown list.
4. In the formula box, type =IsFormulaInCell(A1), and then click Format.
5. From the Font tab, select any desired color and click OK twice.

Book Store:
Recommended Books:
- How to Use Financial Statements: A Guide to Understanding the Numbers
- The Sweet Potato Queens' Big-Ass Cookbook and Financial Planner
- Business Analysis with Microsoft Excel (2nd Edition)
- Keys to Reading an Annual Report (Barron's Business Keys)
- Fish! A Remarkable Way to Boost Morale and Improve Results
- Microsoft Word Version 2002 Step By Step (With CD-ROM)
great (almost) instructions
Mark
These are "almost instructions" because they lack some (perhaps) tedious but necessary information. I tried this about 5 times & had marginal results. The VBA code is incomplete. I added it to a worksheet and later got a compile error, because End Sub was not included. Is the code really complete? Is anything else missing? As for Formatting, when you hit Ctrl-A, it only selects a range of cells that are contiguous. I trid the instructions (to the letter and had no success. Cells without formulas were reformatted. Cells with formulas were are as well. Very inconsistant. I am very experienced with Excel, but if your example does not work for me, it makes me question whether I'm completely wasting my time with your "helpful tips".
It works
slaineB
In VB Editor insert new Module, and then paste the VBA code.

