# 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.
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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,"")
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
Or of course:

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

»bp
0
OwnerAuthor Commented:
Thanks. Been working on the construction of that OR function and was using way too may parentheses!
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.