Discussion Locked

Excel Data Comparison - Lookup

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have two separate worksheets. Worksheet 1 contains a list of position #s (personnel). Worksheet 2 contains a list of position #s (Column A) with individual names (Column B). My task is to compare position #s in the two worksheets and when they match, copy and paste the corresponding user name from Worksheet B to Worksheet A adjacent to the appropriate position #. Any help would be appreciated.

7 replies

by doyle.cone

I sent an email to their tech support to see if their software will do the trick. If not, will get my programmer to work the solution. Thanks for your put.

by carlos

Have you tried VLOOKUP function?

It looks like this:
=Vlookup(A1,Sheet2!A1:B20,1,False)

Where "Sheet2!A1:B20" would be the range of cells that contains your table. And the third parameter is the column index of the table.

In this function column indexes start from 1.

If the #s is not found it retuns an error which i easily manage with the IsError() Function.

Hope this helps.

Carlos

by doyle.cone

Yes Carlos VLookup can get me the True, False between the two values. The real challenge, which I'm thinking will require some additional code outside Excel, is populating the name field when True. Appreciate the help.

by bschaettle

All you need to do is change Carlos' solution slightly to return the second column instead the first:

=Vlookup(A1,Sheet2!A1:B20,2,False)

This discussion is closed to new replies.