Hi,
Wondering if someone could help me with some code I need to apply a filter , cut the visible rows and paste into a new sheet.
I then want to return to the original sheet and delete the blank rows.
When I record it records the exact ranges , If someone could advise me how to do it without naming specific ranges that would be great.
I need to filter column P , for “00GHT” , my current code is below.
Any help is greatly appreciated
Wondering if someone could help me with some code I need to apply a filter , cut the visible rows and paste into a new sheet.
I then want to return to the original sheet and delete the blank rows.
When I record it records the exact ranges , If someone could advise me how to do it without naming specific ranges that would be great.
I need to filter column P , for “00GHT” , my current code is below.
Any help is greatly appreciated
VBA Code:
Rows("3:3").Select
Selection.AutoFilter
ActiveWindow.SmallScroll ToRight:=4
ActiveSheet.Range("$A$3:$AEN$5386").AutoFilter Field:=16, Criteria1:= _
"00GHT"
Rows("1:1").Select
Range("E1").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.copy
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste
Rows("21:21").Select
Range("E21").Activate
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
Selection.AutoFilter
Range("E4").Select