How to use if or function in excel



IF WITH OR


Use of IF Function with OR Function in Excel


We can use OR function along with IF function.
In this function only one condition needs to be a true.

Syntax / Formula of IF function with OR Function in Excel


The syntax of IF function with OR function in Microsoft Excel is below.

=IF(OR(logical_test,logical_test,logical_test,)[value_if_true],[value_if_false])

Logical Operators


We can use any of the following Logical Operators:

Symbol of Operators Meaning
= Equal to
> Greater Than
>= Greater Than or Equal to
< Less Than
<= Less Than or Equal to
<> Not Equal to



Example of IF Function with OR Function in Excel:


In this example student result pass or fail is based on below criteria.

If a student get less than 35 marks in all subject then result is treated as Fail.
If a student get less than 35 marks in one or three subject then result is treated as Pass.

Step 1: First create below table in your excel starting from cell range A1:H11

Step 2: Type formula =IF(OR(C2>=35,D2>=35,E2>=35,F2>=35),"PASS","FAIL") in cell H2 and press enter.

In this fomrula C2>=35, D2>=35, E2>=35, F2>=35 is our logical_test
[value_if_true] is "PASS"
[value_if_false] is "FAIL"

How to use if or function in excel
IF FUNCTION WITH OR FUNCTION




No comments:

Post a Comment