How to Unpivot in Excel — Turn Wide Columns Into Tidy Rows
You get a report where each month (or product, or region) is its own column. It looks fine to a human, but it's useless for a pivot table, a chart, or a database. You need to unpivot it: turn those side-by-side columns into rows.
What "unpivot" actually means
This wide layout —
| Region | Jan | Feb | Mar |
|---|---|---|---|
| North | 120 | 135 | 150 |
| South | 90 | 110 | 95 |
becomes this tidy long layout —
| Region | Month | Sales |
|---|---|---|
| North | Jan | 120 |
| North | Feb | 135 |
| North | Mar | 150 |
| South | Jan | 90 |
| … | … | … |
The month names move into one column, the numbers into another. Now it pivots, filters, and charts cleanly.
The painful ways to do it in Excel
- Copy-paste by hand. Tedious, error-prone, and hopeless past a few columns.
- Power Query → Unpivot Columns. It works, but you have to learn Power Query, and it's easy to forget the exact steps next month.
- An old PivotTable trick (multiple consolidation ranges). Buried, finicky, and barely documented.
The repeatable way, step by step
- Open your wide file (CSV or Excel).
- Add an Unpivot step.
- Pick the columns to keep as-is (e.g.
Region). - Pick the columns to fold into rows (e.g.
Jan, Feb, Mar). - Name the two new columns (e.g.
MonthandSales). - Save it as a recipe.
Do it in one click with Kramata
Kramata is a free desktop app where Unpivot is a single step in a reusable recipe. No M code, no formulas — just pick which columns stay and which fold, and you're done. Your data never leaves your computer.
- Plain-language step — no Power Query to learn.
- Reproducible — same file + same recipe = identical output.
- Batch — unpivot a whole folder of files at once.
Related
A simple Power Query alternative · Merge two spreadsheets without VLOOKUP
FAQ
Is this the same as Power Query's "Unpivot Columns"? Same result, in plain language, built for non-technical users.
Can I unpivot dozens of columns at once? Yes — pick them all to fold in one step.
What about the reverse (long → wide)? That's a pivot/group-and-summarize step, also available in Kramata.