Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
Is there a function I could use that would change a column of 1,2,3,4 etc
into a column of 1st,2nd,3rd,4th etc? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
http://tinyurl.com/z6qpd Here's a post I hope will help you -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=523354 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
Perhaps you only need up to 31 but this formula will convert an integer in A1 to an ordinal number =A1&IF(OR(MOD(A1,100)={11,12,13}),"th",CHOOSE(MIN( MOD(A1,10)+1,5),"th","st","nd","rd","th")) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=523354 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
davids Copy this UDF to a general module in your workbook. Function OrdinalNumber(ByVal Num As Long) As String 'You can call this directly from a worksheet cell, as follows: '=OrdinalNumber(A1) Dim n As Long Const cSfx = "stndrdthththththth" ' 2 char suffixes n = Num Mod 100 If ((Abs(n) = 10) And (Abs(n) <= 19)) _ Or ((Abs(n) Mod 10) = 0) Then OrdinalNumber = Format(Num) & "th" Else OrdinalNumber = Format(Num) & Mid(cSfx, _ ((Abs(n) Mod 10) * 2) - 1, 2) End If End Function Gord Dibben MS Excel MVP On Thu, 16 Mar 2006 15:51:27 -0800, davids wrote: Is there a function I could use that would change a column of 1,2,3,4 etc into a column of 1st,2nd,3rd,4th etc? |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
?B?ZGF2aWRz?= wrote in
: Is there a function I could use that would change a column of 1,2,3,4 etc into a column of 1st,2nd,3rd,4th etc? Try this one: A1: 1st B1: 2nd - select A1+B1. - Klick south-east corner and drag to C3, D3, E3.... Should result in: row A1, B1, C1, etc... 1st 2nd, 3rd,etc.. -- Greetz, Just4fun |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
davids Wrote: Is there a function I could use that would change a column of 1,2,3,4 etc into a column of 1st,2nd,3rd,4th etc? It helps if you acknowlege the replies -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=523354 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date function in Excel that updates only when a doc is changed? | Excel Worksheet Functions | |||
Date Function | Excel Discussion (Misc queries) | |||
date format and the RIGHT function | Excel Worksheet Functions | |||
Date function | Excel Worksheet Functions | |||
Is there a function to show future date | Excel Worksheet Functions |