ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Quick way merge 2 databases using a unique field. (https://www.excelbanter.com/excel-discussion-misc-queries/248045-quick-way-merge-2-databases-using-unique-field.html)

CH

Quick way merge 2 databases using a unique field.
 
Hi Gurus,

I have 2 databases containin details of the same unique field eg serial number
Is there a simple quick way to merge them by the unique serial number if the
2 databases are found on different sheets of the same work book ?

Database 1
serial_number Field1 Field2
0001 xxx xxx
0002 xxx xxx
.. . .
.. . .
0xxx xxx xxx


Database 2
serial_number Field3 Field4
0001 xxx xxx
0002 xxx xxx
.. . .
.. . .
0xxx xxx xxx


Luke M

Quick way merge 2 databases using a unique field.
 
I believe VLOOKUP will be your new best friend.

Example:
=VLOOKUP(A2,'Database 2'!A:D,3,FALSE)

See XL help file for further detail.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"ch" wrote:

Hi Gurus,

I have 2 databases containin details of the same unique field eg serial number
Is there a simple quick way to merge them by the unique serial number if the
2 databases are found on different sheets of the same work book ?

Database 1
serial_number Field1 Field2
0001 xxx xxx
0002 xxx xxx
. . .
. . .
0xxx xxx xxx


Database 2
serial_number Field3 Field4
0001 xxx xxx
0002 xxx xxx
. . .
. . .
0xxx xxx xxx


CH

Quick way merge 2 databases using a unique field.
 
Hi Luke,

Thanks for your reply. I am familiar with VLOOKUP and I was hoping for a
more efficient way.

Trouble with VLOOKUP is that I have to create the row and column reference
for the VLOOKUP function, this can be quite tedious especially with larger
records.

Thanks anyway for your reply!


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com