What I like to do is conditionally format cells depending on whether the cell contains a formula (something starting with "=") or not.
Is this feasible in Excel 2007?
What I like to do is conditionally format cells depending on whether the cell contains a formula (something starting with "=") or not.
Is this feasible in Excel 2007?
You can use:
If (cell.HasFormula) then ..
To look for formulas.
(This will avoid the problem of literal string field starting with an "=")
AFAIK, there is no readily accessible worksheet function or conditional to test for formulae. VBA offers the range.HasFormula
method that returns true if every cell in the range (which can be a single cell) has a formula.
Just for reference (and for upvoting :-)), I finally solved the automatic coloring with VBA, without using conditional formatting:
dim ws as Worksheet
for each ws in thisworkbook.sheets
ws.Cells.SpecialCells(xlCellTypeFormulas).Font.ThemeColor = xlThemeColorAccent1
next ws
works fine for me. (Found here)