View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Help simplifying IF OR formula

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.

--
Rick (MVP - Excel)


"Divya" wrote in message
...
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!