PDA

View Full Version : Sort 2 Columns Code Needed



la90292
07-11-2010, 11:33 AM
I have a work sheet that has the inventory for our shoe store, Columns A to X and is sub totaled by each vendor.

I want to be able to sort Columns H & J which contains the style # and sizing respectfully for each vendor.The problem is each vendor will have x amount of rows to sort depending on how many items they have, and since the subtotals are by vendor, I must do each vendor down the list to keep the sections in tact.

Please help me with a formula. Thanks.

p45cal
07-11-2010, 12:49 PM
Remove the subtotals,
sort by vendor, style, size,
put the subtotals back in.

la90292
07-13-2010, 09:54 AM
There are over 400 sub totals. How would I put the subtotals back in the appropriate rows? Thanks for your suggestion.

p45cal
07-13-2010, 11:12 AM
Pre Excel 2007:
Select the table, drop down menu:
Data|Subtotals...
At Each change in Vendor
Use Function Sum (?)
Add subtotal to: wherever it was before.
Click OK.

in xl 2007 and later:
Select the table, then on the Data tab of the ribbon, click Subtotals, then the rest is the same as pre xl2007.