Forum Discussion
creating a top of the charts board
I will see if I can spot the sequence and apply it to my original with 80 sales people. Thanks again for providing the answer.
Nick
My solution does depend on the fact that your prior month is sorted in order by their rank in that month. (That's what the MATCH function looks at, coming up with their prior rank based on where they were in the array)
It would also be possible to look at the prior rank number and do the math comparing current rank with that number......
And, of course, presuming that there are new hires and turnover, you could add other conditions to the IFS function to cover "New" -- no need for a label to apply to somebody who has left employment.
- PeterBartholomew1Nov 23, 2020Silver Contributor
Following up on your ideas! I have not relied on either the sort order or any existing calculation of the ranking for the prior month. Individuals that were not active within the previous month are ranked at n+1 for comparison purposes. The text and colours are all produced by custom number formats.
= LET( priorPosns, RANK(PriorDeals, PriorDeals), prior, XLOOKUP( person, priorList, priorPosns, 1+MAX(priorPosns) ), change, prior - currentPosition#, change )- mathetesNov 24, 2020Gold Contributor
I never cease to be amazed at how many ways Excel offers to accomplish any given task.
In this case, I could replicate (with a bit more practice on my own) the formula itself. But it never would have occurred to me to use custom formatting in the manner you do; nor, frankly, do I really understand it.
Again, however, I suspect that conditional formatting could serve the same purpose, less elegantly perhas, but yet again, Excel holds multiple ways to get from A to Z.
- PeterBartholomew1Nov 24, 2020Silver Contributor
I know nothing of the OP's knowledge of Excel but I was confident that you could follow and might be interested. Following the (dubious) principle "If a thing is worth doing, it is worth doing to excess", I could set different number formats from a set of conditional formats. Who says the numbers never lie, in Excel what you see is not necessarily what you have.
Worse than that, it is also possible to use LET to perform the calculations that might otherwise be held in a helper range, but then display both the helper range and the final calculation as a single dynamic formula. It is like a program module written to a cell.
= LET( currentPos, RANK(currentDeals, currentDeals), priorPosns, RANK(PriorDeals, PriorDeals), prior, XLOOKUP(person, priorList, priorPosns, 1+COUNTA(priorList) ), change, prior - currentPos, IF({1,0}, currentPos, change) )