Excel – Comparing columns in two different excel sheets and if they match copying third column

microsoft excelmicrosoft-excel-2010worksheet-function

I have limited working knowledge of Excel and I hope someone will be able to help me with my problem.

I have two different work sheets (say F1 and F2) with last name in Column A, first name in Column B. The email address are present in Column F of F2. I need to compare the names and if the names match I need to copy the corresponding email address in to F1.

Thank you

Best Answer

If I understand your question correctly, you would like a formula that will read the first and last name on F1, locate the corresponding row on F2, and return the email address. This array formula will accomplish this. Make sure you press Ctrl+Shift+Enter when entering the formula because it is an array formula.

=INDEX('F2'!F:F, MATCH(A1&B1, 'F2'!A:A&'F2'!B:B, 0))

This assumes the following:

  • Names are located on columns A and B on F1 and F2
  • Email addresses are located in column F on F2
  • Formula is entered into sheet F1

Note that the row numbers should be changed depending on where you enter the formula (the 1's in "A1&B1".

Related Question