SOLVED

How do I do this?

Copper Contributor

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

@moppy1234 

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.

@Sergei Baklan 

 

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?

 

best response confirmed by moppy1234 (Copper Contributor)
Solution
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”)

@Twifoo 

 

Thank you so much!!

You’re very much welcome!
1 best response

Accepted Solutions
best response confirmed by moppy1234 (Copper Contributor)
Solution
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”)

View solution in original post