It is designed to test multiple conditions simultaneously and return TRUE only if all the conditions are met.

If any condition is not met AND will return FALSE.

The AND function is a good way to avoid complicated formulas that involve manynested IFs.

Using AND to test if a value is between two numbers

Each “logical” is a condition that must be TRUE.

The arguments provided to the AND function can be constants, cell references, or logical expressions.

Notice that text values used in comparisons must be enclosed in double quotes ("").

Using AND to test if a value is between two numbers

Otherwise, the result should be “Deny”.

IF this AND that

The worksheet below shows a variation of the example above.

The formula in cell D5 is:

Notice that the AND function isnot case-sensitive.

Using AND to test if a value is between two numbers

Because AND returns TRUE or FALSE, it is a perfect fit for conditional formatting.

Example - AND with a range

It is possible to use AND with a range of values.

In Excel 2021 or later, the formula will “just work” without special handling.

Using AND to test if a value is between two numbers

In the example above, the AND function is used inside the IF function as the logical test.

This formula will return “Pass” only if the score for all six subjects is greater than 65.

Otherwise, the result is “Fail”.

Using AND to test if a value is between two numbers

See alsoMust pass 4 out of 6 subjects.

More than one condition can be tested by nesting IF functions.

OR returns TRUEif any condition is TRUE.

The AND function with the IF function

If all conditions are FALSE, the OR function returns FALSE.

If neither is TRUE, XOR also returns FALSE.

NOT Function

The Excel NOT function returns the opposite of a given logical or Boolean value.

AND function example - If this AND that

When given TRUE, NOT returns FALSE.

When given FALSE, NOT returns TRUE.

Use the NOT function to reverse a logical value.

The AND function with the OR function

The AND function with conditional formatting

Using the AND function with a range of cells

Excel formula: Volunteer hours requirement calculation

Excel formula: Gantt chart by week

Excel formula: Value is between two numbers

Excel formula:  Highlight 3 smallest values with criteria

Excel formula: If this AND that OR that

Excel formula: Highlight dates in the next N days

Excel formula: Happy birthday message

Excel formula: Highlight values not between X and Y

Excel formula: Date is same month and year

Excel formula: Conditional formatting column is blank

Excel formula: MAP with AND and OR logic

Excel formula: Cell contains some words but not others

Excel formula: Gantt chart

Excel formula: Multiple columns are equal

Excel formula: Highlight dates between

Article image

Article image

Article image

Article image

Article image

Excel IF function

Excel OR function

Excel XOR function

Excel NOT function

Using AND to test if a value is between two numbers

The AND function with the IF function

AND function example - If this AND that

The AND function with the OR function

The AND function with conditional formatting

Using the AND function with a range of cells