View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gizmo63
 
Posts: n/a
Default how to use the IF formula with a range of cells

Hi John,

=IF(SUMPRODUCT(--(B2:B999=J2)),"Ordered", "Not Ordered")

HTH

Giz

"JohnD" wrote:

I have a text in one cell (J2) and have to compare it with text in a range of
cells (B2:B999) to return an expression if true. I have tried using the IF
function e.g
IF(J2=B2:B28,"Ordered","Not Ordered"), but it doesn't appear to like working
with a range of cell, works fine if you I point it to a single cell. Any help
would be appreciated.