How to Write an "AND" Statement in Excel

how to write an if statement in excel

The "AND" function in Excel tests whether two or more statements are true or false. These statements are called logical tests and are enclosed in parenthesis after the "AND" statement. A valid logical test evaluates whether a cell meets the given criteria based upon mathematical operators and the contents of the cell. For instance, "A3>85" and "B10='Giraffe'" are both valid tests because they use mathematical operators and the text inside the cell to return a true or false value. "A3 equals a B grade" and "B10 is an African animal" are invalid tests because neither uses a mathematical operator, and both require knowledge that cannot be derived from the contents of the cell alone. The "AND" function is often coupled with the "IF" function to perform an operation based on more than one qualifying condition.


Click inside the cell that

you want to contain the "AND" function.

Type "=AND" followed by a left parenthesis. This tells Excel that you are beginning an "AND" function.

Type the first logical test you want Excel to perform. Do not include a space between the parenthesis and the beginning of the statement. If your condition tests whether a certain string of text is present in a cell, the string must be put between quotation marks. For example, =AND(A3=Jones) is not a valid test; =AND(A3="Jones") is.

Type a comma after the first test, followed by another condition, if desired. You may add up to 255 logical tests in Excel 2010.

Add the closing parenthesis mark, and press "Enter." The function will return either "true" if all of the conditions are met or "false" if one or more of the conditions are not met.


Category: Forex

Similar articles: