Excel rank.eq

%3CLINGO-SUB%20id%3D%22lingo-sub-1317651%22%20slang%3D%22en-US%22%3EExcel%20rank.eq%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1317651%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3BI%20have%20Excel%20365%20proplus%20installed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20the%20rank.eq%20function%20as%20I%20am%20trying%20to%20rank%20numbers%20with%20ties%20.%3C%2FP%3E%3CP%3E%26nbsp%3BSee%20below%20where%20I%20use%20the%20Rank.eq%20function%20-%20but%20it%20does%20not%20seem%20to%20distinguish%20between%20ties%20butthe%20old%20rank()%20method%20with%20countif()%20correction%20with%20ties.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EShould%20rank.eq()%20work%20like%20this%20%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CTABLE%20width%3D%22655%22%3E%3CTBODY%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3Ea1%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%2229px%22%3EB%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3EC%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3ED%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%2229px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%2229px%22%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%22138px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%22138px%22%3EData%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%22138px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%22138px%22%3ERank.eq%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%22138px%22%3ERank.eq%20formula%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%22138px%22%3EOld%20Method%20-%20Rank%20with%20Countif%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%22138px%22%3EOld%20formula%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3E3%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%2229px%22%3E1%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E1%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%2229px%22%3ERANK.EQ(B3%2C%24B%243%3A%24B%247%2C1)%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E1%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%2229px%22%3ERANK(B3%2C%24B%243%3A%24B%247%2C1)%2BCOUNTIF(%24B3%3AB%247%2CB3)-1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3E4%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%2229px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%2229px%22%3ERANK.EQ(B4%2C%24B%243%3A%24B%247%2C1)%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E2%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%2229px%22%3ERANK(B4%2C%24B%243%3A%24B%247%2C1)%2BCOUNTIF(%24B4%3AB%247%2CB4)-1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%2243px%22%3E5%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%2243px%22%3E3%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%2243px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2243px%22%3E%3CFONT%20size%3D%225%22%20color%3D%22%23FF0000%22%3E3%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%2243px%22%3ERANK.EQ(B5%2C%24B%243%3A%24B%247%2C1)%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2243px%22%3E4%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%2243px%22%3ERANK(B5%2C%24B%243%3A%24B%247%2C1)%2BCOUNTIF(%24B5%3AB%247%2CB5)-1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%2243px%22%3E6%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%2243px%22%3E3%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%2243px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2243px%22%3E%3CFONT%20size%3D%225%22%20color%3D%22%23FF0000%22%3E3%3C%2FFONT%3E%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%2243px%22%3ERANK.EQ(B6%2C%24B%243%3A%24B%247%2C1)%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2243px%22%3E3%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%2243px%22%3ERANK(B6%2C%24B%243%3A%24B%247%2C1)%2BCOUNTIF(%24B6%3AB%247%2CB6)-1%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3E7%3C%2FTD%3E%3CTD%20width%3D%2244px%22%20height%3D%2229px%22%3E4%3C%2FTD%3E%3CTD%20width%3D%2240px%22%20height%3D%2229px%22%3E%26nbsp%3B%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E5%3C%2FTD%3E%3CTD%20width%3D%22192.8px%22%20height%3D%2229px%22%3ERANK.EQ(B7%2C%24B%243%3A%24B%247%2C1)%3C%2FTD%3E%3CTD%20width%3D%2267.2px%22%20height%3D%2229px%22%3E5%3C%2FTD%3E%3CTD%20width%3D%22347.2px%22%20height%3D%2229px%22%3ERANK(B7%2C%24B%243%3A%24B%247%2C1)%2BCOUNTIF(%24B7%3AB%247%2CB7)-1%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1317651%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1317700%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20rank.eq%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1317700%22%20slang%3D%22en-US%22%3EApologies%20-%20Read%20Rank.eq()%20functionality%20more%20thoroughly%20and%20it%20is%20not%20intended%20to%20do%20what%20I%20want%20-%20it%20only%20gives%20the%20lower%20ranking%20to%20a%20set%20of%20ties%20and%20assigns%20the%20next%20rank%20number%20rather%20than%20skipping%20a%20number.%20Rank()%20skips%20a%20rank%20number.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1317704%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20rank.eq%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1317704%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F627176%22%20target%3D%22_blank%22%3E%40paudie190%3C%2FA%3E%26nbsp%3BI%20believe%20that%20both%20RANK.EQ%20and%20RANK%20do%20give%20the%20correct%20result.%20Both%20take%20into%20account%20ties%20and%20gives%20the%20same%20rank%2C%20as%20it%20should.%20It%20seems%20that%20what%20you%20are%20trying%20to%20achieve%20with%20the%20COUNTIF%20correction%20can%20also%20be%20achieved%20by%20just%20sorting%20(i.e.%20not%20ranking)%20your%20data%20and%20adding%20a%20sequential%20number%20to%20each%20row.%20Please%20see%20the%20attached%20workbook%20for%20an%20example%20of%20what%20I%20mean.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1319014%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20rank.eq%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1319014%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20reply%20-%20sorting%20and%20row%2Fcolumn%20number%20would%20work%20-%20but%20my%20actual%20real%20model%20(%20I%20just%20provided%20a%20very%20simple%20idea%20of%20the%20issue)%20will%20not%20allow%20sorting%20of%20the%20data%3C%2FP%3E%3CP%3EThanks%20again%3C%2FP%3E%3CP%3EPadraig%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

 I have Excel 365 proplus installed.

 

I am using the rank.eq function as I am trying to rank numbers with ties .

 See below where I use the Rank.eq function - but it does not seem to distinguish between ties butthe old rank() method with countif() correction with ties. 

 

Should rank.eq() work like this ?

 
 
 
a1BCD   
2Data Rank.eqRank.eq formulaOld Method - Rank with CountifOld formula
31 1RANK.EQ(B3,$B$3:$B$7,1)1RANK(B3,$B$3:$B$7,1)+COUNTIF($B3:B$7,B3)-1
42 2RANK.EQ(B4,$B$3:$B$7,1)2RANK(B4,$B$3:$B$7,1)+COUNTIF($B4:B$7,B4)-1
53 3RANK.EQ(B5,$B$3:$B$7,1)4RANK(B5,$B$3:$B$7,1)+COUNTIF($B5:B$7,B5)-1
63 3RANK.EQ(B6,$B$3:$B$7,1)3RANK(B6,$B$3:$B$7,1)+COUNTIF($B6:B$7,B6)-1
74 5RANK.EQ(B7,$B$3:$B$7,1)5RANK(B7,$B$3:$B$7,1)+COUNTIF($B7:B$7,B7)-1
 

 

 

 

 

3 Replies
Highlighted
Apologies - Read Rank.eq() functionality more thoroughly and it is not intended to do what I want - it only gives the lower ranking to a set of ties and assigns the next rank number rather than skipping a number. Rank() skips a rank number.
Highlighted

@paudie190 I believe that both RANK.EQ and RANK do give the correct result. Both take into account ties and gives the same rank, as it should. It seems that what you are trying to achieve with the COUNTIF correction can also be achieved by just sorting (i.e. not ranking) your data and adding a sequential number to each row. Please see the attached workbook for an example of what I mean.

Highlighted

@Riny_van_Eekelen 

Thanks for your reply - sorting and row/column number would work - but my actual real model ( I just provided a very simple idea of the issue) will not allow sorting of the data

Thanks again

Padraig