And() Function

The AND function is a logical function used to require more than one condition at the same time. AND returns either TRUE or FALSE. To test if a number in A1 is greater than zero and less than 10, use =AND(A1>0,A1<10). The AND function can be used as the logical test inside the IF function to avoid extra nested IFs, and can be combined with the OR function.

Syntax

The syntax for the AND function in Microsoft Excel is:

=AND( condition1, [condition2], … )

Parameters or Arguments

condition1

           The first condition to test whether it is TRUE or FALSE.

condition2, …

           Optional. Additional conditions to test whether they are TRUE or FALSE. There can be up to 30 conditions in total.

Excel And Function Examples

             The following spreadsheet shows three examples of the Excel And function:

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.