• Share
Send to a Friend via Email

### Your suggestion is on its way!

An email with a link to:

was emailed to:

Thanks for sharing About.com with others!

You can opt-out at any time. Please refer to our privacy policy for contact information.

# Excel Nested AND and IF Function Tutorial

## Combining the AND Function with the IF Function in Excel

Using the Excel AND Function

Note: These instructions will work for all versions of Excel from Excel 95 to Excel 2010.

Related Tutorial: Excel AND Function

The AND function is one of Excel’s Logical Functions. Like most logical functions, the output from the AND function is either the word TRUE or FALSE.

To determine whether the output will be TRUE or FALSE, the function evaluates at least one mathematical expression located in another cell in the spreadsheet.

Example AND Function

Note: This example is typed in cell C1. See the image above for help on this example.

=AND (B1>100, B2>100, B3>100)

If all three of these cells (B1,B2, and B3) contain a value greater than 100, the output for the AND function in cell C1 will be TRUE. If any of these cells have numbers less than or equal to 100, the output for the AND function will be FALSE.

### Combining the AND Function with the IF Function in Excel

By itself, the AND function has limited usefulness. By combining it with another function, such as the IF function, the AND function can increase the capabilities of your spreadsheet.

Example – Nesting the AND function inside the IF function

=IF(AND(B1>100,B2>100,B3>100),”Over Budget”,”Acceptable”)

Assuming this function is located in cell C1, if all three of these cells (B1,B2, and B3) contains a value greater than 100, the IF function will show the statement Over Budget in cell C1. If any of these three cells contain a number less than or equal to 100, the IF function shows the statement Acceptable in cell C1.

Note: In Excel 2007 / 2010, the AND function can contain a maximum of 255 expressions. For earlier versions of Excel, the limit is 30 expressions.

Related Tutorials

Ted French