Solved

Excel IF/OR formula not working.

Posted on 2016-10-17
8
67 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associateā€¦
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calculā€¦
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

790 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