AND


Explanation of the AND function

The AND function accepts up to 255 logical conditions as shown below, with each argument separated by a comma.

  1. logical1
  2. logical2… all the way up to [logical255]

How the function works

Each of your arguments (no matter how many you provide) must evaluate as TRUE in order for the AND function to return a result of TRUE.

If only 1 of your arguments is FALSE, the entire function is FALSE.

The function evaluates each of your logical conditions starting with the 1st condition, AND the next, AND the next, AND so on until it evaluates the last logical condition to determine if all of them are TRUE or not.

AND function_2

Using the AND function on its own

If you use the function on its own, it will generate a TRUE or FALSE result depending on the logical conditions you provide.

In order for the result below to be TRUE both of the following conditions must be TRUE:

  • The Yield has to be greater than or equal to 8%
  • The Price has to be less than or equal to $15

AND function example_1

Using the AND function within an IF statement

We will stick with the same example but now when our logical tests evaluate as TRUE or FALSE, we can instruct our IF statement to perform a specific action.

  • IF the dividend Yield is greater than or equal to 8% AND the price is less than or equal to $15
  • Then “Buy Shares”
  • Or else “Ignore”

AND function example_4

 

Go back to Excel Tutorials.