Data Import & Export

How to Transpose Columns into a Structured Order Sheet in Excel

Jason MillerJason Miller Nov 11, 2026 869 views

Question details

The user needs to transform source data arranged in columns into a normalized, structured order-list layout while keeping item names, codes, and quantities properly aligned and filtering out blank entries.

How to Transpose Columns into a Structured Order Sheet in Excel
Product
Excel
Device & OS
not provided
Scenario
Converting a two-dimensional data matrix into a flattened, three-column list format for simplified order processing, inventory tracking, or database importing.
Observed behavior
The current data is arranged in a grid format (columns A:C) and must be unpivoted into aligned columns (E:G) exclusively for entries with quantities, dynamically ignoring empty quantity cells.
Before you start

Verify your Excel version before proceeding; dynamic array functions like LET, TOCOL, and HSTACK require Microsoft 365 or Excel for the Web. If you are using an older desktop version, you will need to use the Power Query method instead.

Solution 1Recommended

Use Dynamic Array Formulas (LET, TOCOL, HSTACK)

Use modern Excel array functions to automatically restructure your matrix into a clean, dynamic list without manually copying and pasting.

This method utilizes advanced dynamic arrays to define data ranges, extract headers and row codes, and filter out any blank quantities in real-time. It requires Microsoft 365.

1
Select the destination cell

Click on the top-left cell of your target area (for example, E3) where you want the new structured order sheet to begin.

2
Enter the dynamic formula

Type the following formula: =LET(names,B3:C3,codes,A4:A8,data,B4:C8,filled,data<>"",HSTACK(TOCOL(IF(filled,names,""),2,TRUE),TOCOL(IF(filled,codes,""),2,TRUE),TOCOL(data,2,TRUE)))

3
Adjust the ranges to match your data

Modify the 'names' (B3:C3), 'codes' (A4:A8), and 'data' (B4:C8) parameters in the formula to exactly match the header row, identifier column, and numerical matrix area of your specific source data.

4
Generate the order sheet

Press Enter. The formula will automatically spill the data into adjacent columns and rows, perfectly aligned and with all blank quantity cells removed.

Use Dynamic Array Formulas (LET, TOCOL, HSTACK)
Dynamic Updates: Because this relies on dynamic arrays, adding or changing a quantity in the original matrix will instantly update your structured order list.
Efficient Data Reshaping with WPS

Easily Manage and Transpose Structured Data in WPS Spreadsheet

WPS Spreadsheet provides powerful tools for data transformation, including advanced functions and intuitive data management features, allowing you to reshape complex datasets smoothly.

  1. 1. Open your dataset in WPS: Launch WPS Spreadsheet and open the workbook containing your raw matrix data.
  2. 2. Apply dynamic array formulas: Select an empty destination cell and input your nested array formula to combine, filter, and transpose your data dynamically.
  3. 3. Utilize built-in data tools: Alternatively, use the comprehensive tools in the Data tab to organize, filter out blanks, and restructure your columns effectively.
100% compatible with Microsoft Excel file formats (.xlsx)Supports complex array formulas for real-time data restructuringLightweight and fast performance even with large enterprise datasetsFree to use with a familiar, user-friendly interface
microsoft office alternative - wps office

Frequently Asked Questions

What if my version of Excel doesn't support the TOCOL function?

If you are using Excel 2019 or an older desktop version, the TOCOL function is not available. You should use the Power Query method (Data > From Table/Range) to unpivot the columns and filter out blank entries instead.

How does Power Query handle new data added to the original matrix?

Power Query processes data dynamically. Once you have established your unpivot steps, simply right-click anywhere inside the generated result table and select 'Refresh' to instantly update the list with your new quantities.

Why use the LET function in the array formula?

The LET function allows you to define custom names for specific ranges (such as 'names', 'codes', and 'data') directly within the formula. This not only makes the formula easier to read and modify but also significantly improves calculation speed.

Can I place the result table on a different worksheet?

Yes. Whether you are using the dynamic array formula or the Power Query output, the structured result can be placed on an entirely different sheet within the same workbook to keep your final order list separated from the raw input matrix.