Match one column to another?

B

bobfronk

Ok, I am not an Excel person, but as the IT manager I have been asked to
help someone with a spreadsheet.

A SQL database is queried. It returns information. This all works
fine.

However, two columns return a number. I need to match this number with
a list of names. The number 1 will always match to the same person,
and so on.

What I had hoped to do is put the list of names on sheet2 and have
sheet1 replace the numerical values in the two colums with the names
that match.

How can I do this?

Thanks,
 
J

JulieD

Hi

if i'm understanding you correctly, you could use a VLOOKUP statement
if you have sheet 2 set up with column A containing the number and column B
containing the associated name

then on sheet 1 you could put a formula in a column next to the number
columns (assume that the numbers you want to replace with the names is in
column C) that said
=VLOOKUP(C2,Sheet2!$A$2:$B$100,2,false)
which means lookup the value in c2, find the number in the range in column A
of sheet 2 and return the associated information from the second column
(this formula, in the above scenario would go in D2 of sheet1), you could
then copy this formula down as far as you need to go.

Hope this helps
Cheers
JulieD
 

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