dbmathis
Well-known Member
- Joined
- Sep 22, 2002
- Messages
- 1,064
Hi all
What line of VBA would I use to sort a changing range?
Like for instance I use this code for rows A1:AK3000, but what if that range is a constantly changing range? Is there a way to make that code dynamic?
What line of VBA would I use to sort a changing range?
Like for instance I use this code for rows A1:AK3000, but what if that range is a constantly changing range? Is there a way to make that code dynamic?
Code:
With Sheets("Raw Data")
.[A1:AK3000].Sort Key1:=Range("A2"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With