If Statement and a List

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column with 100 names in it. Of those names, 6 are part of a
special category. The column with 100 names gets updated automatically via
macro, while the 6 names category rarely changes. If they do change, I will
manually update the list.

What I want to do is write an IF function that says, if one of the 100 names
appears in the special list of six, I want the function to return "Yes", if
not, "No".

Any suggestions?
 
Try something like this:

=IF(SUMPRODUCT(COUNTIF(A1:A8,C1:C3))>0,"Yes","No")
 
Try this:

A1:A100 = names
G1:G6 = special category names

=IF(SUMPRODUCT(--(ISNUMBER(MATCH(A1:A100,G1:G6,0)))),"Yes","No")

Biff
 
Thanks - I would like to apply this formula to each of the 100 names;
however, this formula does not refer to the cells in the list.
 
Hi Mike,

I'm not sure what you mean by this formula does not refer to the cells in
the list.

In the example I sent the A1:A8 is your long list and C1:C3 is your short
list. Just replace these with the addresses of your two ranges.

=IF(SUMPRODUCT(COUNTIF(A1:A8,C1:C3))>0,"Yes","No")

Cheers,
Shane Devenshire
 

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

Back
Top