February 11, 2015
I hoping I can get some help with this.
I have an Excel spreadsheet that I have to sort by several different columns. I am wanting to know if there is a macro that can be written to do this for me.
My preliminary sort starts with sorting the columns in order. I have numbers above each column so when the customer sends me the list I can custom sort left to right the 28 columns in order.
I have to sort by version, keeping all the same version together. There are many column and rows. The number of rows changes and the number in each version changes as well.
(Example on the Sorting Tab)
1ST Sort – Version column – I input my own custom sort list into excel.
All the sorts hereafter have to be done within each version name.
2nd sort - Ship Via column – (Direct, Direct UPS, RSC, RSC-Bulk Store) - column E on the Sorting tab. This is everything with this version.
3rd sort – Ship Name column on for the *Direct Shipments within the sorted *ship via. (a-z) – column L (green color)
4th sort –Fold column within the 3rd sort for Direct Shipments (1/4 vs ½) – column S
5th sort – RSC Run Name column for the RSC shipments within the sorted *ship via (a-z) – column K (orange color)
6th sort – I do this on with the 5th sort – Run Type (a-z) – column U
7th sort – RSC Run Name column only the RSC-Bulk Store shipments within the sorted *ship via (a-z) – column K (blue color)
Repeat 2 through 7 for every version on run list.
This is very time consuming when you have 25 plus version. Any help would be greatly appreciated. I’m not even sure where to start with this.
I have attached a sample. The 1st tab is the raw data I receive. The 2nd tab is after I have sort column left to right. The 3rd tab is an example of on version in order need for press. I have highlighted each section I have to sort separately within the version.
I am using a PC, Excel 2013.
Thanks again for any input with this.
June 25, 2016
If I have to sort that many columns (1st-6th sort), I would consider using a helper column.
For example, in column AC (cell AC8) I would have a formula like =F8&E8&L8&S8&K8&U8 to concatenate all the required columns to sort and copied down the column. I would then sort this helper column. It is easier than using Sort-Add Level.
I am not clear about your 7th sort.
One thing I noted is there may be merged cells in your worksheet (Excel keeps warning me on this when I tried to sort).
You should avoid merged cells in a data table.
February 11, 2015
Most Users Ever Online: 57
Currently Online: azri adrin, Mark Lund, Rudi
Currently Browsing this Page:
Frans Visser: 210
mey tithveasna: 71
Anders Sehlstedt: 47
Guest Posters: 1
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea
Moderators: Genevieve Tupas