Excel AND function

How to use the Excel AND function

Description

The Excel AND function is a logical function that is used to check multiple conditions at the same time. AND returns TRUE if all conditions evaluate TRUE, otherwise it returns FALSE. AND is often used inside the IF function or combined with the OR function.

Syntax

AND( logical1, [logical2], … )

Arguments

logical1 – First condition to evaluate

logical2 – [Optional] Second condition to evaluate

Return value

TRUE if all conditions evaluate TRUE. Otherwise FALSE.

How to use the AND function in Excel

Use the AND function to check if multiple conditions are TRUE at once.

To test if the value in A1 is greater than 20 and smaller than 30, use the following formula:

= AND(A1>20,A1<30)

A common use case of the AND function is testing multiple conditions inside the IF function. For the above example, you can embed the AND function as the logical test for the IF function:

= IF(AND(A1>20,A1<30), “Good”, “Bad”)

The AND function can be easily combined with the OR function. The formula below returns TRUE if A1 > 50 and B1 equals “Done” or “In Progress”:

= AND(A1>50,OR(B1=“Done”, B1=“In Progress”))

Additional Notes

If you supply text values or empty cells as argument they will be ignored. 

Be careful: If no logical values are found the AND function will return a #VALUE error.

AND formula examples

Related Tutorials

Related Functions

How to use the Excel OR function

Excel OR function

The Excel OR function is a logical function that is used to check if at least one of multiple conditions is evaluate TRUE.

How to use the Excel IF function

Excel IF function

The Excel IF function allows you to perform a simple logical test and returns one value for a TRUE result, and another value for a FALSE result.

Share on pinterest
Pinterest
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on reddit
Reddit
Share on whatsapp
WhatsApp
Share on email
Email
Share on pinterest
Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on whatsapp
Share on email