Custom Sort VERY Long Sort Order

kgaul01

New Member
Joined
Aug 26, 2013
Messages
19
Hi All, I have a spreadsheet I am writing vba for and I am stumped on my custom sort. I am trying to sort by account name (column E) in a specific order. However, the list of accounts is VERY large so I have been thinking of maybe a helper column referencing another table? A concern I have with the helper is that having that many more formulas will slow the workbook down. I look forward to your suggestions and thank you in advance!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Unfortunately I don't fully understand how I would implement the helper column. I can make a table with the lookups and the sort order but not sure how to best set it up. Any guidance?
 
Upvote 0
List the sort values somewhere in sort order, and in the helper column, use a MATCH function to get the sort order of the column you're sorting by.

If the list is so long that you don't want to do a linear search, use a two-column table with the sort items in alphabetical order, the sort order in the next column, and use a VLOOKUP formula in the helper column.
 
Upvote 0
I only know how to use match in vba to return a range value. (Sorry, vba novice) Could you help with sample code?
 
Upvote 0
I'm not talking about VBA, I'm talking about a helper column with a formula in the table of data you want to sort.
 
Upvote 0
For a single-column list,

=match(valueFromMySortColumn, mySortList, 0)

Then sort on the helper column.
 
Upvote 0
Thanks for the help but I actually ended up using a clock up in a similar way. (Just needed the "like" search)
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top