find duplicates and add some data

E

E. L.

I've got two Excel sheets containing data about employees. Sheet A
is
a complete list, and Sheet B is a shorter list with only employees
who
are in a certain job category. I need to compare the two lists--both
have Employee ID numbers as part of the data set. Where Excel finds
a
matching ID #, I would like to append the job title that appears in
Sheet B into a blank column on Sheet A.

I'm thinking this could be done with some combo of an IF statement
and
VLOOKUP, but I haven't gotten any further than that. Any help would
be greatly appreciated!
 
M

Max

One way via index/match

Assume the match col in both sheets is col B (eg: ID# col),
with the desired col to be retrieved (into sheet: A) being col C in sheet: B

In sheet: A,
Put this in C2:
=IF(ISNA(MATCH($B2,B!$B:$B,0)),"",INDEX(B!C:C,MATCH($B2,B!$B:$B,0)))
Copy C2 down as far as required to return col C* of sheet: B. Unmatched
cases
will return blanks: "".

*return col is what is specified in the indexed range,
viz. this part: .. INDEX(B!C:C

(As-is, you could just copy C2 across if you want to return cols D, E, F in
sheet: B)

Adapt to suit ..
 

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