Ask Your Question
0

How to convert a number to an ordinal?

asked 2015-05-14 12:22:24 +0200

Justin Hellings gravatar image

updated 2015-05-14 12:45:22 +0200

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
etc...

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.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2015-05-14 12:48:57 +0200

karolus gravatar image

Hallo

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

edit flag offensive delete link more
0

answered 2015-05-14 17:32:30 +0200

Lupp gravatar image

updated 2015-05-14 21:49:11 +0200

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

=A10&IF(QUOTIENT(A10;10)=1;"th";CHOOSE(MIN(MOD(A10;10)+1;5);"th";"st";"nd";"rd";"th"))

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2015-05-14 12:22:24 +0200

Seen: 920 times

Last updated: May 14 '15