View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Function to give previous month


If A1 contains "August" then "1 "&A1 will be "1 August" which excel will
evaluate as a date - 1st August in the current year, i.e. 1st August
2006.

Subtracting 1 will then give you the previous day, 31st July 2006 and
the text function will extract just the month.

You could also reverse the "1 "&A1 to A1&" 1" - you'll get the same
result


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=555357