Search code examples
arraysgoogle-sheetsgoogle-sheets-formulaarray-formulas

Comparing Multiple Values with AND using ARRAYFORMULA


As part of a larger formula I need to use an AND statement to compare 2 columns. An example is a table like this:

| A | B |
|---|---|
| 1 | 4 |
| 2 | 5 |
| 3 | 6 |

The formula I'm trying is pretty simple. Basically just ARRAYFORMULA(AND(A1:A>2, B1:B>3)). My expectation is the result would be

False
False
True

But I just get False on a single line. Can you use AND in an ARRAYFORMULA?


Solution

  • AND is not supported in ARRAYFORMULA

    do:

    =ARRAYFORMULA((A1:A>2)*(B1:B>3))