Thread: customize date
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default customize date

=A1&MID("thstndrdth",MIN(9,2*RIGHT(A1)*(MOD(A1-11,100)2)+1),2)

Note: The basic concept behind this formula was mine, but Biff (T. Valko)
tightened it up to produce this amazingly short formula.

--
Rick (MVP - Excel)


"enrico via OfficeKB.com" <u41845@uwe wrote in message
news:961afee85525c@uwe...
i customized a cell with a now() date field so that it's date is always
updated. i also designed the cell and add a "th" word so that today would
be
shown like this: 15th. what i miss is that the first to third day doesn't
end
up with "th" but rather "st", "nd" and "rd" respectively. how will i
customize it that it will be flexible according to the date? (e.g. 1st,
2nd,
3rd, 4th, etc.)

--
Message posted via http://www.officekb.com