# Excel IF/OR formula not working.

Attached is a sample spreadsheet where I have an IF/OR formula that's not working.

I simply want to return a value based on today's month, which varies in different months.

No arrays, please ... I just can't figure out why the formula is not working.

Thanks!
###### Who is Participating?

Excel & VBA ExpertCommented:
In A1
``````=IF(ISNUMBER(MATCH(MONTH(TODAY()),{7,8,9},0)),120,IF(ISNUMBER(MATCH(MONTH(TODAY()),{1,2,3,4},0)),250,180))
``````
For more details, refer to the attached.
Month-Return.xlsx
0

Finance AnalystCommented:
No attachment.

In the meantime, maybe you can use:

=CHOOSE(MONTH(TODAY()),"option 1","option 2","option 3","option 4","option 5","option 6","option 7","option 8","option 9","option 10","option 11","option 12")

Thanks
Rob H
0

OwnerAuthor Commented:
0

OwnerAuthor Commented:
0

Finance AnalystCommented:
Each of the options for the OR statement have to be specified:

=IF(OR (MONTH(TODAY())=6,MONTH(TODAY())=7,MONTH(TODAY())=8),120,IF(......etc

Thanks
Rob
0

OwnerAuthor Commented:
Thanks so much to everybody. I chose the shortest and most concise formula.
0

Excel & VBA ExpertCommented:
0

Finance AnalystCommented:
Even shorter:

=IF(MONTH(TODAY())<=4,250,IF(AND(MONTH(TODAY())>=7,MONTH(TODAY())<=9),120,180))

In other words, specified amounts are:
1 to 4 = 250
7 to 9 = 120
Everything else (5, 6 10, 11 & 12)= 180
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.