INDEX? MATCH?

C

Connie Martin

This is a simple formula, I know, and I wish the formula wizard was simple,
too!! Can't get it, so I need someone's help.

In cell C1 in Sheet2 I need a formula that will look at the numbers in Col.
A in the same worksheet and see if the number is in Col. C of Sheet1, and
return "Yes" if it is, and "No" if it isn't. Simple enough, I think. Thank
you. Connie
 
P

Pete_UK

Try this, Connie:

=IF(ISNA(MATCH(A2,Sheet1!C:C,0)),"No","Yes")

then copy down as required.

Hope this helps.

Pete
 
D

Dave Peterson

=isnumber(match(a1,sheet1!c:c,0))
will return True or false

=if(isnumber(match(a1,sheet1!c:c,0)),"Yes","no")
 
C

Connie Martin

This works, too! Thank you so much. Connie

Dave Peterson said:
=isnumber(match(a1,sheet1!c:c,0))
will return True or false

=if(isnumber(match(a1,sheet1!c:c,0)),"Yes","no")
 
C

Connie Martin

Thank you! This works wonderful. Found two numbers that weren't in my list!
Great! That makes life easier!! Connie
 
C

Connie Martin

Sorry, Mike, but this one gives me "No" all the way down the column which
isn't correct. Thank you for responding. I recognize your name. You've
been a help many times, and I appreciate very much you responding. Connie
 
D

Dave Peterson

Mike's formula is looking for more than one occurrence.

You could try:

=IF(COUNTIF(Sheet1!$A$1:$A$50,A1)>0,"Yes","No")
or
=IF(COUNTIF(Sheet1!$A:$A,A1)>0,"Yes","No")
 
C

Connie Martin

Thanks, Dave. These both work, as well. Amazing how many ways it can be
done! Thank you. Connie
 
S

ShaneDevenshire

Hi,

Let's go back to Mike formula and give him credit, he just wrote it wrong:

Instead of

=IF(COUNTIF(Sheet1!$A$1:$A$50,A1)>1,"Yes","No")

It should have been

=IF(COUNTIF(Sheet1!$A$1:$A$50,A1)>=1,"Yes","No")

but this could be shortened as follows:

=IF(COUNTIF(Sheet1!C:C,A1),"Yes","No")

or if an answer of 0 or FALSE is ok, where false means it wasn't found and 0
means it was:

=IF(COUNTIF(Sheet1!C:C,A1),)

or if you use the version below if 0 appears it was not found, otherwise it
was:

=COUNTIF(Sheet1!C:C,A1)

Cheers,
Shane
 

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