Google Sheets - Logical AND between ranges

Viewed 28

How can I perform a logical AND between two ranges?

I've tried using the AND function, but it collapses the array into a single TRUE/FALSE value by performing an AND between all the cells, instead of operating pairwise between the ranges.

Example:

ARRAYFORMULA(AND(A1:B2, C1:D2))

where A1:B2 is

| | A   | B   |
|-|-----|-----|
|1|TRUE |FALSE|
|2|FALSE|TRUE |

and C1:D2 is

| | C  |  D  |
|-|----|-----|
|1|TRUE|FALSE|
|2|TRUE|FALSE|

would result in

| |  X  |  Y  |
|-|-----|-----|
|1|TRUE |FALSE|
|2|FALSE|FALSE|

But instead what happens is

| |  X  |  Y  |
|-|-----|-----|
|1|FALSE|     |
|2|     |     |
1 Answers

multiplication is the way:

=ARRAYFORMULA(A1:B2*C1:D2)

enter image description here

=INDEX(A1:B2*C1:D2=1)
Related