Documentation/Calc Functions/ARABIC/en

Function name:
ARABIC

Category:
Text

Summary:
Converts a Roman numeral to its equivalent decimal number.

Syntax:
ARABIC(Text)

Returns:
Returns an integer in the range 0 ≤ n ≤ 3999 which is the decimal value that is equivalent to the specified Roman numeral.

Arguments:
Text is a text string (in quotation marks) representing a valid Roman numeral, or a reference to a cell containing such a string, that is to be converted to its equivalent decimal number.


 * Text can be an empty string, in which case ARABIC returns the value 0.
 * If not empty, Text must be a string containing a sequence of the characters "I", "V", "X", "L", "C", "D", and "M", or their lowercase equivalents. If Text is not a string, or contains any character other than those listed, then ARABIC reports an invalid argument error (Err:502).
 * If Text is a string representing a Roman numeral that corresponds to a decimal value greater than 3999, then ARABIC reports an invalid argument error (Err:502).

Additional details:
The following table lists the characters that can be used to construct a Roman numeral suitable for passing to ARABIC. Note that uppercase and lowercase characters are interchangeable.

There are various rules that can be applied to determine how a Roman numeral should be constructed and these may be strengthened or relaxed depending on circumstance. To cater for this potential flexibility, Calc’s ROMAN function has an optional Mode parameter that controls how different output strings can be obtained for the same input decimal number. When creating a string of Roman numerals for passing to the ARABIC function, the following should be kept in mind.


 * ARABIC will successfully decode any Roman numeral output from Calc's ROMAN function. The formula  is valid, and returns the value x, for any x in the range 0 <= x <= 3999 and any n in the range 0 <= n <= 4.
 * Wikipedia’s Roman numerals page includes general guidance on the construction of Roman numerals.

Related LibreOffice functions:
ROMAN

ODF standard:
Section 6.19.2, part 2

Equivalent Excel functions:
ARABIC