How to convert a number to an ordinal?

I had a look at the Number Format Codes page in the LibreOffice Help. It shows a lot of useful date conversions and I was hoping it would include converting cardinals to ordinals but I don’t see that. E.g.

1 -> 1st
2 -> 2nd
3 -> 3rd

Is there a standard way of doing this in Libre Office?

Edit: I realised that the date formats I mentioned are irrelevant in the context of my question.


Use the new Fontfeatures of Linux Libertine G and Linux Biolinum G,

for Example:
Cellformat with Fontname Linux Libertine G:name=3
and FontLanguage: English(USA)

more Infos Fonts

As I read the question, it doesn’t worry about superscript letters but only about the assignment of traditional notational letter-pairs (a problem that should never have arisen taking notations of numbers as basically different from abbreviating words; cf German).

However, the assignment can be done

a) explicitly using a concatenating formula like the below suggested one


b) applying a properly defined conditional format.

You may also use the named cell styles as parameters to the STYLE function.

a) will convert the value into a text containing the “ordinal notation”. b) will leave a numeric value and only apply a format.

See attached: ask50616FreakishOrdinals001.ods

1 Like

Never had thought of this again, and nobody crtitisized the above formula for more than 7 years.
Now somebody had a close look at the topic again, and made me aware of a serious flaw (via PM).
An enhancemenrt of the formula avoiding that flaw (and an additional one) would be:
Thanks to thorough readers.
And, once again: Speakers of any English should consider to tidy up the underlying mess. Numeric information in textual representation should never try to be like a voice record.
A globally applicable solution in the given case would be the format code 0" Ð" where the codeplace U+00D0 of Ð has associated the name LATIN CAPITAL LETTER ETH.
Surely next to everybody will read this and observe my suggestion immediately. But probably we get a little war between those accepting the suggested U+00D0 and those who prefer the small letter eth (U+00F0) in the given role.
Much more urgently required would be to abandon the date-mess where even this site is a candidate for the title “inventors of the worst solution”.

And indeed, there’s a much easier solution that appeared since the time the question was asked: the format string [NatNum12 ordinal-number]0 will produce the wanted display, used either in cell format (allowing one to keep the numerical value of the cell ready for further calculations), or as the parameter to TEXT to produce a string; the solution benefits from multi-language support.

Thanks for clarifying!

Actually I now remember to have read about the feature. Must have fortgotten then again - or I disposed the memories because I’m neither exactly fond of [NatNum] in general, nor of “English” ordinals in specific.