Option Explicit
Sub Filter2Col()
Dim lRw As Long, Ff As Long, CopyR As Long
Dim cRng As Range
lRw = [a65500].End(xlUp).Row: CopyR = 4
[i3:j3] = [a3:B3].Value: Range("I4:J" & lRw).Clear
For Ff = 4 To lRw
With Cells(Ff, "A")
If .Offset(, 1) <> "" Then
If .Offset(, 1) Mod 5 = 0 Then
Union(cRng, .Resize(, 2)).Copy Destination:=Cells(CopyR, "I")
CopyR = CopyR + 7: Set cRng = Nothing
Else
If cRng Is Nothing Then
Set cRng = .Resize(, 2)
Else
Set cRng = Union(cRng, .Resize(, 2))
End If
End If
End If
End With
Next Ff
If Not cRng Is Nothing Then
cRng.Copy Destination:=Cells(CopyR, "I")
CopyR = CopyR + 7: Set cRng = Nothing
End If
Cells(CopyR, "I") = [a3]: Cells(CopyR, "J") = [C3]
CopyR = CopyR + 1
For Ff = 4 To lRw
With Cells(Ff, "B")
If .Offset(, 1) <> "" Then
If .Offset(, 1) Mod 5 = 0 Then
Union(cRng, .Offset(, -1), .Offset(, 1)).Copy _
Destination:=Cells(CopyR, "I")
CopyR = CopyR + 7: Set cRng = Nothing
Else
If cRng Is Nothing Then
Set cRng = Union(.Offset(, -1), .Offset(, 1))
Else
Set cRng = Union(cRng, .Offset(, -1), .Offset(, 1))
End If
End If
End If
End With
Next Ff
If Not cRng Is Nothing Then
cRng.Copy Destination:=Cells(CopyR, "I")
Set cRng = Nothing
End If
End Sub