logo
search
Power Query Problems

How to Combine Repeated Columns into Rows with Excel Power Query

Elise WilliamsElise Williams Oct 10, 2026 869 views

Question details

The user needs to transform horizontal form data that contains multiple repeated column groups (e.g., first name, last name, and age for multiple children) into a vertical format with a single column set and one row per child.

How to Combine Repeated Columns into Rows with Excel Power Query
Product
Microsoft Excel
Device & OS
not provided
Scenario
Organizing form response data where respondents can submit multiple records (like multiple children) in a single horizontal row, requiring it to be flattened for data analysis.
Observed behavior
The data is spread horizontally across multiple repeated columns, making it difficult to analyze, count, or filter individual records.
Before you start

Ensure your source data is formatted as an official Excel Table by pressing Ctrl + T, and verify that your column headers have clear, distinct names before opening Power Query.

Solution 1Recommended

Use Power Query to Unpivot Repeated Columns

The most efficient way to transform horizontal, repeated column sets into separate vertical rows is by using the Unpivot feature inside the Power Query Editor.

Power Query is preferable to using complex CONCAT or TEXTJOIN formulas for this task because it generates actual separate rows for each data entity, keeping your dataset structured and ready for pivot tables or charts.

1
Load Data into Power Query

Select any cell inside your data table, navigate to the Data tab on the Excel ribbon, and click 'From Table/Range'. This action opens the Power Query Editor window.

2
Select the Columns to Transform

In the Power Query Editor, hold down the Ctrl key and click the headers of all the repeated columns (e.g., Child 1 Name, Child 2 Name, Child 1 Age, Child 2 Age) that you want to flatten into rows.

3
Unpivot the Selected Columns

Right-click on one of the highlighted column headers and select 'Unpivot Columns' from the drop-down menu. Your data will instantly reformat, shifting the selected column headers into an 'Attribute' column and the row data into a 'Value' column.

4
Rename and Split Columns

Double-click the new 'Attribute' and 'Value' headers to rename them appropriately (e.g., 'Field' and 'Data'). If needed, use the 'Split Column' feature on the Home tab to separate number identifiers from text in the Attribute column.

5
Load Data Back to Excel

Once your data is correctly shaped, click the 'Close & Load' button located on the Home tab. This will export your freshly transformed, row-based data into a new worksheet.

Use Power Query to Unpivot Repeated Columns
Automated Updates: Once this Power Query connection is set up, you can simply add new form responses to your original table, right-click your new output table, and select 'Refresh' to automatically process the new rows.
Free Microsoft Office alternative

Try WPS Office for Seamless Data Management

While Power Query is a specific feature for advanced data reshaping in Excel, WPS Office provides a lightweight, highly compatible, and free alternative for managing, analyzing, and visualizing your daily spreadsheet data.

  1. 1. Download WPS Office: Visit the official WPS website and click on the 'Free Download' button.
  2. 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to set up WPS Office on your computer.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your .xlsx files directly. Enjoy seamless formatting and formula compatibility.
Fully compatible with Microsoft Excel (.xlsx, .xls) formats and formulas.Lightweight design ensures fast loading and smooth data processing even on older devices.Familiar, tabbed user interface makes it easy to transition from other spreadsheet software.Built-in pivot tables and an extensive formula library for comprehensive data analysis.
microsoft office alternative - wps office

Frequently Asked Questions

Why shouldn't I use CONCATENATE or TEXTJOIN to combine these columns?

While functions like TEXTJOIN can merge text from multiple columns into a single cell, they do not create new individual rows for each record. Power Query's Unpivot feature is strictly necessary when you need to reshape horizontal data into vertical rows for proper database structure.

Can I update the unpivoted data if new form responses are added?

Yes. Power Query creates a repeatable transformation process. Simply paste or type the new data into your original source table, navigate to your Power Query result table, right-click, and select 'Refresh' to apply the steps to the new rows.

What happens if a respondent leaves a column blank?

When unpivoting columns in Power Query, completely blank (null) cells are typically ignored by default. This means Power Query will not create an empty row for a missing entry, which automatically keeps your transformed data clean.