Go Premium for a chance to win a PS4. Enter to Win

x
Solved

# Excel-THe If statement

Posted on 2016-10-28
Medium Priority
54 Views
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
Question by:Malibucompany

LVL 23

Accepted Solution

Ejgil Hedegaard earned 2000 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

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

Question has a verified solution.

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

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
###### Suggested Courses
Course of the Month5 days, 22 hours left to enroll