Excel – VBA – How to Extract All Formula’s in Sheet

This code will highlight all cells containing formulas using Excel VBA.

The following snippet highlights all cells that contain formula:

Highlight all cells containing Formulas using Excel VBA

The following snippet highlights all cells that contain formula

Sub HighLight_Formula_Cells()

Dim oWS As Worksheet
Dim oCell As Range

Set oWS = ActiveSheet

For Each oCell In oWS.Cells.SpecialCells(xlCellTypeFormulas)
    oCell.Interior.ColorIndex = 36
    MsgBox oCell.Formula
Next oCell

End Sub
SOURCE

LINK (Blogspot.com)

LANGUAGE
ENGLISH