I have a column (with a title in row 1) containing a list that I want to sort alphabetically prior to performing other actions. Using the following code, everything is sorted alphabetically as expected but unfortunately includes the header/title from row 1.
How can I perform this simple sort function in VBA without including the title/header as part of the sorting?
As a side note the number of rows of data in column GZ may change so I'm not able to state a simple Range(GZx : GZy) in the selection
How can I perform this simple sort function in VBA without including the title/header as part of the sorting?
As a side note the number of rows of data in column GZ may change so I'm not able to state a simple Range(GZx : GZy) in the selection
VBA Code:
Set srtR = Sheets(sht).Range("GZ:GZ")
srtR.Sort Key1:=Range("GZ:GZ"), Order1:=xlAscending
Last edited: