Hello,
First post after using eveyone's help on here over last couple of years! My VBA skills are improving, but still gaps in my knowledge...
I'm writing a fairly lengthy macro which involves sorting the data numerous times. The first couple of sorts are fairly straight forward and I'm currently doing it using the code below:
Example Code
With Sheets("Sheet1")
With .Range("A7:AO" & LastRowCurrent)
.Sort key1:=.Columns(4), order1:=xlAscending, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End With
End With
I had previously used a lengthier bit of code which included putting an auto-filter on, but the version above runs through much quicker as I have 30,000+ lines of data to sort.
However, I am unsure how to use a similar styled code to filter by a particular custom order sequence (i.e. not alphabetical or numerical)
I would like the data to be sorted in the following order:
"S1,S2,S3...S30,A1,A2,A3...A30,X1,X2,X3...X30"
Can anyone help as I can't seem to work out how to code this using a similar style code to the example?
Thanks.
Bookmarks