← All how-to recipes

How to transpose rows to columns (or columns to rows)

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Flip data so rows become columns and columns become rows, without retyping.

The formula

AppFormulaNotes
Excel (desktop)=TRANSPOSE(A1:A3)Spills automatically in Excel 365/2021; older Excel needs Ctrl+Shift+Enter.
Google Sheets=TRANSPOSE(A1:A3)Identical; spills automatically.
LibreOffice Calc=TRANSPOSE(A1:A3)Identical; modern LibreOffice spills like Excel.

How it works

TRANSPOSE swaps the orientation of a range: a 3-row column becomes a 3-column row, and an m×n table becomes n×m. It's a live formula, so the flipped copy updates when the source changes. For a one-time flip without a formula, copy the range and use Paste Special → Transpose, which all three apps also support.

Verified, not just documented

We ran =TRANSPOSE(A1:A3) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 1, 2, 3 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 1, 2, 3 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

TRANSPOSE — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes