Excel Workbook Fusion: Combine Workbooks with Common Column - Episode 2216

  Рет қаралды 124,254

MrExcel.com

MrExcel.com

Күн бұрын

Microsoft Excel Tutorial: Combine two workbooks with common column.
Welcome to another episode of the MrExcel Podcast, where we help you learn Excel in a fun and easy way. In today's episode, we will be discussing how to combine two workbooks based on a common column. This question comes from David, who attended one of my seminars in Melbourne, Florida. He has two different workbooks with a common column, and he wants to combine all the columns into one workbook.
To start off, we have Workbook 1 and Workbook 2, both with a product code column. However, each workbook has different items, and David wants to combine them all. I have provided both workbooks for you to follow along, so feel free to download them from the link in the description. To combine these files, we will be using Power Query, which is built into Excel 2016. If you have an older version, you can download Power Query from Microsoft's website.
First, we will open a new blank workbook and save it as "Combined Files.xlsx". Then, we will go to Data, Get Data, From File, and select the first workbook. In the preview, we will select the sheet with the data and choose Load To, Only Create Connection. We will repeat this process for the second workbook. Now, we have both connections present in the panel.
Next, we will go to Data, Get Data, Combine Queries, Merge. In the Merge dialog, we will select both connections and choose the common column, which in this case is the product code. It is important to select the correct join type, which in this case is a full join to include all rows from both files. After clicking OK, we will see the initial result, which may not look like it worked. We will then right-click on the extra column and remove it, and the combined data will appear.
It is important to note that if the underlying data changes, we can simply refresh the query to update the combined file. This is a great feature of Power Query that makes it easy to maintain the combined data. To learn more about Power Query, I highly recommend the book "M is for (DATA) MONKEY" by Ken Puls and Miguel Escobar.
In conclusion, combining two workbooks with a common column can be easily done using Power Query. Just remember to start with a blank workbook, create connections for both files, and use the merge function to combine the data. Thank you for watching this episode of the MrExcel Podcast. Don't forget to download the workbook from the link in the description and stay tuned for more helpful Excel tips and tricks. See you next time!
Buy Bill Jelen's latest Excel book: www.mrexcel.com/products/latest/
You can help my channel by clicking Like or commenting below: www.mrexcel.com/like-mrexcel-...
This video answers these common search terms:
how to combine workbooks into once excel sheet
how to combine workbooks excel
can you combine workbooks in excel
how do i combine workbooks in excel
how to combine two workbooks excel
how to combine two workbooks in excel
how to combine excel workbooks
can you combine excel workbooks?
how do i combine excel workbooks into one
how do you combine two workbooks in excel
how to combine 2 excel workbooks
how to combine 2 excel workbooks into 1
how to combine multiple workbooks into one excel
how to combine mutliple workbooks into one excel
how do you combine multiple excel books
how to combine multyple excel work books into 1 spreadsheet
can you combine multiple excel workbooks
how to combine 2 different excel workbooks
how do you combine multiple excel workbooks into one workbook
how to combined excel spreadsheets from mulitple workbooks
how to combine individual worksheets from multiple workbooks in excel
how to combine columns from two different excel sheets
Table of Contents:
(00:00) Combining Two Workbooks Based on a Common Column
(00:23) Example of the Two Workbooks
(00:33) Columns in Each Workbook
(00:43) Preparation for Combining the Files for Power Query
(00:53) Downloading Power Query for Windows 10 or 13
(01:10) Selecting the First File and Load the data
(01:32) Repeating for the Second File
(01:57) Merging the Queries
(02:13) Choosing the Common Columns and selecting join type
(02:36) Removing Unnecessary Column
(03:05) Closing and Loading the File
(03:41) Updating the Merge File
(04:37) Recommendation for Learning Power Query
(04:59) Using Power Query to Solve the Problem
(05:37) Clicking Like really helps the algorithm
David from Florida has two workbooks that he wants to combine.
Both workbooks have the same field in column A, but then different data in the remaining columns.
One workbook might have extra items that are not in the other and David wants to see those.
There are no duplicates in either file
You can use Power Query to solve this.
To download this workbook: www.mrexcel.com/download-cent...
Join the MrExcel Message Board discussion about this video at www.mrexcel.com/board/threads...

Пікірлер: 79
@MrXL
@MrXL 6 жыл бұрын
To download the workbook from today's video, use the link at the bottom of this article: www.mrexcel.com/excel-tips/combine-based-on-common-column/
@ThePhilPeterson
@ThePhilPeterson 3 жыл бұрын
How would this work if you wanted to merge 3 files instead of 2?
@MrXL
@MrXL 3 жыл бұрын
@@ThePhilPeterson After merging File 1 and File 2 into a TempResult query, you would create a connection to File 3 and then Merge TempResult with File 3.
@KassiahFaul
@KassiahFaul 2 жыл бұрын
4 years later and this is exactly what I needed! Thank you SO MUCH!
@DBuss-om8sh
@DBuss-om8sh 2 жыл бұрын
The watermelon appears, the apple change to 99 and it's a beautiful day! - You make my day with that ending, Mr. Excel! Great tutorial. Thanks
@excelisfun
@excelisfun 6 жыл бұрын
LOVE the new Thumb Nail!!!!! How cool to wake up with coffee and see you, Bill Mr Excel Jelen, on the Thumbs Nail saying Let's do cool things with Excel!!! And, yes, Power Query is amazing : )
@MrXL
@MrXL 6 жыл бұрын
Thanks Mike! I appreciate it. Zeke is going to be working on updating thumbnails for the historical videos.
@excelisfun
@excelisfun 6 жыл бұрын
Wow!!! Cool : ) I know how hard it is to do all the things necessary to run a KZbin channel, I just wish that I had someone to help me like Zeke... O, wait. Maybe Isaac can help me : )
@OzduSoleilDATA
@OzduSoleilDATA 6 жыл бұрын
"It's a beautiful thing." Indeed!
@MrXL
@MrXL 6 жыл бұрын
It is on fire!
@scottyfhf
@scottyfhf 2 ай бұрын
this saved me today
@sysyphus2000
@sysyphus2000 4 ай бұрын
Excellent help. Perfect
@andrelafreniere8604
@andrelafreniere8604 3 жыл бұрын
I like the way you explain things, you saved me lots of time. Thanks
@hollyzinda
@hollyzinda 2 жыл бұрын
Exactly what I was looking for, thank you!
@kaifhossain9150
@kaifhossain9150 8 ай бұрын
thank you very much
@MrXL
@MrXL 8 ай бұрын
You are welcome
@annew7043
@annew7043 2 жыл бұрын
I've wanted to learn this for years! So awesome, thanks so much! Was able to merge two complex datasets with thousands of rows based on an ID #.
@ABJ_007
@ABJ_007 11 ай бұрын
Thank you. Very simple and precise
@lizfirth6495
@lizfirth6495 10 ай бұрын
So Clear!! Thanks a million 😀
@albertuserwinsusanto924
@albertuserwinsusanto924 2 жыл бұрын
This is awesome! Thank you Mate! 这片视频解释得易懂,简洁!
@timsonberg8637
@timsonberg8637 Жыл бұрын
STILL useful. Thanks for the very powerful tip!
@alexandriabanks4181
@alexandriabanks4181 2 жыл бұрын
thank you. I watched hours of videos about Power Queries and Pivot Tables and none of them had what I was trying to do, simply add to workbooks together and only shared the first (name) column and with a few various there as well. thank you.
@edwarddizengoff8414
@edwarddizengoff8414 2 жыл бұрын
Thank you very much very helpful saved me lots of time!
@kennethvela2784
@kennethvela2784 4 жыл бұрын
Wow, awesomy good sir. Amazing, thanks for sharing this wonderful video
@rabindrasuwal8404
@rabindrasuwal8404 4 жыл бұрын
Thank u very much. It solved my problem that I could not able to do for years.
@toastyy4186
@toastyy4186 2 жыл бұрын
Great video man lifesaver
@kuba_p
@kuba_p Жыл бұрын
That is the key, what i was looking for! God bless you ;)
@shaikhaziz9703
@shaikhaziz9703 3 жыл бұрын
you are very nice sir, thankyou for helping us.
@Fatoum777
@Fatoum777 Жыл бұрын
Thank you 🙏
@DougHExcel
@DougHExcel 6 жыл бұрын
Power Query rocks!
@sqh365
@sqh365 Жыл бұрын
thank you!!!!!!!!!!!!!!!!
@therealoscargonzalez
@therealoscargonzalez 4 жыл бұрын
Sir, THANK YOU!!!
@haymaroo3577
@haymaroo3577 4 жыл бұрын
it helps a lot.thanks
@jokarrahmit9101
@jokarrahmit9101 Жыл бұрын
this is magic
@anshulbartwal2707
@anshulbartwal2707 Жыл бұрын
Thank you 🤍
@krn14242
@krn14242 6 жыл бұрын
Thanks Bill
@Conscience_07
@Conscience_07 3 жыл бұрын
You’re the best!!
@joymwangi269
@joymwangi269 2 жыл бұрын
very well explained
@husnainabbas9002
@husnainabbas9002 Жыл бұрын
Thanks mate
@anilyerraguntla3358
@anilyerraguntla3358 6 жыл бұрын
Thank you. It's really nice. I see you have added the extra options in u r excel bars. Can you do the detailed video of it please?
@quasipseudo1
@quasipseudo1 4 жыл бұрын
Great - Thanks. But what about 3 workbooks?
@ahmedal-dossary4386
@ahmedal-dossary4386 6 жыл бұрын
Awesome as always Bill. Day after day I see power query is kinda replace excel functions and some VBA stuff. I have tried it couple of times and it was amazing. There’s one thing odd about it, though, that it doesn’t seem to work with excel file having extension ‘xls’. I’m trying to download data from SAP related to production, sales and stock QTY and they all have one thing in common: Material number. The thing is I first need to save workbooks as ‘xlsx’ and then run query.
@MrXL
@MrXL 6 жыл бұрын
Keep this perspective in mind. Power Query has to be stored in the workbook. The XLS file format was invented in 1985 and does not have the ability to handle the storage of the query.
@jamesperry3837
@jamesperry3837 6 жыл бұрын
Anything to do with Power Query, I'm curious and I'm in. Thank you Mr. Excel.
@xlwatcher8885
@xlwatcher8885 4 жыл бұрын
The query did not work quite right. i know the queries were set and merged, because they refreshed when I changed the source. But the PowerQuery window did NOT show the additional rows in the David2 sheet. Is it necessary to turn the raw data into tables? Also I did NOT have Join type. I highlighted both the product_code column and the product column, but there was only a checkbox saying Only show matching rows. What might I have done wrong?
@kaleiperry9890
@kaleiperry9890 4 жыл бұрын
Hello dear sir, Let me tell you LET ME TELL YOU - I have been scouring google for about 2 hours trying to find a feasible solution and I kept getting vlookups or copy pastes or or or and that just wasn't going to work for 455k rows!! AND it wouldn't merge the ancillary columns + i had null values... So THANK YOU! I knew there had to be some way.... and now I don't need to throw this all into a jupyter notebook. You saved me, God bless you and thanks.
@hebrewlessons2348
@hebrewlessons2348 2 жыл бұрын
perfect!!!
@drsteele4749
@drsteele4749 6 жыл бұрын
Cool. I noticed you can refresh the query just by right-clicking anywhere in the green table in Excel and selecting Refresh. I don't know why that little refresh button is always hidden in the queries pane.
@MrXL
@MrXL 6 жыл бұрын
Great tip. Thanks!
@craioncom
@craioncom 9 ай бұрын
Genius
@denaewagner7948
@denaewagner7948 3 ай бұрын
How can I do this with over 1000 rows?
@seansethi196
@seansethi196 5 жыл бұрын
Tried several times, didn't work, noticed my "matching" column had an invisible space at the end of each entry, did a find/replace and then everything started matching. Thanks for the video, I've needed something like this for years!
@vshnurajr
@vshnurajr 4 жыл бұрын
Can you do the detailed video of with different rows
@jay_with_the_real6381
@jay_with_the_real6381 3 жыл бұрын
Thank you! So helpful. Does anyone know if this is possible and how to on google sheets?
@MrXL
@MrXL 3 жыл бұрын
I can't vouch for this site, but I used the Internet to search for "Google Sheets equivalent to Power Query" and found: spin.atomicobject.com/2019/02/22/google-sheets-query/
@teresa2334
@teresa2334 2 жыл бұрын
Anyway where I could send you my file. I'm trying to combine two tables. but I'm not finding any similar examples. I've used power query and power pivot yet it doesn't give me correct data no matter what I've tried.
@MrXL
@MrXL 2 жыл бұрын
Click on my channel name. Then About (middle of the page… third ? Tab). On the About tab, click to reveal my email address. Send me the file. I will check it Saturday morning if you send it today.
@yourmarketingmindset
@yourmarketingmindset 3 жыл бұрын
This was good, but I want to take the merged content and simply have that as a new working document. Once I merged the two docs, I no longer need the ongoing functionality. Is there a way to do that? thanks
@MrXL
@MrXL 3 жыл бұрын
Here are the steps. 1. Make sure the results are visible 2. If you can't see the Queries and Connections pane on the right side, choose Data, Queries & Connections 3. Right-click on the query name in the pane and choose Delete. Excel will warn you that you won't be able to refresh the query any more. That's exactly what you want, so click OK. 4. Optionally, if you don't want the results stored in a table, go to the Table Design tab and choose Convert to Range. (This used to be called Table Tools Design tab in older versions of Excel.)
@raitup00
@raitup00 4 жыл бұрын
MrExcel. Is it possible to combine2 tables with columns that have different names? For example: Table1 [Item] ~ Table2 [Id]. As a kind of stacked rows
@jokarrahmit9101
@jokarrahmit9101 Жыл бұрын
that's literalle the example he picked to show in the video...
@raitup00
@raitup00 Жыл бұрын
@@jokarrahmit9101 That comment was when I was starting learning Power BI and I was lost, thanks for replied 😁
@mauivacationrentalassociat8055
@mauivacationrentalassociat8055 2 жыл бұрын
Does this work with excel for mac?
@MrXL
@MrXL 2 жыл бұрын
Not yet. Microsoft is working towards letting Power Query tools work on the Mac, but they aren’t there yet.
@DIGITAL_COOKING
@DIGITAL_COOKING 6 жыл бұрын
I think the second edition of power query book you mention will be released soon
@MrXL
@MrXL 6 жыл бұрын
The second edition is planned but it won't be out until the end of 2018. The authors delayed the book to include new features announced in May 2018.
@DIGITAL_COOKING
@DIGITAL_COOKING 6 жыл бұрын
thanks for the information
@davidhansen4193
@davidhansen4193 6 жыл бұрын
Someday you will be able to upgrade your tech book from version 1.0 to version 2.0
@MrXL
@MrXL 6 жыл бұрын
That is a hot hot hot idea! How would you envision that it would work? If you own the 1st edition of a $29 book, what would you pay for the e-book of the 2nd edition? That could be a really slick feature, if the publisher could find a way to verify that you owned the first edition.
@davidhansen4193
@davidhansen4193 6 жыл бұрын
small fixes free, upgrades could be released to people who bought the first book on your website. Not sure how I would price the book upgrade.
@mattmatt245
@mattmatt245 6 жыл бұрын
Isn't this the same thing as UNION ALL in SQL ?
@rjbush7955
@rjbush7955 6 жыл бұрын
Matt yes that's right. I wish PQ used SQL instead of M. I used to use Ms query a lot. Ironically PQ was developed by the MS SQL Server team.
@mackLT1
@mackLT1 Жыл бұрын
Great video!!! But I have problems in the last step. Whhen I click close and load Excel tell me: [Data format error] We couldnt covert no number. Does anyone know where this error comes from and how to solve it? any assisatance would be extremely helpful
@MrXL
@MrXL Жыл бұрын
This usually means that one or more rows have data that is not numeric. For me, this always happens if one CSV file or Excel file has empty rows at the bottom. In the Power Query Editor, you can open a query and then click on various items in the Applied Steps box at the right side. This will show you a preview of the first 1000 records. If the problem is beyond the first 1000 rows, then back in Excel, look in the Data, Queries & Connections Pane. Does one table report an error? The "1 error" text should be clickable so you can see other data in that row.
@mackLT1
@mackLT1 Жыл бұрын
@@MrXL Thanks for the advice! it works!!!
@kelleyjohnson2391
@kelleyjohnson2391 10 ай бұрын
Your subtitles cover the bottom of the screen, so you can't see tab names.
@MrXL
@MrXL 10 ай бұрын
KZbin controls the subtitle location. On my device, they are just above the row of sheet names. One workaround is to turn of the “CC” setting for a few moments.
@justengineer6276
@justengineer6276 2 жыл бұрын
Thanks for that, I'd like to know how to link 4 or more workbooks over the year months (4+ in Jan, 4+ in Feb, 4+ in Marc, ... , 4+ in Dec) in one Output Report Form? Not combination, I'm seeking for a connection method. Currently using MSO2021. in Prev. versions there was a method to connect workboks in one master through : DATA , CONNECTION , ADD .... In2021 I can't practice that method, any ideas. Thank You.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН
FOOLED THE GUARD🤢
00:54
INO
Рет қаралды 61 МЛН
Final muy increíble 😱
00:46
Juan De Dios Pantoja 2
Рет қаралды 33 МЛН
How to Merge Excel Files (Without Using VBA) - 4 Easy Ways
9:04
Excel University
Рет қаралды 190 М.
Combine Excel Sheets the EASY Way with VSTACK
8:18
Teacher's Tech
Рет қаралды 6 М.
COMBINE Multiple Excel WORKBOOKS into One | ExcelJunction.com
5:58
Excel Junction
Рет қаралды 2,6 МЛН
How to Use VLOOKUP to Compare Two Lists
15:20
Simon Sez IT
Рет қаралды 741 М.
Consolidation in Excel (Hindi) | How to Consolidate Data in Excel
6:32
PowerEx by Jitendra
Рет қаралды 291 М.
Василиса наняла личного массажиста 😂 #shorts
00:22
Денис Кукояка
Рет қаралды 9 МЛН