Sub topic 5
Moving Cells with Cut and Paste or Drag
This chapter assumes you can select cells and ranges, and that you know how copying differs from moving at a basic level. It also assumes you have entered simple formulas such as =B2+C2. Here you will move cells with Cut and Paste and with drag and drop. You will see what happens to formulas during a move, and you will learn the edge cases that overwrite or break data.
Moving versus copying
A move relocates cells. The source becomes empty and the destination receives the contents, the formatting, and any comments or notes. A copy leaves the source in place and adds a duplicate.
The difference matters most for formulas. A copy adjusts relative references, as the earlier chapter showed. A move never changes the references inside the moved formula. It does change the formulas elsewhere that point at the moved cells.
Moving with Cut and Paste
- Select the cell or range.
- Press
Ctrl+X(Cmd+Xon Mac), or choose Home > Cut. - Click the top-left cell of the destination.
- Press
Ctrl+V, or pressEnter.
After you cut, a moving dashed border (the marquee) surrounds the source. The cells are not removed yet. Excel deletes them from the source only when you paste. Until then you can cancel by pressing Esc.
You only need to click one destination cell. Excel fills a block the same size as the source, starting at that cell.
Rules for a cut
- You can paste a cut only once. After the paste, the marquee disappears and the clipboard is spent. A copy can be pasted many times.
- Any other edit cancels a pending cut. If you type in a cell or apply formatting before pasting, the marquee vanishes and nothing moves.
- A cut works on one rectangular block. If you select non-adjacent areas, Excel shows "That command cannot be used on multiple selections." Cut each area separately.
- A pasted cut replaces whatever was in the destination. Excel does not warn you about this when you use
Ctrl+V.
Moving with drag and drop
Dragging moves cells without using the clipboard. It suits short moves on the same screen.
- Select the range.
- Point at an edge of the selection, not at the fill handle in the bottom-right corner. The pointer changes to a four-headed arrow.
- Hold the mouse button and drag. A tooltip shows the new address, such as
F2:F10. - Release the button.
If the destination already contains data, Excel asks "Do you want to replace the contents of the destination cells?" This prompt appears for drag and drop only. It is controlled by File > Options > Advanced > Alert before overwriting cells.
If the pointer never changes to the four-headed arrow, check that Enable fill handle and cell drag-and-drop is turned on in the same Advanced options page.
Modifier keys while dragging
| Keys held while dragging | Result |
|---|---|
| None | Moves the cells, replacing the destination (after the prompt). |
| `Ctrl` | Copies the cells. A small plus sign appears on the pointer. |
| `Shift` | Moves the cells and inserts them between existing cells, shifting neighbors aside. |
| `Alt` | Drops the cells onto another worksheet tab you hover over. |
| `Ctrl+Shift` | Copies and inserts between existing cells. |
Inserting moved cells is covered in detail in a later chapter. For now, remember that Shift turns a replacing move into a non-destructive one. Watch for the thick I-beam or line that marks the insertion point before you release.
What happens to formulas
Two cases exist, and they behave differently.
Moving a formula
A formula keeps the same references it had before the move. Suppose D2 contains =B2+C2:
Before: D2 contains =B2+C2
Copy D2 to D3 gives: =B3+C3
Cut D2 and paste to F2 gives: =B2+C2The copy shifts to row 3 because relative references follow the new position. The cut formula still points at B2 and C2, because the move changes where the formula sits, not what it refers to.
Moving cells that other formulas use
When you move a cell that other formulas reference, those formulas follow it. Suppose C5 contains =A1*2 and you cut A1 and paste it into E1:
Before: C5 contains =A1*2
Cut A1, paste to E1
After: C5 contains =E1*2The result of C5 does not change, because it still points at the same value. This tracking also works for ranges. If you cut the whole range A1:A5 and paste it at E1, a formula such as =SUM(A1:A5) becomes =SUM(E1:E5).
Tracking applies to the whole moved block. If you move only part of a referenced range, the formula does not stretch or split to match. Move the entire range when other formulas depend on it.
Tracking also works across worksheets in the same workbook. A formula on Summary that refers to Data!B2 will follow B2 if you cut and paste it elsewhere on Data.
Moving onto cells that formulas use
Tracking protects you when you move a source cell. It does not protect you when you paste onto a cell that other formulas already refer to.
If H1 contains =G1+1 and you paste a cut cell over G1, the old G1 is deleted. Formulas that pointed at it are rewritten with a #REF! error. This is the most common way to break a model by moving cells.
Before: G1 contains 50, H1 contains =G1+1
Cut A1 and paste onto G1
G1 now holds the contents of A1
Other formulas that referred to the deleted G1 can show #REF!Before you overwrite a destination, check whether anything depends on it. Select the destination cell and use Formulas > Trace Dependents. If arrows appear, move to an empty area, or insert the cells instead.
Choosing a method
Use cut and paste for long distances, other worksheets, or other workbooks. Use drag for short moves where you can see the destination.
Related behavior and edge cases
- Formatting travels with the cells. A cut moves number formats, fill colors, borders, data validation, and notes. A copy does the same by default, but Paste Special can limit what is pasted. A cut paste does not offer that choice, since the whole cell moves.
- Conditional formatting and validation may split. If you move part of a range that a rule covers, the rule's range can be divided into several pieces. Check Home > Conditional Formatting > Manage Rules afterward.
- Merged cells constrain the move. The destination block must match the layout of merged cells in the source, or Excel reports that the operation requires merged cells to be identically sized.
- Tables behave differently. You can cut cells inside a table, but table columns must remain a consistent rectangle. Moving a whole column of a table is easier with the header's column selection and Insert Cut Cells.
- Undo works.
Ctrl+Zreverses a move, including the destination contents it replaced. Run Undo before you do anything else, because the history is cleared by some actions such as running a macro. - Whole rows and columns. Selecting a row header, cutting, and pasting on another row header replaces that row entirely. To move a row while pushing other rows down, use Insert Cut Cells from the right-click menu, covered in a later chapter.
A worked example
You have a price list in A1:B10, with totals in D1:D10 computed as =B1*1.2. You want the price list to start at F1 instead.
- Select
A1:B10and pressCtrl+X. - Click
F1and pressCtrl+V. - Click
D1and read the formula. It now says=G1*1.2, because the formula tracked the moved price cells. - Select
D1:D10, drag its border toA1, and accept the overwrite prompt if shown. The formulas still read=G1*1.2,=G2*1.2, and so on.
The totals are unchanged by both moves. This is the point of reference tracking: the layout changes while the calculations stay intact.
Exercise
Cell E2 contains =B2+C2, and cell G2 contains =E2*2. You cut E2 and paste it into E6. What do E6 and G2 contain afterward, and which formula kept its original references?
Show answer
E6 contains =B2+C2, because a moved formula keeps its own references. G2 contains =E6*2, because formulas that refer to a moved cell follow it to its new address.
Exercise
You drag a range onto cells that already contain data, and no confirmation prompt appears. Name two possible reasons, and name the key that would have inserted the moved cells instead of replacing the destination.
Show answer
The setting "Alert before overwriting cells" is turned off in File > Options > Advanced, or the destination cells were empty. Holding Shift while dragging inserts the cells and shifts the neighbors aside instead of replacing them.