To apply the AND function, follow these steps:
- select the cell where you wish to display the result,
- switch to the Formula tab,
- click the Logical button,
- choose the AND function from the list,
- enter the required arguments separating them by commas.
Alternatively, you can add the AND function in one of the following ways:
- start adding the function:
- switch to the Home tab, click the Insert Function icon situated at the top toolbar and select the Additional option,
- or right-click within a selected cell and select the Insert Function option from the contextual menu,
- or click the icon situated before the formula bar,
- in the Insert Function window, select the Logical function group from the list,
- click the AND function and press the OK button,
- enter the required arguments separating them by commas.
Note: it's possible to add up to 255 arguments.
Values can be entered manually or included into the cell (or range of cells) you make reference to. The arguments must be logical values (i.e. TRUE or FALSE) or logical expressions (e.g. 10<100) that can be evaluated as TRUE or FALSE. Text values and empty cells used as arguments are ignored. 0 is interpreted as FALSE, all other numeric values are interpreted as TRUE.
When the arguments are specified, press the Enter key. The result will be displayed in the selected cell.
In our example, we test if expenses are less than revenue for each of the three months.
=AND(B2<C2,B3<C3,B4<C4)
As all the logical arguments are evaluated as TRUE, the AND function returns TRUE.
If we change the value in cell C4 so that the third condition (B4<C4) becomes FALSE, while the first and second conditions remain TRUE, the AND function returns FALSE.