Power Query Problems

Transform Vertical Rows into Horizontal Columns with Power Query in Excel

Elise WilliamsElise Williams Nov 13, 2026 870 views

Question details

The user needs to reshape a two-column source table so that each unique Number appears once, and its related Value entries are distributed across multiple horizontal columns.

Transform Vertical Rows into Horizontal Columns with Power Query in Excel
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
The user has repeated numbers and associated values stored vertically and wants a one-row-per-number layout for easier review or reporting.
Observed behavior
The source data currently returns each number-value pair on its own vertical row; the expected output is one row per Number with values spread into side-by-side columns.
Before you start

Make sure the source range has clear headers such as Number and Value and is formatted as an Excel table before you open Power Query. The Power Query steps are completed in Microsoft Excel because WPS Office does not include the Power Query Editor.

Solution 1Recommended

Group by Number and expand the Value lists into columns with Power Query

Use this refreshable Power Query method when you have repeated numbers in rows and need one row per number with the related values spread across multiple columns.

Power Query groups the source rows by the Number column, keeps the related values in a list, and then converts that list into separate columns. This method stays linked to the source table, so new rows can be refreshed without rebuilding the transformation.

1
Load the source into Power Query

Click any cell inside the source data in Excel, go to Data > From Table/Range, confirm that the range has headers such as Number and Value, and click OK.

2
Group rows by the Number column

In the Power Query Editor, select the Number column, go to Home > Group By, set Group by to Number, enter New column name MyTable, choose Operation All Rows, and click OK.

3
Add a custom list column

Go to Add Column > Custom Column, enter New column name Values, type =Table.Column([MyTable],"Value") in the formula box, and click OK.

4
Extract and split the list into horizontal columns

Click the expand icon on the Values column, choose Extract Values, select a delimiter such as semicolon, and click OK. With the Values column still selected, go to Split Column > By Delimiter, choose Semicolon, and set Split into to Columns.

5
Remove the grouped table and load the result

Select the MyTable column, press Delete or use Home > Remove Columns, rename the split columns as needed, and click Close & Load to load the transformed table back into Excel.

Refreshable output: After the query is loaded, add new rows to the source table and use Data > Refresh All to update the horizontal layout.
Free Microsoft Office alternative

Open and share the transformed workbook in WPS Office

Power Query is a Microsoft Excel feature; after you create the horizontal layout in Excel, WPS Office is a free, lightweight alternative for opening, editing, and sharing the .xlsx result. It offers Excel format compatibility, a familiar ribbon, and seamless migration from Microsoft Office.

  1. 1. Download WPS Office: Go to the WPS Office download page and install WPS Spreadsheets.
  2. 2. Open the transformed workbook: Double-click the .xlsx file, or use Menu > Open in WPS Spreadsheets.
  3. 3. Edit and save compatibly: Make edits in the worksheet and save as .xlsx to retain Excel compatibility.
Opens and saves .xlsx files with Excel-compatible formulas, formatting, and workbook structureFree and lightweight office suite for viewing and sharing the transformed workbook without a Microsoft 365 subscriptionFamiliar ribbon and spreadsheet tools make it easy to switch from Excel to WPS SpreadsheetsSupports everyday Excel-compatible data tools, including PivotTables, sorting, filtering, and CSV importSeamless migration from Microsoft Office for existing workbooks, templates, and reports
microsoft office alternative - wps office

Frequently Asked Questions

Can I perform Power Query transformation directly in WPS Office Spreadsheets?

Power Query Editor is a Microsoft Excel feature and is not available in WPS Office. Complete the query in Excel, then open the resulting .xlsx workbook in WPS Spreadsheets to view, edit, and save it.

Why does expanding the Value column create multiple rows instead of horizontal columns?

If you choose Expand to New Rows, Power Query creates a new row for each list item. For horizontal columns, use Extract Values with a delimiter first, then use Split Column > By Delimiter and set Split into to Columns.

What should I do if my Value lists have different numbers of entries?

Power Query creates as many columns as the longest list. Rows with fewer values show null in the extra columns, which you can filter or replace in the Power Query Editor before loading.

Can the horizontal layout refresh when source rows are added?

Yes. In Excel, keep the source data in an Excel table, refresh the Power Query with Data > Refresh All, then reopen or refresh the workbook in WPS Spreadsheets to see the updated result.