View Single Post
  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Tue, 8 Mar 2005 06:59:04 -0800, LyndieBee
wrote:

I'd like to be able to evaluate the current date and have the name of the
previous month display in a cell. For example if I'm in cell A1 I want the
statement to check today's date (March 8, 2005) and return last month's month
"April". Can I accomplish this with an IF statement? Any other function?
Many thanks, Lyndie


To return the previous month,

=TEXT(A1-DAY(A1),"mmmm")

To return the name of the next month:

=TEXT(A1-DAY(A1)+33-DAY(A1-DAY(A1)+32),"mmmm")

Simpler might be to just compute a date in the month, and format the cell as
"mmmm"

Then the above formulas become:

Previous month:

A1-DAY(A1)

Next month:

A1-DAY(A1)+33-DAY(A1-DAY(A1)+32)


--ron