SOLVED

Highlighted
New Contributor

# How do I do this?

Hi,

I'm fairly new at using commands within Excel so this might be hard to explain, but I'm trying to use a command where if today is in a certain range of months (ie. March - June), the output is yes, and if today is not in that certain range of months (ie. July - Feb), the output is no (hopefully this makes sense). What I currently have is:

=IF(AND(MONTH(3),(MONTH(4)),(MONTH(5)),(MONTH(6))),"Yes","No")

but I'm pretty sure the numbers I inputted in the MONTH command don't actually reflect the months.

Any help would be much appreciated. Thanks!

5 Replies
Highlighted

# Re: How do I do this?

It's not clear what is your source data. Expression like MONTH(5) returns month of the 5th day from previous century start, i.e. month for 05 Jan 1900, i.e. 1.

If convert month text to number it's like =MONTH(1&"May") which returns 5.

Highlighted

# Re: How do I do this?

Oh I see. Is it possible for the source data to be in real-time? Or do I have to create a set of dates and then use that as a source data?

Highlighted
Best Response confirmed by moppy1234 (New Contributor)
Solution

# Re: How do I do this?

This formula returns “Yes”, if the current month is within March to June; otherwise, it returns “No”.
=IF(OR(MONTH(TODAY())={3,4,5,6}),
“Yes”,”No”)
Highlighted

# Re: How do I do this?

Thank you so much!!

Highlighted

# Re: How do I do this?

You’re very much welcome!