Posted to microsoft.public.excel.misc
|
|
date format in excel 2002 on win 7
Hi
Am Sun, 3 May 2020 23:34:41 +0100 schrieb anon125:
on this forum a helpful expert posted
With a value in A1:
=A1&IF(AND(A110,A1<20),"th",CHOOSE(MOD(A1,10)+1,"
th","st","nd","rd","th","th","th","th","th","th" ))
with my version i get 10 th not 10th
same with 20.
so i changed the formula 10 and 20 to 9 and 19. worked but 30th is
still 30 th!
a little bit shorter:
=A1&IF(AND(RIGHT(A1,1)="1",A1<11),"st",IF(AND(RIG HT(A1,1)="2",A1<12),"nd",IF(AND(RIGHT(A1,1)="3",A 1<13),"rd","th")))
Regards
Claus B.
Exactly what I was hoping for you FormulaWizard you! Thanks for stepping in!
--
Garry
Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public. vb.general.discussion
|