Doing Math Using Roman Numerals

Written by Allen Wyatt (last updated September 28, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365


Ian has two cells (A1 and A2) in which he has Roman numerals. He would like to subtract A2 from A1, but doesn't know how to put together a formula to do it without using helper columns. Ian wonders if there is a way he can use a single formula.

The short answer is yes, this can be done. The key is to remember that Roman numerals are not numeric, but are considered text by Excel. So, before you can do any math with them, you need to convert them from their text values to numbers. Excel provides the ARABIC function to convert a Roman number to decimal, and the function returns just that—a number that you can use for math.

So, to subtract A2 from A1, you could use this formula:

=ARABIC(A1)-ARABIC(A2)

This returns a decimal value. If you want, instead, to see the result as Roman numerals, you can wrap the formula in the ROMAN function, as shown here:

=ROMAN(ARABIC(A1)-ARABIC(A2))

Understand that if your subtraction produces a negative result, then the ROMAN function will return a #VALUE! error because there is no way to represent negative values using Roman numerals. In addition, the ROMAN function will not handle a value above 3,999, but the ARABIC function will. (Go figure!)

Finally, you should be aware that the ARABIC function was introduced in Excel 2013, so if you are still using Excel 2007 or Excel 2010, you'll be out of luck. In that case, you could try a different approach, such as the following ingenious formula:

=MATCH(A1,INDEX(ROMAN(ROW(INDIRECT("1:3999"))),0),0)-
MATCH(A2,INDEX(ROMAN(ROW(INDIRECT("1:3999"))),0 ),0)

The formula converts row numbers into Roman numerals and then finds out which one matches the text that is in the cells. It produces a result in regular decimal notation. If you want it in Roman numerals, instead, then you'll need to wrap it in the ROMAN function:

=ROMAN(MATCH(A1,INDEX(ROMAN(ROW(INDIRECT("1:3999"))),0),0)-
MATCH(A2,INDEX(ROMAN(ROW(INDIRECT("1:3999"))),0 ),0))

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2698) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

AutoText Unavailable in Headers and Footers

When you are creating headers and footers for your document, you might want to use some of your AutoText entries. What if ...

Discover More

Forcing a Workbook to Close after Inactivity

Tired of your workbooks being left open on the screen where they can be seen by anyone passing by? Here's a way to have ...

Discover More

Changing the User Interface Language

Tired of Windows showing you information in English when you'd much prefer a different language? Here's how to modify the ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More ExcelTips (ribbon)

EOMONTH Function is Flakey

Some users have reported problems using the EOMONTH function in later versions of Excel, beginning with Excel 2007. The ...

Discover More

Getting the Name of the Parent Workbook

If you need to insert into a cell the name of the workbook in which a worksheet is contained, you can use the CELL ...

Discover More

Finding Unique Rows Based on Two Columns

Using the UNIQUE function you can derive unique values from a range of cells. By expanding the range of cells accessed by ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 - 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.