Select All Cells With Formula In It

Let say we want to distinguish between ordinary cells and cells with formula in it, so we give a special background color to the cells with formula.

For doing it manually is time consuming, especially on Excel Worksheet with large of cells with formula in it (usually a very complex worksheet).

The following vba macro code will do the trick for us.

Sub SelectAllCellsWithFormula()

    'select all cell with formula
    Cells.SpecialCells(xlCellTypeFormulas).Select

    'change cell background color
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .ThemeColor = xlThemeColorAccent1
        .TintAndShade = 0.399975585192419
        .PatternTintAndShade = 0
    End With

End Sub

FIN

This entry was posted in Cells and Range and tagged , , , . Bookmark the permalink.

6 Responses to Select All Cells With Formula In It

  1. Pingback: Number of Cells/Rows/Columns With Formula | Excel VBA Macro Tutorial and Examples

  2. Pingback: URL

  3. Pingback: Garden Services in North London

  4. Pingback: how does reverse mortgage work

  5. Pingback: reversemortgage

  6. Pingback: whole house water filters

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>