The ROMAN Function in Google Sheets

The ROMAN function in Google Sheets converts numbers into Roman numerals.

This function is particularly useful for those interested in presenting numbers in a classical style, whether for educational, historical, or aesthetic purposes.

Simple Roman Formula

đź”— Grab the template at the bottom of this article.

ROMAN Function Syntax

=ROMAN(number, [rule_relaxation])

It takes two arguments:

number: The number you want to convert to a Roman numeral. It must be a positive integer between 1 and 3999, otherwise the function returns an error.

[rule_relaxation] (optional): This determines the type of Roman numeral representation. The value ranges from 0 to 4, controlling the compactness of the numeral. The default value is 0.

Rule Relaxation

The value of the rule_relaxation argument is an integer between 0 and 4 inclusive.

It affects the form of the Roman numeral. Each successive number relaxes the rules of Roman numeral formation, leading to more compact and less traditional representations.

  1. Strict Traditional Form: Following the classic Roman numeral rules, where I may only precede V and X, V may only precede X, X may only precede L and C, L may only precede C, and C may only precede D and M. Thus 999 is represented as “CMXCIX”.
  2. Slightly Relaxed Rules: With slightly relaxed rules, 999 becomes “LMVLIV”. In this form, the numeral “L” (50) can precede “M” (1000), which is not allowed in the traditional form.
  3. More Relaxed Rules: Here, 999 is represented as “XMIX”. This form allows for “X” (10) to precede “M” (1000), making the numeral more compact.
  4. Even More Relaxed Rules: At this level, 999 is written as “VMIV”. This allows “V” (5) to precede “D” (500) and “M” (1000), further simplifying the numeral.
  5. Most Relaxed Form: In the most relaxed form, 999 is simply “IM”. This allows “I” (1) to directly precede “D” (500) and “M” (1000), resulting in the most compact version of the numeral.

Rule Relaxation Example

Using The ROMAN Function

Suppose you have the following dataset:

Roman Function Data

To convert these years into Roman numerals, use the ROMAN function as follows:

For 1950:

=ROMAN(A2)

or

=ROMAN(1950)

For 2023:

=ROMAN(A3)

For 1776:

=ROMAN(A4)

The adjacent cells will display the Roman numeral equivalents for these years:

Roman Function in Google Sheets

Other Roman Formula Ideas Examples

Combine the ROMAN function with other functions like IFERROR function or IF function, to handle invalid years and avoid errors.

For example, this IFERROR wrapper gives a helpful error message:

=IFERROR(ROMAN(5000),"Must be a positive integer between 1 and 3999 for ROMAN to work.")

whereas this IF formula with a nested OR function only converts valid numbers with the ROMAN function:

=IF(OR(A2<1,A2>3999),A2,ROMAN(A2))

Create an Historical Timeline

Creating a timeline of historical events using Roman numerals can add a unique classical touch. Use the ROMAN function alongside the dates for a distinctive presentation.

Historical Roman Timeline

ROMAN Function Template

Click here to open a view-only copy >>

Feel free to make a copy: File > Make a copy…

If you can’t access the template, it might be because of your organization’s Google Workspace settings. Right-click the link to open it in an Incognito window to view it.

It’s part of the Text family of functions in Google Sheets. You can read about it in the Google Documentation.


Leave a Reply

Your email address will not be published. Required fields are marked *