I have the following macro that sorts column G and H ascending so that the rows with "Yes" in column G and H come to the top. Next I would like to copy all rows with a Yes in them into B50 and all rows without a yes in column G or H into B100. Can someone help me finish this macro?
Sub Filter()
Application.ScreenUpdating = False
Dim Wks As Worksheet
Set Wks = ActiveSheet
Wks.Activate
Filter2
Application.ScreenUpdating = True
End Sub
Private Sub Filter2()
'First line
Dim i As Long, LR As Long
i = 446
Range("B3:BY4").AutoFilter
Selection.Sort Key1:=Range("G4"), Order1:=xlAscending, Header:= _
xlGuess, Orientation:=xlTopToBottom
Selection.Sort Key1:=Range("H4"), Order1:=xlAscending, Header:= _
xlGuess, Orientation:=xlTopToBottom
ActiveSheet.AutoFilterMode = False
Application.CutCopyMode = False
End Sub
Bookmarks