Sub topic 7
What happens on copy, cut, insert, and delete
This chapter assumes you can write relative, absolute, and mixed references and fill formulas with the fill handle. Here you will see how references behave when cells are copied, cut, inserted, or deleted. These actions do not follow the same rules.
Copy adjusts references, cut does not
When you copy a formula and paste it, Excel keeps the formula's relative offsets. The formula is rewritten for its new position. Relative parts shift, and parts locked with $ stay put.
Suppose C2 holds this formula:
C2: =A2*B2Copy C2 and paste it into D5. The paste is 1 column right and 3 rows down. The formula becomes =B5*C5. Both references moved by the same offset.
When you cut a cell and paste it, Excel moves the cell itself. The formula text does not change. The cell is simply in a new place.
C2: =A2*B2Cut C2 and paste it into D5. D5 still contains =A2*B2. It still points at the original A2 and B2.
| Action | Formula in the new cell | Why |
|---|---|---|
| Copy and paste | References shift by the move distance (relative parts only) | The formula is re-aimed using offsets |
| Cut and paste | References stay exactly the same | The same cell is relocated |
What happens to formulas that point at a moved cell
Cutting affects formulas elsewhere that refer to the moved cell. If D10 contains =C2*2 and you cut C2 and paste it into F8, D10 is updated to =F8*2. Excel follows the cell to its new home. This works for absolute references too, so $C$2 becomes $F$8.
Copying does not do this. The original cell stays where it is, so formulas that point at it keep pointing at it.
Inserting rows and columns
Inserting a row or column shifts existing cells. Excel adjusts every reference so it still points at the same data, whether the reference is relative or absolute.
Say D2 holds a tax calculation:
D2: =B2*$E$1If you insert a new row above row 1, the tax rate moves from E1 to E2, and the formula becomes:
D3: =B3*$E$2The dollar signs lock a reference against copying. They do not stop Excel from keeping it correct when cells shift. An absolute reference follows its data.
Ranges grow when you insert inside them. If =SUM(B2:B10) is in place and you insert a row between rows 4 and 5, the formula becomes =SUM(B2:B11). Inserting a row just above the first row of the range, or just below the last, shifts the range but does not grow it. So a new row added directly under a total range is not included. This is a frequent source of totals that miss the newest entry.
Deleting rows and columns
Deleting cells has two outcomes.
- If the deleted cells are part of a range, the range shrinks.
=SUM(B2:B10)becomes=SUM(B2:B9)after you delete row 5. - If a formula refers directly to a deleted cell, the reference breaks and shows
#REF!.
C2: =B2*$E$1Delete column E, which holds the rate in E1. The formula becomes:
C2: =B2*#REF!The result is a #REF! error. Excel cannot guess what you meant, so it marks the missing target. Undo with Ctrl+Z right away. If you have already saved and closed the file, re-enter the reference by hand.
Safer ways to copy without shifting
Sometimes you want an exact copy of a formula with no shifting. Two options help:
- Select the formula cell, click in the formula bar, copy the text, press Esc, and paste into the destination. The text is pasted as typed, so references do not change.
- Cut and paste instead of copying, when you want the formula to stay aimed at the same cells.
Quick rules to remember
- Copy: relative references shift, absolute parts stay.
- Cut: the formula text stays, and formulas pointing at the cut cell follow it.
- Insert: references adjust so they point at the same data. Ranges grow only when the insert is inside them.
- Delete: ranges shrink, and direct references to deleted cells become
#REF!.
Exercise
B2 holds the formula =A2*$D$1. You copy B2 to C4, and separately cut B2 and paste it to C4 on a fresh copy of the sheet. What formula is in C4 in each case? Then, with the original sheet, you insert a new row above row 1. What does the formula in B2 become?
Show answer
After copy: =B4$D$1, because the relative A2 shifts 1 column right and 2 rows down, and $D$1 is locked. After cut: =A2$D$1, because cutting does not change the formula text. After inserting a row above row 1, the formula (now in B3) becomes =A3$E$2... wait, only the row changes: it becomes =A3$D$2, because the inserted row moves both A2 and D1 down by one row and the column stays the same.
Exercise
A total in B12 is =SUM(B2:B11). You add a new entry by inserting a row directly below row 11. Is the new entry included in the total? How would you insert so that it is?
Show answer
No. Inserting just below the last row of a range does not extend the range. To include it, insert a row anywhere inside the range, for example between rows 10 and 11, or edit the range to B2:B12.