Combine Two Tables into One

Mack23

New Member
Joined
Aug 11, 2021
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have two data tables in Excel that have the same exact headings from two workbooks that I am trying to combine. When I say combine, I mean that I want to add the tables together without merging or concatenating the data. sets; having each record in each data table as being unique. I have tried using the Power Query, but without no luck. I have a feeling that I will need to have code to copy and paste one table to the workbook, then copy and paste the second table to the next empty row, but not sure what to do.

Thank you,
Mack
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Since you stated that they have the same headings in both...
Merging Queries in Power Query essentially allows you to bring data together horizontally.
Have you tried Append Query in Power Query? Since the headers are the same, it will list them vertically.
 
Upvote 0
That's what I thought but when I append the two queries that are individually pulling the source data from the two workbooks I only see the data from the first data table and nothing from the second. When I merge, It only shows the first table data only.
 
Upvote 0
Now when you say "It only shows" are you still in the Query Editor, or have you loaded it to a table on an Excel Sheet? Probably a silly question, but just making sure.
 
Upvote 0
Hmm. Well the Query Editor will only ever show the first 1000 records that make it through all of the steps.

I'm stumped without a sample set of data.
 
Upvote 0
Table 1:
DateDaily OutputAllotment MonthShiftLocation
4/15/2022​
3022​
April1stReading
4/15/2022​
2091​
April1stReading
4/15/2022​
296​
April1stReading
4/18/2022​
2516​
April1stReading
4/18/2022​
3325​
April1stReading
4/18/2022​
609​
April2ndReading
4/18/2022​
1539​
April1stReading
4/18/2022​
514​
April1stReading
4/18/2022​
3632​
April1stReading
4/18/2022​
1928​
April2ndReading
4/19/2022​
3201​
April1stReading
4/20/2022​
1469​
April1stReading

Table 2:
DateDaily OutputAllotment MonthShiftLocation
3/1/2022​
3009​
March1 stMcKeesport
3/1/2022​
3010​
March1 stMcKeesport
3/1/2022​
600​
March1 stMcKeesport
3/1/2022​
1338​
March1 stMcKeesport
3/1/2022​
3166​
March1 stMcKeesport
3/2/2022​
778​
March1 stMcKeesport
3/2/2022​
3614​
March1 stMcKeesport
3/2/2022​
3357​
March1 stMcKeesport
3/2/2022​
1400​
March1 stMcKeesport
3/2/2022​
1066​
March1 stMcKeesport
3/2/2022​
1140​
March1 stMcKeesport
3/2/2022​
926​
March1 stMcKeesport
3/2/2022​
2842​
March1 stMcKeesport
3/3/2022​
4539​
March1 stMcKeesport
3/3/2022​
730​
March1 stMcKeesport
3/3/2022​
4296​
March1 stMcKeesport
3/3/2022​
1260​
March1 stMcKeesport
3/4/2022​
2299​
March1 stMcKeesport
3/4/2022​
2626​
March1 stMcKeesport
3/7/2022​
4888​
March1 stMcKeesport
3/7/2022​
1505​
March1 stMcKeesport
3/7/2022​
3178​
March1 stMcKeesport
3/7/2022​
1820​
March1 stMcKeesport
3/8/2022​
322​
March1 stMcKeesport
3/8/2022​
1884​
March1 stMcKeesport
3/8/2022​
564​
March1 stMcKeesport
3/8/2022​
5880​
March1 stMcKeesport
3/9/2022​
1210​
March1 stMcKeesport
3/9/2022​
2412​
March1 stMcKeesport
3/9/2022​
4452​
March1 stMcKeesport

This is just a sample, but the one has about 15 lines the other table has about 140 lines.
 
Upvote 0
Is good that it is formatted as a table, correct. If not it would not be as easy for the query to connect and pull from.
 
Upvote 0
It can be a table or it can be a sheet of information. Power Query should be able to pick it up no problem.

I've just done it on my side and all works OK. I just can't provide as an excel attachment.
So in a blank Workbook, enter Power Query Editor.
Add each Sheet from the Workbooks of Data.

Then simply Amend as New.
Close & Load.
All 3 will then load into your new previously blank Workbook, Table 1, Table 2, and the Amended Query as separate tabs.
 
Upvote 0
Solution
It did it. I changed something in the source pull though. When adding the sheets, before I was adding the data table as the source, this time I added the sheet from each work book, not the data table. Hopefully this will get me what I need. I will let you know if there is anything else on this matter.

Thank you very much!
Mack
 
Upvote 0

Forum statistics

Threads
1,214,626
Messages
6,120,602
Members
448,974
Latest member
ChristineC

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