Q. Is it possible to swap the contents of two cells in Excel?
A. You can swap the contents of two cells in Excel if the cells are adjacent to each other. Here's how. In the example screenshot below, February is incorrectly positioned before January.
To swap the contents of cells A1 and B1 in one step, highlight cell A1 and then, while holding down the Shift key, click and drag the edge of the cell to the position between cells B1 and C1 until the green I-Beam icon appears (as circled in red below) and then release the mouse button.
February and January will switch places, or, more specifically, the word January in cell B1 will move to cell A1, while the word February in cell A1 will move to cell B1. The result is pictured below.
This trick works because holding the Shift key down while moving a cell instructs Excel to insert the cell's data, rather than overwrite the existing data. This trick works in any direction (up, down, left, or right). For example, in the screenshot below, I have positioned the I-Beam tool between cells A2 and A3 to swap the contents of cells A1 and A2.
This works with groups of cells as well. For example, in the screenshot below, I'm using the I-Beam tool to swap the Actual column with the Budget column.
About the author
J. Carlton Collins (firstname.lastname@example.org) is a technology consultant, a conference presenter, and a JofA contributing editor.
Submit a question
Do you have technology questions for this column? Or, after reading an answer, do you have a better solution? Send them to email@example.com. We regret being unable to individually answer all submitted questions.