Posts

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

I was asked question about adding suffix like 1 st June 2014 2 nd June 2014   3 rd 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")

Excel formula to count letters only from a given cell

=SUMPRODUCT((MID(A1,ROW(INDIRECT("A1:A"&LEN(A1))),1)>="A")*(MID(A1,ROW(INDIRECT("A1:A"&LEN(A1))),1)<="Z")) For Example If A1 = "Wor12d".~!@#$%^&*()_+{}|":<>? then this formula would return the result as 4 since there are only four letters in the cell.