
Use a custom function to document and display
all cells containing formulas
This powerful macro will document in an Immediate window all
cells containing formulas. When executed, each cell that contains a
formula is listed by its cell address, along with the formula and the
current value.
4
To determine and document all formulas in the current
worksheet:
1. Press <Alt+F11>.
2. On the Insert menu, click Module.
3. Type the following macro:
Sub DocFormulasWks()
Dim rng As Range
With ActiveSheet
For Each rng In .UsedRange
If rng.HasFormula = True Then
Debug.Print "Addr.:" & rng.Address
Debug.Print "Form.:" & rng.Formula
Debug.Print "Value:" & rng.Value
End If
Next ...