Use AND function to check one or more conditions at the same time. It returns TRUE if all the supplied logical arguments meet the criteria otherwise FALSE. In other words, the function checks all the conditions supplied in the arguments and if all arguments are evaluating to TRUE, the answer returns a TRUE and in case of even one condition does not meet the criteria, it would return FALSE.
=AND(logical1, [logical2], …)
- logical1 – The first logical condition that you want to test.
- [logical2] – The second and optional logical condition to evaluate.
Useful Additional Notes:
- You can test maximum of 255 logical arguments at a time when working with 2007 or later versions. However, in Excel 2003, maximum 30 logical arguments can be tested.
- Text values and empty cells supplied in the arguments, are ignored by the function.
- If logical argument does not find any logical values to be tested, function returns #VALUE error.
- Using AND with IF function allows you to evaluate multiple logical test at a time.For example, you want to return Qualify if A1 is non blank and A2 contains value above 0, so the formula would be:
- Each logical arguments must either evaluate to TRUE or FALSE, or be the arrays or logical value’s references
- If a logical argument contains number, zero evaluates to FALSE and numbers other than 0 including negative values, evaluate to TRUE.
Examples – AND Function
Following example demonstrate the use of AND function when used it individually.
In the above example, I have supplied TRUE, a Boolean value in the first logical argument and number 1 in the second argument and when executed the function, it returned TRUE. Because TRUE is represented by 1 and FALSE by 0 in Excel.
In the next example, I used AND function to check the grade of each student in all three semester.
In the above example wherever all three logical expressions are met, function returned TRUE, FALSE otherwise back in cell.
IF | NOT | OR