Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Comparing two columns in Microsoft Excel

I have 2 columns A & B both sorted from small to large. A has about 600 entries. B has around 300. Every number in B is included in A. What I would like to be able to do is in another column mark whether or not A is included in B.Should look like this when finished.Thanks.

    A  B  C
    1  3  N
    2  4  N
    3  7  Y
    4  8  Y
    5     N
    6     N
    7     Y
    8     Y
share|improve this question

marked as duplicate by Indrek, soandos, ChrisF, Hennes, Shinrai Oct 22 '12 at 23:09

This question was marked as an exact duplicate of an existing question.

Combine IF, IFERROR, and VLOOKUP. That's all I'm going to say, as I'm sure someone is about to link a duplicate somewhere here. – Iszi Oct 22 '12 at 21:04
Possible duplicate: – Indrek Oct 22 '12 at 21:10
up vote 0 down vote accepted

In C1 write =IF(COUNTIF(B:B,A1)>0,"Y","N") and copy it over as needed. The intent is to count the occurrences of the item in A1 in the column B:B and report 'Y' if that count is nonzero, 'N' otherwise.

share|improve this answer
As far as I can see that works great. Thanks! – Willis Oct 22 '12 at 22:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.