• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Names of previous three months

asajnani

New Member
Hi all,

I'm looking for way simple way to get the following information into one cell:

I need to know the month names of the previous three months.

So, if today's month is November, display text "Data is for months August, September, October."

Thanks in advance for your help!
 
Hi Sajnani ,

Will you have the month name "November" as text in a cell , or will you have a date such as 11/1/2013 ( in mm/dd/yyyy format ) ? Based on this , the formula will change.

Narayan
 
Hi Narayan,

No, I won't have any data in any cells. I want it to auto-formulate every month I open the spreadsheet.

I think I need a cross between:

=UPPER(TEXT(TODAY(), "mmm"))
=EOMONTH(TODAY(),-3)+1

But can't figure out how to join it.

Thanks!

Hi Sajnani ,

Will you have the month name "November" as text in a cell , or will you have a date such as 11/1/2013 ( in mm/dd/yyyy format ) ? Based on this , the formula will change.

Narayan
 
Hi Sajnani ,

You can use the EDATE function as follows :

=A1&TEXT(EDATE(A2,-3),"MMMM")&","&TEXT(EDATE(A2,-2),"MMMM")&","&TEXT(EDATE(A2,-1),"MMMM")&"."

A1 has the text "Data is for the months of "
A2 has the formula =TODAY()

Narayan
 
Thanks, Narayan. This definitely works!

Is there anyway to get the information into one formula without needing cells A1 and A2?

The text in A1 isn't full necessary.


Cheers!

Hi Sajnani ,

You can use the EDATE function as follows :

=A1&TEXT(EDATE(A2,-3),"MMMM")&","&TEXT(EDATE(A2,-2),"MMMM")&","&TEXT(EDATE(A2,-1),"MMMM")&"."

A1 has the text "Data is for the months of "
A2 has the formula =TODAY()

Narayan
 
Hi Sajnani ,

No problem , where ever A1 occurs , put in the text within quotes , and where ever A2 occurs , put in TODAY() , as follows :

="Data is for the months of "&TEXT(EDATE(TODAY(),-3),"MMMM")&","&TEXT(EDATE(TODAY(),-2),"MMMM")&","&TEXT(EDATE(TODAY(),-1),"MMMM")&"."

Narayan
 
In case anyone ever needs it:

="Data is for months: " &TEXT(EDATE(TODAY(),-3),"MMMM")&", "&TEXT(EDATE(TODAY(),-2),"MMMM")&", "&TEXT(EDATE(TODAY(),-1),"MMMM")&"."
 
Back
Top