Worksheet function with range reference

M

Marie

Hi,

I have a range of cells (R6:R100) that contains distinct
two-letter codes. I am trying to enter a function that
states something like:

If the value of cell C6 matches one of the cells listed in
the range (R6:100), display "yes" in cell H6. Otherwise,
display "no" in cell H6.

Thanks in advance, Marie
 
D

Dan E

A few options:

=IF(SUMPRODUCT((R6:R100=C6)*1)>0, "Yes", "No")

=IF(ISERROR(MATCH(C6,R6:R100,0)),"No","Yes")

=IF(ISERROR(VLOOKUP(C6,R6:R100,1,FALSE)),"No","Yes")

Dan E
 

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