Swapping means two values trade places. Google Sheets has no single swap command for cells, so each kind of swap has its own shortest path. Two cells need an empty helper cell, adjacent rows need one drag, distant rows need a sort, and whole layouts need TRANSPOSE.
This page covers all four, plus what happens to formulas when you move things, and where a plain-English =FITS() formula beats every manual method.
How to Swap Two Cells in Google Sheets
Google Sheets cannot swap two cells in one step. The native way is a three-step copy and paste through an empty helper cell. It works for any two cells, adjacent or far apart.
- Click an empty cell somewhere off to the side. This is your helper cell.
- Copy the first cell (Ctrl+C or Cmd+C), then paste it into the helper cell (Ctrl+V or Cmd+V).
- Copy the second cell, and paste it over the first cell.
- Copy the helper cell, and paste it over the second cell. The two values have now traded places.
- Delete the helper cell to clean up.
Dragging does not replace this. If you drag one cell onto another, the dragged value replaces what was there, and the original content of the target is lost. Nothing trades places. That is true for ranges too, which is why the helper cell is the only safe native route for a two-cell exchange.
One caution about formulas. When you paste a value over a cell, any formula pointing at that address keeps pointing there, so it now reads the new value. If you need references to follow the data rather than the address, move cells by dragging the selection border instead of pasting. And if you swap cells all day, an Apps Script function bound to a macro (Tools > Macros > Record macro) turns the five steps into one click.
How to Swap Two Rows in Google Sheets
To swap two adjacent rows, drag. Click the number of the first row to select the whole row, hover over its header, then drag the row to the far side of the row it should trade places with. Because the two rows are next to each other, the move is exactly a swap, and no other row shifts.
To swap two rows that are far apart, dragging is the wrong tool, because every row between them shifts by one. Use a helper column instead:
- In an empty column, number the rows 1, 2, 3, and so on down your data range.
- Find the two rows you want to trade, and exchange their numbers.
- Select the data range including the helper column, then apply Data > Sort sheet, sorting by the helper column ascending.
- The two rows trade places, everything else stays put, and the helper column can be deleted.
Whole-row moves have one advantage over cell pastes: formulas that reference a moved row follow it to the new location, so totals and lookups do not break. If you need rows to end up in a data-driven order rather than a manual one, see how to rank and sort rows automatically.
How to Switch Rows in Google Sheets
Switching a row means moving it to a new position rather than exchanging two rows. Select the row by clicking its number, then drag the header up or down and drop it where it belongs. Rows in between shift by one to close the gap.
For long jumps, cut and paste is faster: select the row, cut it with Ctrl+X (or Cmd+X), right-click the destination row, and choose Insert 1 above or Insert 1 below, then paste. When many rows need a new order, the helper-column-and-sort method from the section above beats dragging them one at a time.
How to Swap Rows and Columns in Google Sheets (TRANSPOSE)
To swap rows with columns, use TRANSPOSE. The formula =TRANSPOSE(A1:D10) flips the range so rows become columns and columns become rows, and it stays live, so the flipped copy updates when the source changes.
=TRANSPOSE(A1:D10)The output range must be empty. If any cell in the way holds data, TRANSPOSE returns #REF! with the message "Array result was not expanded because it would overwrite data in..." naming the blocking cell.
For a static copy you can edit freely, skip the formula. Select the range, copy it, then right-click the destination and choose Paste special > Transposed. Google's own documentation describes it plainly: paste transposed pastes a rotated version of the copied cells, so a copied column pastes as a row. The result is unlinked values, not a live mirror.
Use the formula when the source is still changing. Use Paste special > Transposed when the flip is a one-time restructure and you want to edit the result without touching the original.
The FITS Way (Reshape, Not Just Flip)
FITS is for the reshaping cases TRANSPOSE cannot cover. Describe the target shape in plain English and it restructures the values.
=FITS("Take this comma-separated list and return each item on its own line: " & A2)It also helps when a single cell packs a whole record that you want turned into labeled fields down a column.
=FITS("Split this address into street, city, state, and zip on separate lines: " & A2)When to Use Each
| You want to | Use |
|---|---|
| Swap two cells | Copy and paste through an empty helper cell |
| Swap two adjacent rows | Drag one row header past the other |
| Swap two distant rows | Helper column with numbers, then Data > Sort sheet |
| Move one row elsewhere | Drag the row header, or cut and insert |
| Flip rows with columns, live | =TRANSPOSE(range) into empty cells |
| Flip once, then edit | Paste special > Transposed |
| Split and reshape as data moves | =FITS() with a plain-English instruction |
Manual swaps pair well with splitting names into separate fields and normalizing inconsistent data. For the full catalog of reshaping jobs, read automating Google Sheets tasks you used to need regex for.
Frequently Asked Questions
Can you swap cells in Google Sheets?
Yes, but not in one step. Google Sheets has no built-in swap command. You swap two cells by copying one value to an empty helper cell, copying the second value over the first, then copying the helper cell over the second. An Apps Script function can do it in one click if you swap often.
How do I swap two rows in Google Sheets?
For adjacent rows, select one row and drag its header to the far side of the other row. For rows far apart, add a helper column numbered 1, 2, 3, exchange the two numbers, then sort the sheet by that column with Data > Sort sheet.
Is there a keyboard shortcut to swap rows in Google Sheets?
No. Google Sheets has no built-in shortcut for swapping or moving rows. The native paths are dragging the row header, cut and paste, and the helper column plus sort method. You can record a macro under Tools > Macros to make a script repeatable.
How do I swap rows and columns in Google Sheets?
Use =TRANSPOSE(A1:D10) for a live flip that updates with the source, or copy the range and use Paste special > Transposed for a static copy you can edit freely. The formula version needs an empty output range or it returns #REF!.
How do I swap two columns in Google Sheets?
The same way you swap rows. Drag one column header next to the other for adjacent columns, cut and paste through an empty helper column for distant ones, or renumber a helper row and sort.
Why does dragging a cell onto another cell not swap them?
Dragging moves or replaces content, it does not exchange it. The target cell keeps its address and takes the dragged value, so the original value is lost unless it is still on the clipboard. That is why every cell swap method routes through a third, temporary location.
Reshape Data, Not Just Flip It
FITS restructures messy cells as they move across your sheet. Split, relabel, and reshape from one plain-English instruction. Free tier included.