KnightFhawker
New Member
- Joined
- Dec 7, 2016
- Messages
- 17
- Office Version
- 365
- 2016
- Platform
- Windows
- Mobile
- Web
Hi All!
I am trying to find a way in Excel VBA to Sort my unique list primarily by the last character, which in this case is a letter, then secondarily by the preceding number. I haven't been able to find this as an option so far so hopefully someone will be able to help me with this. If it is not directly an option, I was thinking that maybe there is a way to add a part to my unique filter initially where it first filters a unique list with only the last character, then another unique filter to list the other last character. (There is only an A and B in the last character position so this would only need two sweeps through to complete the list).
Here's my unique listing code I am currently using:
Result in Column AA:
101A
102A
103A
104A
105A
1B
201A
2B
3B
Basically I just want to list all of the A's together first and then list the B's together after.
Still a bit of a newbie here so I hope I formatted everything okay. If there's anything else you need from me to be able to assist just let me know.
Thanks in advance for your help!
I am trying to find a way in Excel VBA to Sort my unique list primarily by the last character, which in this case is a letter, then secondarily by the preceding number. I haven't been able to find this as an option so far so hopefully someone will be able to help me with this. If it is not directly an option, I was thinking that maybe there is a way to add a part to my unique filter initially where it first filters a unique list with only the last character, then another unique filter to list the other last character. (There is only an A and B in the last character position so this would only need two sweeps through to complete the list).
Here's my unique listing code I am currently using:
Code:
Sheets("Master").Range("AA6", Range("AA" & Rows.Count).End(xlUp)).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
Result in Column AA:
101A
102A
103A
104A
105A
1B
201A
2B
3B
Basically I just want to list all of the A's together first and then list the B's together after.
Still a bit of a newbie here so I hope I formatted everything okay. If there's anything else you need from me to be able to assist just let me know.
Thanks in advance for your help!