Microsoft Office Tutorials and References
In Depth Information
Displaying and Printing Formulas
Cells(Row, 2) = “ “ & Cell.Formula
Cells(Row, 3) = Cell.Value
Row = Row + 1
End With
Next Cell
End Sub
To use this macro, press Alt+F11 to activate the Visual Basic Editor. Select your workbook in the
Project window and choose Insert
Module to insert a new VBA module. Type the code exactly
as it appears. To execute the macro, activate the sheet that has the formulas, press Alt+F8, select
ListFormulas from the macro list, and click Run. Figure 84-2 shows an example of the output
from this macro. The first column contains the address of the formula, the second column
contains the formula, and the third column shows the current result of the formula.
Figure 84-2: A list of formulas generated by a VBA macro.
Search JabSto ::

Custom Search