Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / October 2006

Tip: Looking for answers? Try searching our database.

Format cells to display ordinal numbers ex 21st

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Prince of Tama - 17 Oct 2006 07:49 GMT
I would like to format numbers so that they appear as ordinals

ex
1     1st
2     2nd
3     3rd
4     4th
etc.
Biff - 17 Oct 2006 08:09 GMT
You need to use a helper cell with a formula or a VBA procedure.

Here's a formula:

A1 = 301

=A1&IF(OR(MOD(A1,100)={11,12,13}),"th",LOOKUP(--RIGHT(A1),{0,"th";1,"st";2,"nd";3,"rd";4,"th"}))

Returns: 301st

Biff

>I would like to format numbers so that they appear as ordinals
>
[quoted text clipped - 4 lines]
> 4     4th
> etc.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.