Log in

View Full Version : QUestion Excel


salvel
Feb 14, 2003, 08:02 PM
Hello, my name is Carmen and I live in Mexico, City.
I don' t speak English very well but I try to state my question:

In Excel I want to put in order some data for some column. I use the "hierarchy" function because I want a number of the order for the column "grade". But in this function I note that if I have 2 numbers that are equal, this function assign number 1 and number 1 for those 2 numbers. For example

Name Grade Hierarchy
Carlos 10 1
Jorge 9 3
Carmen 8 4
Jos 10 1
Mario 8 4
Juan 7 6

But I want that the "Hierarchy" function don't repeat the number: I. E. 1 for Carlos and 1 for Jos. Instead, I would like the function to assign 1 for Carlos and 2 for Jose. I would expect the new ordering to be a sequential numbering such as the one shown in the following table; in other words, there are not jumps from 1 to 3 or from 4 to 6:

Name Grade Hierarchy
Carlos 10 1
Jorge 9 3
Carmen 8 4
Jos 10 2
Mario 8 5
Juan 7 6


Will you please help to find out which function or functions or combinations or some of them there are in the Excel program that can help me to solve this problem?
Please, I need you to provide me with this solution as soon as possible; I am truly desesperated.


Thank you very much

Yours sincerely

Carmen

dtecmeister
Mar 22, 2003, 08:42 AM
I don't have the hierarchy formula on my version of Excel, but here's an answer.
Add a column next to the hierarchy column. Fill the top row with this formula:
=IF(COUNTIF(A2:A$16,A1),A1+COUNTIF(A2:A$16,A1),A1)
(if you have more than 16 items, change 16 to however many you have)
If your column isn't A, then change this to whatever column you're using.
Copy/Paste this formula down the column to your next-to-last row, in this case 15.
In row 16 put this:
=A16


Hope this helps!