Searching...
Saturday, August 10, 2013

Using 'AND' function in Excel

The AND function is Excel is used to perform logical tests. The power of AND function multiplies when used with 'IF' function. This tutorial will, however, cover only functionality of AND function.

The AND function returns either TRUE if all the arguments passed to it is evaluated as TRUE. It returns FALSE, if one or more passed arguments evaluate to FALSE. The syntax of AND function is as below  

AND(condition1, [condition2], ...)

At least one arguments should be passed to it and a maximum of 255 arguments can be passed. The arguments must results in either TRUE or FALSE else the function may return an error.

Take an example of data of following sheet


and an example test on the data

  

Three arguments were passed to AND function:
1<A2, which is TRUE
A2>10, this also evaluates to TRUE
and so does A3<A2. Because all arguments passed to AND evaluated to TRUE, it returns a result TRUE

Consider another example


Again, three arguments were passed to AND function:
1<A3, which evaluates to TRUE
A3>10, again a TRUE statement, 
However, condition A2=A3 evaluates to FALSE, the result returned by AND function is also FALSE.

Another example of possible conditions which can be passed to AND

 

0 comments:

Post a Comment

 
Back to top!