AND
An AND function returns TRUE only if all the conditions are TRUE and returns FALSE if one or more conditions are FALSE.
Syntax
AND(logical_test1, ...logical_test2?)
Arguments
Arguments | Data type | Description |
---|---|---|
logical_test1 | Number,text | The first condition to be evaluated. This is a required argument. |
logical_test2? | Number,text | The additional conditions to be evaluated. These are optional arguments. |
Return Value
Either True or False values that are given in the arguments.
Remarks
AND function accepts multiple conditions.
Example
Consider the below scenario in which, if the number of licenses are greater than 500 and usage period is lesser than 24 months, the price should be $20 else $25.
Particulars | Jan | Feb | Mar | Apr | May | Jun |
---|---|---|---|---|---|---|
No of Licenses | 498 | 497 | 502 | 505 | 502 | 498 |
Duration | 25 | 21 | 22 | 26 | 23 | 25 |
To achieve this, the following formula should be written in the [Price] node:
IF
(
AND
(
[No of Licenses]
>500,
[Duration]
<24),20,25)
Result
Particulars | Jan | Feb | Mar | Apr | May | Jun |
---|---|---|---|---|---|---|
Price | 25 | 25 | 20 | 25 | 20 | 25 |
As you can see, the price is 20 when both the conditions (No of licenses>500 and Duration<24) are true (in Mar and May). Even if one of the conditions is false, as seen for the other periods, the price is 25.
Last updated