Hi

It's already considering the shift. See these part of the code

Code:
If Shift = "all" Then 'all
    CREATE_OUTPUT i, LB
ElseIf Data(i, 2) = Shift Then 'match shift
    CREATE_OUTPUT i, LB
End If