Advanced Sorting - urgent

G

Guest

I would like to sort a box of data by one cell in each box, rearranging the
boxes while keeping the data in each individual cell intact.
In the example below, I would like to sort the boxes (imagine lines around
each company) by the difference in the salaries betweern President and VP-
lowest to highest. So the companys should be organized Company 2 (with all
its info intact), then company 3, then company 1.

Example: Companies with names of CEOs and salaries
Company Name Title Salary Bonus
Company1 AJ Feele President 999999 400000
Tom Cruise VP 777777 200000
222222
200000

Company2 MLK Jr. Pres 300000 15000
Howard Stern VP - Sales 200000 13000
100000
2000

Company3 Heinz Ward Pres 500000 150000
Ghandi VP 100000
50000
400000
100000

I do not care if the cells are combined somehow, I just need to make sure I
can sort by the difference in salary or the diffrence in bonus. The regular
sort funcion cannot do this and I would not like to move them manually
because I have hundreds to sort this way. If you have any insights, PLEASE
let me know. I greatly appreciate your time and help.

Jesse
 
G

Guest

This is what I would do: Assuming your data is in columns A thru E and that
there is one blank row between boxes, in column F create a formula for each
row in the box plus the blank row below it referring to the cell with the
salary difference (i.e. D4). Copy this box of four cells down through column
F. Copy and Edit, Paste Special, choose Value and click OK. In column G
create consecutive numbers from 1 thru whatever. Now sort the whole area with
a primary sort on column F and a secondary sort on column G.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top