Forum Discussion
craygoza92
Jan 10, 2022Copper Contributor
Range 99999?
Hello & good morning. I've got the following code which sorts a file of shipments that vary in size every day. Currently I'm using the following code: ActiveSheet.Range("$A$1:W999999").A...
- Jan 10, 2022
Hello!
Hope it works, instead of this line of code
ActiveSheet.Range("$A$1:W999999").AutoFilter Field:=3, Criteria1:="*PF*"
Try this one
ActiveSheet.Range("A1", "W" & Cells(Rows.Count, 1).End(xlDown).Row).AutoFilter Field:=3, Criteria1:="*PF*"
HansVogelaar
Jan 10, 2022MVP
Perhaps you can use ActiveSheet.UsedRange instead.
craygoza92
Jan 10, 2022Copper Contributor
which part of my actual code would i replace that in ? thanks.