BUY EXCEL BOOKS ONLINE: 1. VBA & Macros      2. VBA for Modelers      3. Excel 2013 VBA and Macros     
4. Excel VBA for Dummies      5. Excel with VBA & .NET      6. Mastering VBA      7. Excel 2013 Programming

Select or Color Alternate Even/Odd Columns

    Sub SelectAlternateOddColumns()
        Dim MyCell As Range
        Dim rNew As Range
        For Each MyCell In ActiveSheet.UsedRange.Cells
            If MyCell.Column Mod 2 = 1 Then
                If rNew Is Nothing Then
                    rNew = MyCell
                Else
                    rNew = oEXA.Union(rNew, MyCell)
                End If
            End If
        Next
        If Not rNew Is Nothing Then
            rNew.EntireColumn.Select
        End If
    End Sub


    Sub SelectAlternateEvenColumns()
        Dim MyCell As Range
        Dim rNew As Range
        For Each MyCell In ActiveSheet.UsedRange.Cells
            If MyCell.Column Mod 2 = 0 Then
                If rNew Is Nothing Then
                    rNew = MyCell
                Else
                    rNew = oEXA.Union(rNew, MyCell)
                End If
            End If
        Next
        If Not rNew Is Nothing Then
            rNew.EntireColumn.Select
        End If
    End Sub