Can these 2 following formulas be combind into one?
In C2 there is this
=RANK(B2,$B$2:$B$15)
In D2 there is this
=C2&IF(OR(MOD(C2,100)={11,12,13}),"th",CHOOSE(MIN(5,RIGHT(C2)+1),"th","st","nd","rd","th"))
Regards BVG
Can these 2 following formulas be combind into one?
In C2 there is this
=RANK(B2,$B$2:$B$15)
In D2 there is this
=C2&IF(OR(MOD(C2,100)={11,12,13}),"th",CHOOSE(MIN(5,RIGHT(C2)+1),"th","st","nd","rd","th"))
Regards BVG
Which is a good reason not to do it -- it takes two understandable formulas and makes one piece of mush that takes three times as long to evaluate.Originally Posted by pike
On the edge of inscrutable, here's an alternative for D2 (not mine, but don't know who should be credited):
=C26 & MID("thstndrdth", MIN(9, 2 * RIGHT(C26) * (MOD(C26-11, 100) > 2) + 1), 2)
Entia non sunt multiplicanda sine necessitate
You can, replace each reference to C2 in D2 with the RANK function... the advantage of using separate cells is that you avoid needlessly repeating functions (RANK)
(ie more efficient to use two cells as opposed to one in this instance)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks