Excel AND() Function

The AND() function in excel tests the multiple sets of conditions and returns TRUE if all supplied conditions met the criterion, FALSE otherwise. You need to have a minimum of 2 conditions to check.

Syntax

AND(Logical 1, Logical 2, Logical 3, and soon..)

Parameter

Logical1 (required)- This parameter represents the first condition that needs to be checked.

Logical 2(optional)- This parameter represents the second condition, which needs to be checked.

….(optional)- It represents the other conditions that need to be checked.

Category

Logical

Return

The function returns a Boolean value TRUE, and if all arguments are true, else it returns FALSE.

Example 1

Objective: Test condition 1 and condition 2 to check whether the numbers are greater than 0 or not by using AND function.

Condition 1 Condition 2 Result Formula
11 21 TRUE  =AND(A19>0,B19>0)
1 -2 FALSE  =AND(A20>0,B20>0)

Example 2

Objective: Return TRUE if COL A is greater than COL B and COL B is less than COL C

Col A Col B Col C Result Formula
167 502 61 FALSE =AND(B131>C131,C131<D131)
903 895 967 TRUE =AND(B132>C132,C132<D132)

Example 3

Objective: Using the IF with AND function, check whether the student has passed or not. If the student has failed in 1 of the 2 subjects, then the student will be considered as Failed.

Student Name Subject 1 Subject 2 Overall Result Formula
Reeta PASS PASS PASS  =IF(AND(B26="PASS",C26="PASS"),"PASS","FAIL")
Sweta PASS FAIL FAIL  =IF(AND(B27="PASS",C27="PASS"),"PASS","FAIL")
Baani FAIL PASS FAIL  =IF(AND(B28="PASS",C28="PASS"),"PASS","FAIL")
Aditya PASS PASS PASS  =IF(AND(B29="PASS",C29="PASS"),"PASS","FAIL")



ADVERTISEMENT
ADVERTISEMENT