Solved

Excel IF/OR formula not working.

Posted on 2016-10-17
8
69 Views
Last Modified: 2016-10-18
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!
0
Comment
Question by:Cactus1994
  • 3
  • 3
  • 2
8 Comments
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41846849
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
 

Author Comment

by:Cactus1994
ID: 41846929
0
 

Author Comment

by:Cactus1994
ID: 41846930
(Sorry about that!)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:Rob Henson
ID: 41846965
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
 
LVL 30

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 500 total points
ID: 41847102
Please try this....
In A1
=IF(ISNUMBER(MATCH(MONTH(TODAY()),{7,8,9},0)),120,IF(ISNUMBER(MATCH(MONTH(TODAY()),{1,2,3,4},0)),250,180))

Open in new window

For more details, refer to the attached.
Month-Return.xlsx
0
 

Author Closing Comment

by:Cactus1994
ID: 41847601
Thanks so much to everybody. I chose the shortest and most concise formula.
0
 
LVL 30

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41847637
You're welcome. Glad to help.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 41847910
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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
: Microsoft Office Collaborate for free and online versions of Microsoft  Word, Excel, Powerpoint, OneNote, Onedrive , Email, Calendar etc. In short we can say that Microsoft office is a suite of servers, applications and services developed by  Micr…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question