How to Swap Two Cells in Excel: Step-by-Step Guide
In this article
To swap two cells in Excel, the quickest reliable method is to cut and insert: select the first cell, press Ctrl+X (Cmd+X on Mac), right-click the second cell and choose Insert Cut Cells, then repeat for the original cell. This swaps the values without overwriting anything. If you prefer dragging, hold Shift while dragging a cell border to insert it before another cell, but that shifts surrounding cells rather than performing a clean swap. The cut-and-insert method works in every modern version of Excel and is the one to learn first.
What You'll Need
- Microsoft Excel for Windows, Mac, or the web (Excel for the web has the same cut-and-insert behavior).
- Two cells (or ranges) you want to exchange, ideally with no merged cells nearby.
- Optional: a blank helper column if you prefer the copy-paste method.
Step-by-Step
- Save a copy first. Press Ctrl+S (Cmd+S on Mac) or use File > Save As to keep a backup. Swapping cells can shift surrounding data if you pick the wrong insert option, and an undo (Ctrl+Z) usually fixes it, but a saved copy removes the risk.
- Select the first cell. Click the cell you want to move. If you are swapping a range, select the whole range by dragging or by holding Shift and clicking the last cell.
- Cut the cell. Press Ctrl+X (Cmd+X on Mac) or right-click and choose Cut. The cell gets a moving dashed border. Do not press Delete; cutting keeps the value ready to insert.
- Right-click the second cell (the one you want to swap with) and choose Insert Cut Cells from the context menu. In some versions the option is labeled Insert Cut Cells only after you cut; if you see only Paste, you likely copied instead of cut. This inserts the first cell's content and pushes the second cell's content down or right, depending on your selection.
- Now move the displaced cell back. The original second cell's value has been pushed to a new location (usually one row below or one column to the right). Select that displaced cell, cut it (Ctrl+X), then right-click the original first cell's location and choose Insert Cut Cells again. The two values are now exchanged.
- Check the surrounding cells. Because Insert Cut Cells shifts cells rather than overwriting, verify that no adjacent data moved unexpectedly. If it did, press Ctrl+Z to undo and try the helper-column method below.
- Alternative: helper-column swap. In an empty column, type =A1 (where A1 is your first cell) and press Enter. Copy that formula, then use Paste Special > Values over the first cell to replace it with the second cell's value. Finally, paste the helper value into the second cell. This avoids shifting any surrounding cells and is safer when your data sits in a dense table.
- Alternative: drag with Shift. Select the first cell, hover over its border until the cursor becomes a four-headed arrow, then hold Shift and drag it onto the second cell. Release when the insert line appears. This inserts rather than swaps, so you still need to move the displaced cell back as in step 5.
Menu labels can differ slightly by Excel version, platform, and region. On Mac, the right-click menu may say Insert Cut Cells or simply Insert after a cut; on Excel for the web, the context menu uses the same wording as Windows in most builds. If you cannot find the option, use the helper-column method, which relies only on copy and paste.
Common Mistakes
- Using Copy instead of Cut. Copy leaves the original in place, so Insert Paste duplicates the value rather than moving it. Always confirm the dashed border is moving (cut), not static (copy).
- Choosing Paste instead of Insert Cut Cells. Plain Paste overwrites the destination cell and destroys its value, so the swap becomes a one-way overwrite. Use Insert Cut Cells to preserve both values.
- Swapping merged cells. Excel refuses to cut or insert merged cells in many cases. Unmerge first (Home > Merge & Center), swap, then re-merge if needed.
- Forgetting that Insert shifts cells. Insert Cut Cells pushes data down or right. In a tightly packed table this can misalign rows. The helper-column method avoids shifting entirely.
- Swapping formulas without checking references. Moving a formula can change relative references. After swapping, click each cell and confirm the formula still points where you expect, or use Paste Special > Values if you only need the result.
Tips
- Use Ctrl+Z immediately if a swap goes wrong; Excel's undo stack handles most insert and cut operations in one step.
- For repeated swaps, add a blank helper column at the edge of your table so you always have somewhere to stage values.
- If you swap often, consider using a formula-based approach with INDEX or CHOOSE in a helper area, then paste values back. This is more predictable in large sheets.
- Turn on the Status Bar sum or count before swapping numeric cells; it gives you a quick visual check that the values moved correctly.
- When swapping cells that contain comments or notes, cut and insert preserves them; copy and paste may not carry all formatting.
Troubleshooting
- The Insert Cut Cells option is grayed out. You may have copied rather than cut, or the selection includes merged cells or a protected sheet. Press Esc, re-select, cut again, and unmerge or unprotect (Review > Unprotect Sheet) if needed.
- The values swapped but formatting did not. Cut and insert moves formatting with the cell. If formatting stayed behind, you likely used Paste Special > Values. Redo with a normal cut and insert.
- Surrounding data shifted unexpectedly. Press Ctrl+Z and use the helper-column method instead, which overwrites in place without shifting.
- Excel shows a circular reference warning after the swap. A moved formula now refers to its own cell. Check the formula bar and adjust the reference, or replace the formula with a value.
- The swap does not work in Excel for the web. Some context-menu options differ. Use Ctrl+X, then right-click the target and look for Insert Cut Cells; if it is missing, use the helper-column method with copy and paste.
Frequently Asked Questions
Can I swap two cells without shifting other cells?
Yes. Use a helper column: put the first cell's value in the helper, overwrite the first cell with the second cell's value, then paste the helper value into the second cell. This overwrites in place and shifts nothing.
Does swapping cells work with formulas?
Yes, but moving a formula can change its relative references. After swapping, check each formula in the formula bar. If you only need the calculated result, use Paste Special > Values.
Why is Insert Cut Cells not available?
Common causes are copying instead of cutting, merged cells in the selection, or a protected worksheet. Press Esc, cut again, unmerge cells, or unprotect the sheet.
Can I swap two entire columns?
Yes. Select the column header, cut, then right-click the target column header and choose Insert Cut Cells. The same shifting behavior applies, so check adjacent columns afterward.
Does Excel have a built-in swap command?
No. Excel has no single Swap button. The cut-and-insert method and the helper-column method are the standard approaches.
Will swapping cells keep comments and formatting?
Cut and Insert Cut Cells carries formatting and comments with the cell. Copy and Paste Special > Values does not, so choose the method based on what you need to preserve.