Nested Excel OR function

I've been working on this for an hour, and can't figure out where I'm missing parenthesis. I just want a formula that determines if cell A1 (which has a date in it) equals the months January, February, March, April, May, or June) that it returns the figure in cell A2. If cell A1 doesn't equal any of those months, it returns nothing. Hope this is enough information. Thanks.
Tim JackoboiceOwnerAsked:
Who is Participating?
 
ShumsConnect With a Mentor Distinguished Expert - 2017Commented:
Hi Try below:
=IF(OR(MONTH(A1)=1,MONTH(A1)=2,MONTH(A1)=3,MONTH(A1)=4,MONTH(A1)=5,MONTH(A1)=6),A2,"")

Open in new window

0
 
Bill PrewCommented:
Or of course:

=IF(AND(MONTH(A1)>0,MONTH(A1)<7),A2,"")

Open in new window


»bp
0
 
Tim JackoboiceOwnerAuthor Commented:
Thanks. Been working on the construction of that OR function and was using way too may parentheses!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.