Solved

Excel IF/OR formula not working.

Posted on 2016-10-17
8
72 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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 31

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 31

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
: 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…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 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