Custom Sort based on a vba function - Pro's only!

Rx_

Nothing In Moderation
Local time
Today, 08:24
Joined
Oct 22, 2009
Messages
2,803
Excel 2007
Everyone has Customer Names where the naming convention follows a internal set of business rules (by everyone, I mean ME! LOL)

The A-Z sort order does not follow the business rules. No problem, I created a cool VBA Function. In Access forms, Access List boxes, or Access Reports, it just works like a charm.

Now, my Access report uses CopyFromRecordset to take a recordset and create a Excel Report that is "saved as" and taken to the field. OK, I can run this in Access customm sort and paste it in properly into Excel the First Time. (Disconnected Dataset)

The Excel report has Auto Filters on every header (naturally).
So, the user can autofilter on A-Z for the Orders column for example.
Now, the user turn off all filters and wants the Customer Name re-sorted according to the custom Function (the sort by A-Z is not what they want).

Here are some choices that might be possible:
1. Create a custom series (like Satu, Sund, Mond, Tues, Wend, Thurs, Frid) but for 4,000 distinct customer names (LOL, it just doesn't sound right?)
2. Create a Macro Enabled workbook, on the Header name (A5) click event, run a procedure that does all kinds of things to make it right.
3. Program a Insert Function for the workbook - and somehow use this to program selecting all the data and sorting the data using Advanced Filter.
4. Any other ideas?
 

Users who are viewing this thread

Back
Top Bottom