Compare value to range, return matched value

T

TKD

Need help.

I have three columns of data:

Column A = Employee ID's
Column C = Employee ID's
Column D = System Name

Column C contains all company Employee ID's and Column D contains the
associated system name.

I am taking certain sets of Employee ID's and putting them in Column A. I
would like to compare each ID to the range of ID's in Column B and return the
assigned system name from column D into Column B.

Emp ID(1) Matched System Name Emp ID(2) System Name
5 Sys00005 1
Sys00001
6 Sys00006 2
Sys00002
7 Sys00007 3
Sys00003
4
Sys00004
5
Sys00005
6
Sys00006
7
Sys00007

I hope this outlines what I am looking for. The data put into column A can
vary in array length but will never be larger than the data array in column
C/D. I am sure this is easy for the experts but I have been cruising the
discussion boards and can not find a prior discussed solution.

The purpose for this is I need to search smaller sets of ID's across
thousands of company ID's to get system names which I can copy pasted into
another worksheet.

Thanks!

TKD
 
O

OssieMac

Your example is somewhat disjointed in the message (not your fault but this
occurs). If I have assembled it correctly then you should be able to place
the following formula in cell B2 (assuming that the columns headers are in
row 1 and the first cell to lookup is cell B2).

=VLOOKUP(A2,$C$1:$D$8,2)

Copy the formula down in column B
 
T

TKD

Thanks...I had tried that before, but kept getting NA error message....but I
found that if I used the TRIM function on my data being compared, and
switched to exact match, it seems to work.

Thanks!
 

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