Excel - horizontal consecutive ranking in row

SamJakob

New Member
Joined
Jun 23, 2017
Messages
5
1st
HResult
2nd
H
Result3rdHResult4thHResult5thHResult
<<irrelevant>>D12.09<<irrelevant>>E12.09<<irrelevant>>C12.10<<irrelevant>>B12.10<<irrelevant>>A12.12

<tbody>
</tbody>

So I have the above table and then I want a consecutive rank for each 'H' value.

For example, at the moment I have

AB
CDE
35311

<tbody>
</tbody>

What I want is

ABCDE
23211

<tbody>
</tbody>



So far I've seen methods of doing this vertically instead of horizontally but I can't manage to adapt them.

Help would be much appreciated.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the forum.

I found your description to be a bit confusing. Do you mean that you want a formula in the red cells below, with these values?

1stHResult2ndHResult3rdHResult4thHResult5thHResult
<<irrelevant>></irrelevant>112.09<<irrelevant>></irrelevant>112.09<<irrelevant>></irrelevant>212.10<<irrelevant>></irrelevant>212.10<<irrelevant>></irrelevant>312.12

<tbody>
</tbody>

And you want the formula to be a ranking based on the values in the Result cells, without gaps? (The numbers in the table don't match your specified desired results. If I'm wrong, please explain how you get those values.)

If that is correct, how do you feel about rearranging your data? Most formulas of this sort use COUNTIF over the range somehow, and having the data and the results in the same range would result in a circular reference. If you want to keep it in this arrangement, I'd suggest putting the data values in a helper table somewhere, calculate the results there, then use some kind of LOOKUP to put in the H column.

Let me know if I understand your requirements correctly.
 
Upvote 0
Sorry, no that's not what I wanted.

I want to have my ranks in a table to the right of that data.
 
Upvote 0
Desired table:

1st
HResult2ndHResult3rdHResult4thHResult5thHResultABCDE
<<unrequired>>D12.09<<unrequired>>E12.09<<unrequired>>C12.10<<unrequired>>B12.10<<unrequired>>A12.1232211

<tbody>
</tbody>

Also, sorry about the desired results I put in the first post, it seems I've confused myself there, it should have been

D - 1
E - 1
B - 2
C - 2
A - 3

(as shown in the Desired table)
 
Upvote 0
Try this:

Excel 2012
ABCDEFGHIJKLMNOPQRSTU
11stHResult2ndHResult3rdHResult4thHResult5thHResultABCDE
2<>D12.09<>E12.09<>C12.1<>B12.1<>A12.1232211

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
Q2{=SUM(IF(ISNUMBER($A$2:$O$2),IF($A$2:$O$2<INDEX($A$2:$O$2,MATCH(Q1,$A$2:$O$2,0)+1),1/COUNTIF($A$2:$O$2,$A$2:$O$2))))+1}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



I'm a little puzzled why B2 is D and E2 is E, but it doesn't matter. This formula checks the header in Q1:U1 for the letter, and ranks the value it finds after that letter.

Let me know if this works for you.
 
Upvote 0
It is not working for me.

The formula appears to have a syntax error in it:
2),IF($A$2:$O$2[should there be something here?]<font color="green" style="background-color: rgb(250, 250, 250);"><index(<font color="purple">$A$2:$O$2,MATC</index(
 
Upvote 0
Arrgh! Even after all this time, I sometimes forget that the bulletin board software here can interpret a < as an HTML tag instead of part of a formula. To avoid that, one should put a space after it. See if this works:

Excel 2012
ABCDEFGHIJKLMNOPQRSTU
11stHResult2ndHResult3rdHResult4thHResult5thHResultABCDE
2<>D12.09<>E12.09<>C12.1<>B12.1<>A12.1232211

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Array Formulas
CellFormula
Q2{=SUM(IF(ISNUMBER($A$2:$O$2),IF($A$2:$O$2< INDEX($A$2:$O$2,MATCH(Q1,$A$2:$O$2,0)+1),1/COUNTIF($A$2:$O$2,$A$2:$O$2))))+1}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,975
Messages
6,122,538
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top