Combine 3 worksheets to one, have only one common column.........

itservicesmalta

New Member
Joined
Nov 24, 2017
Messages
2
Hi all,

If possible I would like to find a method of combining 3 different worksheets to one, all 3 sheets have one common column, however column fields are not in the same order in these different sheets. And there is also the possiblity that if there are 100 rows for this common column in sheet 1, there will be less in sheet 2.

Eg: Assuming that the common column is column A. Sheet 1 cell A1, is not the same as Sheet 2 cell A2 nor in sheet 3. For example sheet 1 cell A1, is equivalent to cell A4 in sheet 2.

My output file must have all the data from all sheeets combined, based on this common column.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You can create a new worksheet, then reference =Sheet1!A1 in the first cell of the new worksheet. In other columns, either reference subsequent cells in Sheet1 or use VLOOKUP to find the appropriate data in the other sheets. This method assumes that Sheet1 contains a record for every item you want to merge.
Code:
=VLOOKUP(A1, Sheet2!$A:$M, 7, False)
This will look in the data in Sheet2 (assuming you are using the first 13 columns om Sheet2), where the first column (A) of a row matches the value in this new sheet's A1 cell. It then returns the value in the seventh column for that row. The False at the end says the list on Sheet2 does not need to be sorted.

If the three sheets each contain data that might not appear on all the other sheets, then I think you will need to write a macro to merge the sheets according to the key field in column A.
 
Last edited:
Upvote 0
Thanks for your reply Nutster, unfortunately, as you had rightly said, the three sheets each contain data that might not appear on all the sheets.

By any chance is there any software that can do this for me, instead of doing a macro, as I have no clue how to do it.


By any chance is there any software that can assist me in this
You can create a new worksheet, then reference =Sheet1!A1 in the first cell of the new worksheet. In other columns, either reference subsequent cells in Sheet1 or use VLOOKUP to find the appropriate data in the other sheets. This method assumes that Sheet1 contains a record for every item you want to merge.
Code:
=VLOOKUP(A1, Sheet2!$A:$M, 7, False)
This will look in the data in Sheet2 (assuming you are using the first 13 columns om Sheet2), where the first column (A) of a row matches the value in this new sheet's A1 cell. It then returns the value in the seventh column for that row. The False at the end says the list on Sheet2 does not need to be sorted.

If the three sheets each contain data that might not appear on all the other sheets, then I think you will need to write a macro to merge the sheets according to the key field in column A.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top