Vectorizing logical operators in Excel

kevinykuo

Suppose I have two columns

A: (TRUE, TRUE, FALSE)

B: (TRUE, FALSE, FALSE)

I want to do something like

AND(A1:A3,B1:B3) that returns (TRUE, FALSE, FALSE)

is this possible?

Dmitry Pavliv

Select, say, C1:C3, with selected cells enter formula in formula bar:

=(A1:A3)*(B1:B3)

and press CTRL+SHIFT+ENTER. Curly brackets will automatically appear at the start and end of the formula.

It produces output 1,0,0. If you want exactly TRUE/FALSE, use:

=(A1:A3)*(B1:B3)>0

also with array entry

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related