Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Format cells to display ordinal numbers ex 21st

I would like to format numbers so that they appear as ordinals

ex
1 1st
2 2nd
3 3rd
4 4th
etc.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Format cells to display ordinal numbers ex 21st

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

"Prince of Tama" <Prince of wrote in message
...
I would like to format numbers so that they appear as ordinals

ex
1 1st
2 2nd
3 3rd
4 4th
etc.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format cells to only accept numbers cradino Excel Discussion (Misc queries) 4 July 22nd 06 03:46 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
How do I sum numbers in rolling format? (4 qtrs=4 cells to left) Deb Excel Discussion (Misc queries) 2 April 19th 06 04:46 PM
Numbers -format cells Bonbon Excel Worksheet Functions 4 March 7th 06 02:54 PM
Format cells to display truncated values? Mike Excel Discussion (Misc queries) 2 December 7th 04 10:13 PM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"