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


On 25/6/06 18:23, in article
, "daddylonglegs"
wrote:


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


I get it now:

€ concatenate a 1 to the month to give 1st month
€ -1 gives last day of previous month
€ Text źn (format mmmm)converts it back to text, with just month,no date

Nice. Thanks a lot.

-Jay-