Today's discovery is the existence of the ROMAN function in Googie Sheets. The basic usage is dirt simple: feed it a regular number and it spits it out in Roman numerals. For example:
=ROMAN(423) | "CDXXIII" |
As with most spreadsheet functions, you can route increasingly complex pipelines to make the spreadsheet do various maths for you. In my case I was dumping a truncated sum of various other cells into one of these like the world's worst birthday present hiding in an inoccuous wrapper, so that the Roman numeral incremented up as my total sum got bigger:
=ROMAN(TRUNC(A1-400)/100)) |
(For people who don't want to do the arithmetic, "starting with I at 500, count up by I every 100 so that 500 = I, 600 = II, 700 = III, etc")
But the page informing me I could do this revealed deeper madnesses: an optional "rule relaxation". I'm just going to quote the page directly:
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.
- 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”.
- 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.
- More Relaxed Rules: Here, 999 is represented as “XMIX”. This form allows for “X” (10) to precede “M” (1000), making the numeral more compact.
- 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.
- 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.
...The theoretical person who would not only want =ROMAN() in general but would really like their choice of five rulesets is left as an exercise for the reader. I do not doubt for a second that they're out there, even if I can't put my finger on what they'd be getting up to with this.
("But Wobbles, didn't you just–" My use case is appending ARTPG rank suffixes to automate my experience tally sheet. Nobody invented spreadsheets for this, I'm just benefitting from it.)
Note to future me: <ol start="0"> to make HTML ordered lists start in the right place.