Q:

Selecting multiple ranges from string of ranges

I'm trying to select multiple ranges at the same time. Ie. B2:C2, B12:C12, B14:C14.
Updated code
Sub MarkForDMSLookup()
Dim MarkingString As String
Dim MarkingRange As String

j = 0

For i = 3 To 20 'LastRow()
    If Cells(i, 5) = "Yes" Then
        j = j + 1
        MarkingRange = "B" & i & ":C" & i
        'MsgBox MarkingRange
        If j = 1 Then MarkingString = MarkingRange
        If j > 1 Then MarkingString = MarkingString & ", " & MarkingRange

        If Cells(i, 5) = "No" Then Cells(i, 5).EntireRow.Hidden = True

    End If
Next i

'MsgBox MarkingString

Union(MarkingString).Select
End Sub

The Uniontag gives me a type mismatch. Any help to aligning the types would be greatly appreciated.
When limiting the for-loop to go from 2 to 20 i can use the Range tag instead of Union.

A:

I'd just use an autofilter instead of looping:
Sub MarkForDMSLookup()
    Dim j As Long
    j = 0

    With Range("E2:E" & LastRow())
        .AutoFilter field:=1, Criteria1:="Yes"
        On Error Resume Next
        .Resize(.Rows.Count - 1).Offset(1, -3).Resize(, 2).SpecialCells(xlCellTypeVisible).Select
        On Error GoTo 0
    End With

End Sub
Function LastRow()
    LastRow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row
End Function

