Solved

Excel-THe If statement

Posted on 2016-10-28
2
43 Views
Last Modified: 2016-11-27
Having trouble with the IF statement and OR logic.   Need if(a1="A" or "B",1,0)   I get and error.  

Need help with this statement and OR logic in general.

Thank You
Dan
0
Comment
Question by:Malibucompany
[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
2 Comments
 
LVL 22

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 41864625
All functions in Excel are build the same way Function(Argument1, Argument2, Argument3, etc.)
First the function to use is set, and then follow the arguments, separated by comma.
The argument list start after ( and the function ends with ).
The IF function has 3 arguments, Condition, Do when condition is true, Do when condition is false.
The OR function can have a number of arguments, but the function itself must be specified before the arguments.
So the OR function will be like this OR(A1="A", A1="B"), and it can be continued with more arguments OR(A1="A", A1="B", A1="C", A1="D").
Even functions without arguments must have the start and end parenthesis, like PI().

Together
IF(OR(A1="A", A1="B"), 1, 0)
0
 
LVL 14

Expert Comment

by:frankhelk
ID: 41902945
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: Ejgil Hedegaard (https:#a41864625)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

728 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