Power Query: Combine or concatenate columns in Excel
Normally, you can apply formulas to combine some columns data in Excel. Now, I will talk about how to use the Power Query to merge or concatenate two or more columns. With this feature, you can merge columns to replace original ones with one merged column, or insert a new merged column alongside the columns that are merged.
Combine or concatenate columns to replace existing columns
Combine or concatenate columns to create a new column
Combine or concatenate columns to replace existing columns
To merge multiple columns data into one column, please do with the following steps by using the Power Query:
1. Select the data range that you want to use, in Excel 2016 and Excel 2021, click Data > From Table, see screenshot:
Note: In Excel 2019 and Office 365, you should click Data > From Table/Range, see screenshot:
2. In the popped out Create Table dialog box, click OK button to create a table, see screenshot:
3. And then, in the opened Power Query Editor window, press Ctrl key to select the columns that you want to merge into one column, and then, click Transform > Merge Columns, see screenshot:
4. In the Merge Columns dialog box, specify a separator for the merged data, and then enter a new name for the merged column, see screenshot:
5. Click OK button to close the dialog box.
6. Now, you can see the selected columns are merged into single one column, and the original columns are no longer available as below screenshot shown:
7. Then, in the Power Query Editor window, click Home > Close & Load > Close & Load to load the data into a worksheet, see screenshots:
Combine or concatenate columns to create a new column
Sometimes, you may want to merge the columns but keep the original data columns as well, the Power Query also can do you a favor, please do as this:
1. Repeat the step 1 - step 2 of above method to go to the Power Query Editor window, press Ctrl key to select the columns that you want to merge into one column, and then, click Add Column > Merge Columns, see screenshot:
2. And, in the Merge Columns dialog box, specify a separator for the merged data, and then enter a new name for the merged column, and then, click OK button.
3. Now, the selected columns are merged into a new column, and the original columns are kept as well, see screenshot:
4. At last, in the Power Query Editor window, click Home > Close & Load > Close & Load to load the data into a worksheet, see screenshot:
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
