Hi
I recorded a macro which applies a filter to row 1 of a sheet, then filters data by a specific criteria ie "On Deal."
However, when I add a new set of data to that sheet and run the macro, it doesn't work as expected.
Can someone please advise how I should amend the code below? The range I've selected will always be less than 10,000 rows, hence the reason I've selected that range.
Thanks in advance.
Sub autofiltertest
Rows("1:1").Select
Selection.autofilter
ActiveSheet.Range("$A$1:$CG$10000").autofilter Field:=4, Criteria1:= _
"On Deal "
End Sub
I recorded a macro which applies a filter to row 1 of a sheet, then filters data by a specific criteria ie "On Deal."
However, when I add a new set of data to that sheet and run the macro, it doesn't work as expected.
Can someone please advise how I should amend the code below? The range I've selected will always be less than 10,000 rows, hence the reason I've selected that range.
Thanks in advance.
Sub autofiltertest
Rows("1:1").Select
Selection.autofilter
ActiveSheet.Range("$A$1:$CG$10000").autofilter Field:=4, Criteria1:= _
"On Deal "
End Sub
Last edited: