### Excel AND Function

This Excel Tutorial demonstrates how to use the Excel AND Function in Excel to test if multiple criteria are all true, with formula examples.

## AND Function Description:

The AND Function Checks whether all conditions are met. Returns TRUE or FALSE.

## Formula Examples: Example Formula Result
No Conditions Met =AND(C5 > 5,D5 > 5) False
One Condition Met =AND(C6 > 5,D6 > 5) False
Two Conditions Met =AND(C7 > 5,D7 > 5) True
Text – Conditions Met =AND(C8 =”apples”,D8 > 5) True
Text <> Equal =AND(C9 <>“pears”,D9 > 5) True

## Syntax and Arguments:

The Syntax for the AND Formula is:

### Function Arguments ( Inputs ):

logical1 – Logical expressions. Example: A1 > 4.

Use the AND Function to simultaneously test multiple conditions. Each condition must be a logical expression (ex: a1 >5), a reference to a cell containing TRUE or FALSE, or an array containing all logical values. If all conditions are TRUE, the formula returns TRUE, otherwise it returns FALSE.

AND is a logical function and is generally used in conjunction with another logical function, IF:
The IF Function does one thing if a condition is TRUE and does another if a condition is FALSE. Often when using the AND Function you will “nest” it within an IF Formula.

You may also want to use these other logical functions:
The OR Function tests if one or more conditions are met.
The XOR Function tests if one and only one condition is met.

## AND Examples in VBA You can also use the AND function in VBA. Type:
`Application.Worksheetfunction.And(logical1,logical2)`
For the function arguments, you can either enter them directly into the function, or define variables to use instead.

`=AND(`  