The Excel AND Function
Related Function:OR Function
The Excel AND function tests a number of supplied conditions and returns a result of:
- TRUE if ALL of the conditions evaluate to TRUE
- FALSE otherwise (i.e. if ANY of the conditions evaluate to FALSE).
The syntax of the function is:
AND( logical_test1, [logical_test2], ... )
where the logical_test arguments are one or more conditions that evaluate to either TRUE or FALSE.
- In current versions of Excel (Excel 2007 and later), you can enter up to 255 logical_test arguments to the Excel And function. However, in Excel 2003, the function can only handle up to 30 arguments.
- If the logical_test arguments evaluate to numbers, instead of logical values, the value zero is treated as FALSE and all non-zero values are treated as TRUE.
Excel And Function Examples
The following spreadsheets show three examples of the Excel And function.
|1||5||10||=AND( A1>0, A1<B1 )|
|2||5||10||=AND( A2>0, A2<B2, B2>12 )|
|3||5||10||=AND( A3<0, A3>B3, B3>12 )|
Note that, in the above example spreadsheet:
- the function in cell C1 evaluates to TRUE, as BOTH of the supplied conditions are TRUE;
- the function in cell C2 evaluates to FALSE, as the third condition, B2>12, is FALSE;
- the function in cell C3 evaluates to FALSE, as ALL of the supplied conditions are FALSE.
Further details of the Excel And function are provided on the Microsoft Office website.
Excel And Function Error
If you get an error from the Excel And Function, this is likely to be the #VALUE! error:
|#VALUE!||-||Occurs if any of the supplied logical_test arguments are text values.|