View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Compare and match names and extract a cell content

Are the first and last names in a single column?

If yes, then =vlookup() or =index(match()) would work nicely.

You may want to read Debra Dalgleish's notes:
http://www.contextures.com/xlFunctions02.html (for =vlookup())
and
http://www.contextures.com/xlFunctions03.html (for =index(match()))

=====
If they're in two different columns, you can use a formula like:

=index(othersheet!$c$1:$c$100,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))
(one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

dexsourcesys wrote:

Hi

I have two spreadsheets both containing first and last name field (as well
as other data elements). I would like to compare names on the two sheets and
then once a match is found copy the contents of another column (password) to
the second spreadsheet. Please let me know if any can assist with this ?


--

Dave Peterson