IF WITH AND
Use of IF with AND Function in Excel
We can use AND function along with IF function
In this function all condition needs to be a true.
Syntax / Formula of IF with AND Function in Excel
The syntax of IF function with AND function in Microsoft Excel is below
=IF(AND(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 with AND 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 any subject then result is treated as Fail
Step 1: First create below table in your excel starting from cell range A1:H11
Step 2: Type formula =IF(AND(C2>=35,D2>=35,E2>=35,F2>=35),"PASS","FAIL") in cell H2 and press enter.
In this formula C2>=35, D2>=35, E2>=35, F2>=35 is our logical_test
[value_if_true] is "PASS"
[value_if_false] is "FAIL"
IF FUNCTION WITH AND FUNCTION |
No comments:
Post a Comment