Last week in the Chandoo.org Forums a user asked a question
“How do I convert a Roman Numeral to a Number eg: MMMCCCLVII to 3357”
User Xlstime presented the solution of:
=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
Today we are going to look at how and why that simple formula works
As always at Formula Forensics you can follow along using a sample file: Download Sample File
Solution
Excel has a Roman function wherein =Roman(3357, 0) will return MMMCCCLVII
I knew there was no such reverse Roman function prior to Excel 2013 and so my initial thought was to look at a VBA Solution.
See notes on the Arabic Excel function at the end of the post.
However Xlstime presented =MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
How does this work?
lets start by pulling it apart from the inside out
=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
The Indirect Function simply takes its inputs and converts them to a Range, in this case 1:3999.
We will study why 3999 later
=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
The next function working out is Row()
Excel will convert the function ROW(INDIRECT(“1:3999”)) to an array of Row Numbers
={1;2;3;4;5;6;7;8;9;10;11; …. 3995;3996;3997;3998;3999}
You can see this if you goto cell D7 in the Sample File, press F2 and then F9
I limited the numbers to 300 as Excel cannot display more than 8,192 digits
Stepping out one more function:
=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
The Roman() function converts its inputs into Roman Numbers
eg: Roman(58) will return LVIII
But as we are feeding it an array of numbers from 1 to 3999 Excel handles all these and converts them to an Array of Roman Numbers
Goto D9 in the sample file =ROMAN(ROW(INDIRECT(“1:300”))) press F2 and then F9
Excel returns an array of roman numbers
={“I”;”II”;”III”;”IV”;”V”;”VI”;”VII”;”VIII”; … “CCXCVI”;”CCXCVII”;”CCXCVIII”;”CCXCIX”;”CCC”}
We have limited the example to 300 as Excel cannot display more than 8,192 characters when processing a Function using F9.
Stepping out one more function
=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
The Excel Index() function is taking the Array of Roman Numerals and Converting it into a single Column array
This isn’t technically needed but it simplifies the solution
If you goto cell D11 in the sample file =INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0) press F2 and then F9
Excel returns an array of roman numbers
={“I”;”II”;”III”;”IV”;”V”;”VI”;”VII”;”VIII”; … “CCXCVI”;”CCXCVII”;”CCXCVIII”;”CCXCIX”;”CCC”}
This is exactly the same as the previous output from the Roman() function above, Except that it is now a Single Vertical Array. This is important for the next function.
Stepping out one more function
=MATCH(A2,INDEX(ROMAN(ROW(INDIRECT(“1:3999”))),0),0)
We can see here that the Array of Roman Numerals is now being fed into a Match() function.
Match uses the Syntax =Match(Lookup value, Lookup Array, Match Type)
Match returns the position of the Lookup value within the array
So in our example
The Lookup value is A2 or our Roman Numeral MMMCCCLVII
The Lookup Array is an array of Roman Numerals from 1 to 3999
={“I”;”II”;”III”;”IV”;”V”;”VI”;”VII”;”VIII”; … “MMMCMXCV”; “MMMCMXCVI”; “MMMCMXCVII”; “MMMCMXCVIII”; “MMMCMXCIX”}
and the Match Type is 0 or an exact Match
So the Match function will lookup the value MMMCCCLVII in the array and find it in position number 3357, which happens to correspond to the Number of the Roman Numeral and Return 3357 as the result.
Why are we limited to 3999 numbers.
The Excel Roman() function is limited to numbers up to 3999
Why 3999?
Because in Roman Numerals there is no Letter for 5,000 and 4,000 would be shown as M before the Letter for 5,000.
Why did we need the Index() function?
If you goto D17 in the sample file you will see the formula:
=MATCH(A2,ROMAN(ROW(INDIRECT(“1:3999”))),0)
It is the same formula as above but without the Index() function
You will see that it is returning a #VALUE! error
If you edit the formula with F2 and then press F9 to process the function you will see it now shows 3357
What s happening here?
Pressing F9 is the same as Array Entering the Function
so if you edit the function pressing F2 and now Array Enter the function by pressing Ctrl+Shift+Enter, excel now returns 3357
The Index() function puts a wrapper around the array for processing by the Match() function and so Array Entering is avoided.
Most array formulas that require Ctrl+Shift+Enter can be rewritten incorporating an INDEX wrapper and will not require the Ctrl+Shift+Enter confirmation.
The Excel Arabic Function
In 2013, Microsoft introduced the Arabic function to Excel
To use simply use =Arabic(A2) or =Arabic(“MMMCCCLVII”)
You can read about the Syntax of the function in the Excel Help.
Download
You can download a copy of the above file and follow along, Download Sample File.
A Challenge
Can you solve the problem another way ?
Post your solutions in the comments below.
Other Posts in this Series
The Formula Forensics Series contains a wealth of useful solutions and information specifically about how Normal Formula and specifically Array Formula work.
You can learn more about how to pull Excel Formulas apart in the following posts: http://chandoo.org/wp/formula-forensics-homepage/
If you have a formula and you want to understand how it works contact Hui and it may be featured in future posts.

















27 Responses to “9 Box grid for talent mapping – HR for Excel – Template & Explanation”
Great stuff! I can understand how to add a slicer to the pivot table, but how do you implement the departmental selector on the 'Filter' formula scheme?
Just saw this on your Youtube channel, and it’s areat idea...!
An easy way to overcome the "ugliness" of pivot tables and get it to look nice (in the format of the Output sheet), would be to simply build a sheet with the nice map at the top, a pivot underneath it and a slicer next to formatted map and then reference each of the 9 cells in the formatted map to the “related” cell in the Pivot.
Keep up the good work!
/Claus
Thanks Claus. That is a great idea 🙂
Hi Chandoo,
This is great! Curious how to make additional columns operate the same as the Department column (ex. have a "manager column") that would allow you to sort a 9 box by manager, area, or team in addition to department?
Feel free to email me if needed! mfry01@minnetronixmedical.com
Happy New Year
Madison Fry
I am curious about the smae thing. I would like to populate the 9 box with other views as well by adding additional columns. IE., I would like to add location, region, etc. Thank you.
This is great, thank you!
How can i see the whole data set of all the teams in the output table. Need a formula that will pick up all the employees
Hello,
Love the template. Thank you. Question - the drop down to pick a department on the Output tab does not seem to work on the downloadable template. Am I doing something incorrectly?
Thank you!
Hi Heather... Thank you. I am using Excel 365 to make the calculations. If you are using an older version of Excel, then the drop-down filter won't work.
Hi
I was able to follow your 9 box grid and modified based my needs. However, you tutorial did not show how to you create the filter for the "Pick a department. Can you kindly share how to create that filter that updated the grid. Thank you.
I am working on this project but I am struggling with the data validation for the department. I copy the worksheets data entry and output as the managers want to see different tabs for each managers.
I updated the source reference for each tab but It does not update the grid based on the new source. The list was updated but it does not populate the grid based on the performance and potential listed.
In addition the hyperlink Update Data and View Talent Map no longer works. Can you please help me.
I keep getting this error message in the pivot table:
This formula is invalid or incomplete: 'The expression is not valid or appears to be incomplete. Please review and correct the expression.
The following syntax error occurred during parsing: Invalid token, Line 1, Offset 14, ‘.
Hi, I used your 9-box excel template with excel 365. First off, thank you so very much. It is incredibly helpful!! My only question is that the boxes aren't big enough for all of the employees (specifically the middle which we call 'Core Employee'). Is there a way to make the boxes larger? Even though it is in excel, I am not able to increase row height (like I normally do in a speadsheet). Any ideas? Thanks again, Jody
Hi Chandoo,
Thanks for the great content. Re. 9 box grid, pls advise how do I increase the size of the box to accommodate more names?
Hi Chandoo,
I figured it out. Excel 365 has the format row height on the ribbon. Thank you
Merci Chandoo pour le modèle proposé,
j'ai une question et un souhait est il possible de développer davantage ce modèle en insérant la photo de chaque employé.
Hi Chandoo!
Great tutorial and tool, thank you! Your tutorial didn't include how to create additional filters on the "Output" tab. Could you please share how you did it?
Can this be done exactly in google sheets?
Hi Chandoo,
Thanks for the video it was really helpful. Is there any way to multi select the dropdown to display multiple or all departments rather than just one at once?
Hello Prish
I have Microsoft 365 and I am struggling to make the boxes larger/unable to increase row height; any idea how you made this work? Specifically in the Output tab where the map is?
Many thanks
Hello Jody, I have Microsoft 365 and I am struggling to make the boxes larger/unable to increase row height; any idea how you made this work? Specifically in the Output tab where the map is? Many thanks
Is there a way to change the 9 box wording descriptions, i.e. Work Horses, to our own internal langauge?
You can edit the file. The descriptions are textboxes.
Hi Chandoo, this is awesome and has worked perfectly. Due to a big organisation the 9 box grid on the output file is too small. I tried adjusting using the row/width ribbon under the format ribbon however it doesn't seem to work. Is there an easier way to adjust this?
Thanks!
When I drag the formula, it doesn't work, and the order I use with the data changes. In the beginning, the order is it is " candidates," " potential," and " performance," but when it goes to another column, it is " Potential," Performance," and "Candidates."Can you help me? Thank you very much, sending love from vietnam
Hi- I am working on the 9 grid project and I am trying to expand the box since I have over 100 names on a few of the columns. How do I do that?
Hi, Thank you this is great stuff and really useful.
As well as department as demonstrated on your clip, how can I display all candidates on the grid at once?
Many thanks in advance