ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combining data using a primary key (https://www.excelbanter.com/excel-discussion-misc-queries/122552-combining-data-using-primary-key.html)

Jamieson Bourque

Combining data using a primary key
 
I have 2 workbooks/worksheets with one column that is unique (the primary
key) that is shared across the 2 workbooks, but each workbook has some
additional columns that the other does not have and are arranged in different
order. I want to combine the data in one worksheet such that all of the data
one each individual primary key row is combined into one worksheet.

For eg:
Workbook 1:
Columns: Primary key, imaging value, test result

Workbook 2:
Columns: Primary key (with the same values as workbook 1 but in a different
order (2, 4, 1, 38, etc), stress value, coefficient

I want a worksheet that shows the imaging value, test result, stress value,
and coefficient for each individual primary key (1, 2, 3, 38, etc).

Thanks!

BethP

Combining data using a primary key
 
Vlookup...
Lookup Value= the cell address of your primary key
Array= the range you're searching (does not have to be the entire table, and
your PK needs to be the first column)
Column Index Number= The number of columns counted over from your PK that
you want the return answer from
Range= False. You'll always want False for precise returns.

Spreadsheets can get very large if you do enough of these. I'd recommend
saving Values only once you get done or as you're adding new columns.

-beth
"Jamieson Bourque" wrote:

I have 2 workbooks/worksheets with one column that is unique (the primary
key) that is shared across the 2 workbooks, but each workbook has some
additional columns that the other does not have and are arranged in different
order. I want to combine the data in one worksheet such that all of the data
one each individual primary key row is combined into one worksheet.

For eg:
Workbook 1:
Columns: Primary key, imaging value, test result

Workbook 2:
Columns: Primary key (with the same values as workbook 1 but in a different
order (2, 4, 1, 38, etc), stress value, coefficient

I want a worksheet that shows the imaging value, test result, stress value,
and coefficient for each individual primary key (1, 2, 3, 38, etc).

Thanks!



All times are GMT +1. The time now is 04:53 PM.

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