RANK.EQ Not Returning Without Duplicate References

ejackson37

New Member
Joined
Jan 30, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I am trying to rank teams in a table for a charity sports event.

I want to rank by:
1. Points (PTS)
2. Goal Difference (GD)
3. Goals Scored (GS)
4. If all are tied, revert to Alphabetical order.

However the formula I have put in, does not return the Alphabetical order.

=RANK.EQ([@PTS],[PTS])+COUNTIFS([PTS],[@PTS],[GD],">"&[@GD])+COUNTIFS([GD],[@GD],[GS],">"&[@GS]+COUNTIFS([Team],"<="&[@Team]))

Where the black team and blue team have drawn 1-1 (testing the formula) it returns them both as Rank 2 however I want black to return as 2 and blue as 3.

The reason I'm using a table and Rank.EQ is because I want this to be live update as the event goes on.

Can anyone help please?

Thank you. You're a great community that has always solved issues I have had :)
 

Attachments

  • Table Rank Issue.png
    Table Rank Issue.png
    32.4 KB · Views: 12

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Looks like you have a closing bracket in the wrong place.
Try
Excel Formula:
=RANK.EQ([@PTS],[PTS])+COUNTIFS([PTS],[@PTS],[GD],">"&[@GD])+COUNTIFS([GD],[@GD],[GS],">"&[@GS])+COUNTIFS([Team],"<="&[@Team])
 
Upvote 0
Looks like you have a closing bracket in the wrong place.
Try
Excel Formula:
=RANK.EQ([@PTS],[PTS])+COUNTIFS([PTS],[@PTS],[GD],">"&[@GD])+COUNTIFS([GD],[@GD],[GS],">"&[@GS])+COUNTIFS([Team],"<="&[@Team])
Hi,

Thanks for your response. I amended the formula but now instead of ranking 1-4 it now says 7, 5, 3 & 4.

Do you know how to get it to rank 1-4?

Thanks again, appreciate your help
 

Attachments

  • Table Rank Issue 2.png
    Table Rank Issue 2.png
    29.9 KB · Views: 5
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Hi,

I tried downloading it but my IT department blocked downloading add in. Other then using link below to sharing a WeTransfer, not sure how I will be able to send it:

Please let me know if you can get a copy of the spreadsheet from the above.

Again thank you for your help, apologies not straight forward
 
Upvote 0
Thanks for that.
If you are happy with a helper column how about
Football Table Charity A.xlsx
IJKLMNOPQRS
10TeamPWDLGSGAGDPTSHelperRank
11Red100103-3044434
12White1100303311141
13Black1010110122212
14Blue1010110122223
Sheet1
Cell Formulas
RangeFormula
J11:J14J11=SUM(K11:M11)
K11K11=IF(C11>E11,1,0)
L11L11=IF(C11=E11,1,0)
M11M11=IF(C11<E11,1,0)
N11N11=C11
O11O11=E11
P11:P14P11=N11-O11
Q11:Q14Q11=SUM((K11*3)+(L11*1))
R11:R14R11=--(RANK([@PTS],[PTS])&RANK([@GD],[GD])&RANK([@GS],[GS])&COUNTIFS([Team],"<="&[@Team]))
S11:S14S11=RANK([@Helper],[Helper],1)
K12K12=IF(E11>C11,1,0)
L12L12=IF(E11=C11,1,0)
M12M12=IF(E11<C11,1,0)
N12N12=E11
O12O12=C11
K13K13=IF(C12>E12,1,0)
L13L13=IF(C12=E12,1,0)
M13M13=IF(C12<E12,1,0)
N13N13=C12
O13O13=E12
K14K14=IF(E12>C12,1,0)
L14L14=IF(E12=C12,1,0)
M14M14=IF(E12<C12,1,0)
N14N14=E12
O14O14=C12
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
Hi Fluff,

Me again, sorry! I tried applying the logic from the above which resolved my ranking issue for the football table to the "Top Goalscorer" table I have.

I added in helper, to rank. Each person has a rank from 1-80. However my rank is not returning:
1. Goals
2. Alphabetical order

You can see from my attached screenshot and excel linked below that Jack has 5 goals but is not top of the ranking:

Are you able to help explain where I have gone wrong? I want it to rank based on number of goals first and then alphabetical if the values match.

Thank you again, I'm learning alot but not quite there! Thanks
 

Attachments

  • Player Rank Issue.png
    Player Rank Issue.png
    93.1 KB · Views: 8
Upvote 0
That will only work for upto 9 players, but you can use this instead
Excel Formula:
=RANK([@Goals],[Goals])*100+COUNTIFS([Name],"<="&[@Name])
You can also replace the formula in AY:BA with
Excel Formula:
=SORT(Table9[[Name]:[Goals]],{3,1},{-1,1})
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

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