XLorate by davesexcel

Sub SelectA1()
    Dim FrstRng As Range
    Dim UnionRng As Range
    Dim c As Range
    Set FrstRng = Range("A1:F20")

    For Each c In FrstRng.Cells
        If c = "A1" Then
            If Not UnionRng Is Nothing Then
                Set UnionRng = Union(UnionRng, c)    'adds to the range
                MsgBox UnionRng.Address    'remove later

                Set UnionRng = c
            End If
        End If
    Next c

End Sub

Union Range,davesexcel union range, find item add to range variable, add to range

Loop through a range of cells, find value,add to range

Double Loop Examples

Using Integers


Creating the Range of Cells


Using SpecialCells


Using AutoFilter in a Loop

This was an example of loop codes, but if you want to know the fastest way to Color those cells.

Use Conditional Formatting

Other Loops

Loop Examples by Davesexcel
Excel VBA Loop Examples

Loop using fixed Number

Loop using Variable

Loop  and Calculate

Loop Get Unique Items

Loop Find Item