# matching data between two worksheets

#### DanielG

##### New Member
Hi, I have data in two different 2 worksheets. Worksheet A contains names and registration dates, Worksheet B contains a huge list of names (a roster of employees). What I need to see is if a name from Worksheet A (in say..column A) matches a name in Worksheet B (column B), then the registration date for that person (found in Worksheet A) should be written to Worksheet B next to the matching name (column C). So if there is no match, then no date will be written. Thanks for your help!!

### Excel Facts

Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

#### big_mac

##### Board Regular
If sheetB cell B2 has the first name to match with sheetA column A with the dates in Column B then either of these formulas will work if placed in SheetB cell C2.
=VLOOKUP(SheetB!B2,SheetA!A3:B7,2,FALSE)
=INDIRECT("sheetA!b"&MATCH(SheetB!B2,SheetA!A2:A7,0))

to not show the errors if there is no matching names just do the following which is the same formula just longer because of error handling.

IF(ISERROR(VLOOKUP(SheetB!B2,SheetA!A3:B7,2,FALSE)),"",VLOOKUP(SheetB!B2,SheetA!A3:B7,2,FALSE))
=IF(ISERROR(INDIRECT("sheetA!b"&MATCH(SheetB!B2,SheetA!A2:A7,0))),"",INDIRECT("sheetA!b"&MATCH(SheetB!B2,SheetA!A2:A7,0)))

Replies
1
Views
285
Replies
6
Views
558
Replies
7
Views
304
Replies
1
Views
569
Replies
3
Views
282

1,171,686
Messages
5,876,895
Members
433,217
Latest member

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back