Add ordinal suffix to the date like st nd rd th using excel formula

I was asked question about adding suffix like

1st June 2014
2nd June 2014  
3rd June 2014 etc


Suppose Cell A1 is the date then try the below formula to get ordinal suffix


=TEXT(A1,"d")&IFERROR(MID("1st2nd3rd21st22nd23rd31st",FIND(DAY(A1),"1st2nd3rd21st22nd23rd31st")+IF(LEN(DAY(A1))=1,1,2),2),"th")& TEXT(A1," mmm yyyy")

Comments

Popular posts from this blog

Excel formula on finding the length of numbers, letters, small letters, capital letters and special characters