Is it possible to create a VBA custom sort looking at only the first 3 characters in the cells. I'm trying to sort a huge list of item numbers into catagories. the first three characters can identify what catagory it belongs to.
for example there are two catagories Roadway and Pavement
these are the item numbers
202E23500 would go with Roadway
254E01000 would go with Pavement
407E10000 would go with Pavement
202E01000 would go with Roadway
209E72001 would go with Roadway
(this is drastically simplified)
so you see the first three characters (202 and 209 for Roadway 254 and 407 for Pavement) is what I want to sort off of
I can make a list to base the custom sort off of which three characters go with each catagory. There are just way to many item numbers to create a custom sort base off the whole number.
I would like that example list to Sort like this
Roadway
202E01000
202E23500
209E72001
Pavement
254E01000
407E10000
I can add the Catagory names in the column with the Item numbers to make it easier to sort.
any help with this code would be awesome I can edit the code to make it apply to the whole set of data but i just dont know if this is possible or how to do it.
JD
Bookmarks