Help simplifying IF OR formula

D

Divya

Hi,

Can I write this a better/simpler way?

IF(OR(A2=$A$1, B2 = $A$1, C2 = $A$1, D2= $A$1),1,0)

Basically comparing a range of cells to one value and returning 1 if true,
and 0 if false

Much appreciated!
 
R

Rick Rothstein

While I would go with the COUNTIF method already posted, I just thought it
interesting that this simple array-entered** formula works also...

=OR($A$1=A2:D2)

**Commit formula using Ctrl+Shift+Enter, not just Enter by itself.
 
R

Rick Rothstein

While I would go with the COUNTIF method already posted, I just thought it
interesting that this simple array-entered** formula works also...

=OR($A$1=A2:D2)

**Commit formula using Ctrl+Shift+Enter, not just Enter by itself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top