Hi, I'm trying to figure out a formula for a table that will give me a numerical rank from high to low if the value is positive, then low to high if negative.
E.g.
Value Desired rank
100 2
-50 6
-400 4
60 3
210 1
-70 5
Any thoughts?
Hi, I'm trying to figure out a formula for a table that will give me a numerical rank from high to low if the value is positive, then low to high if negative.
E.g.
Value Desired rank
100 2
-50 6
-400 4
60 3
210 1
-70 5
Any thoughts?
RANK does that by default, since that's just descending order - e.g.
=RANK(A2,$A$2:$A$7,0)
Edit: ignore - I didn't read very carefully!
Last edited by romperstomper; 08-29-2024 at 08:21 AM.
Everyone who confuses correlation and causation ends up dead.
Paste this into B1 and hit ENTER:
AliGW on MS365 Beta Channel (Windows 11) 64 bit![]()
Please Login or Register to view this content.
A B 1 100 2 2 -50 6 3 -400 4 4 60 3 5 210 1 6 -70 5
Sheet: Sheet1
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
TryFormula:
Please Login or Register to view this content.
This will do reversed ranking for negative values, but increased by the count of non-negative
Last edited by Kaper; 08-29-2024 at 08:11 AM. Reason: Corrected to take into account header in row 1
Best Regards,
Kaper
Or equivalent formula:
Formula:
Please Login or Register to view this content.
Last edited by Kaper; 08-29-2024 at 08:10 AM. Reason: Corrected to take into account header in row 1
Another way,
B2
copy down.![]()
Please Login or Register to view this content.
Or try this:
Formula:
Please Login or Register to view this content.
One way:Formula:
Please Login or Register to view this content.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Is this resolved?
Sample file attached with all the soutions.
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
Also, you may not be aware that you can thank those who have helped you by clicking the small star icon (Next to Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks