AND FUNCTION |
This article describes the formula syntax and usage of the AND function in MS Excel. |
Description |
Returns TRUE if all conditions evaluate to True and returns FALSE when even one of the given conditions or arguments evaluate to False.
|
Formula SYNTAX |
=AND(condition1, condition2, …
The AND Function has the following arguments: · Condition1 = Required. The first argument in the AND Function is the first condition that you want to test. It can either be evaluated to TRUE or FALSE. · Condtion2 = Not Required. This is additional condition that you want to evaluate to either TRUE or FALSE. You can have up to 255 conditions. |
REMARKS |
· The conditions defined must evaluate logical values, such as TRUE or FALSE or has array or cell references containing logical values. · Array or References that contains text or blank cells are ignored. · The AND Function will return the #VALUE! error if there are specific range that contains no logical values. |
EXAMPLE 1 |
|
=AND(5-3=2,6+2=8)
|
Returns a value TRUE because all the arguments or conditions evaluate to True.
|
=AND(10>6,5<2)
|
Returns a value FALSE because one or more conditions evaluate to False.
|
COMMON USAGE |
The AND Function is also very useful in expanding the usefulness of another logical functions. The IF Function is an example. The IF Function contains logical tests which evaluates a condition and returns one value if the conditions evaluates to TRUE and another value when the condition evaluates to FALSE. By using the AND FUNCTION, you can add more conditions on the logical_test (up to 255 conditions). |
EXAMPLE 2 |
|
=IF(AND(10+2=12,7+6=13),”CORRECT”,”WRONG”)
|
Returns a value CORRECT because all the conditions evaluate to True.
|
=IF(AND(3*2=6,5*8=9),”YES”,”NO, IT’S NOT”)
|
Returns a value NO, IT’S NOT because one or more of the conditions evaluate to False.
|
0 comments:
Post a Comment