Information Technology Topic

Move, Copy and Delete with Formulae

  1. Read notes
  2. Flashcards
  3. Quiz
  4. Confident

Study focus - 3 things

  1. Copying re-aims a formula (relative references shift, absolute ones stay), while moving relocates a cell without changing what it points to, and formulas elsewhere that pointed at the moved cell follow it
  2. Deleting the contents of a cell leaves an empty cell that counts as zero in arithmetic, but deleting the whole row or column that a formula points to gives the error #REF!
  3. After any move, copy or delete, re-check the formulas and the results: a wrong answer with no error message is the most dangerous kind

Section 1Formulas remember addresses, not values

A formula such as =B2*C2 does not store 1800. It stores the instruction 'take the cell B2, take the cell C2, multiply'. The answer is worked out again whenever B2 or C2 changes. That is why editing a spreadsheet is risky. If you copy, move or delete a cell, you may change which cells a formula is looking at, and the answers can change with it. Three actions matter for this topic: copy, move (cut and paste) and delete. Each one treats the formulas differently, and the CSEC syllabus expects you to say what happens.

Section 2Copying a formula

When you copy a formula to another cell, the original stays where it is and the new cell gets its own formula. The references inside it are re-aimed by the same distance you copied. Relative references shift. =B2+C2 in D2, copied one column to the right, becomes =C2+D2. Copied down to D5, it becomes =B5+C5. An absolute reference such as $F$1 does not shift at all. The rules for relative, absolute and mixed references have their own topic. Here's the trick for this topic: copying never touches the other cells. Only the new cell is created.

Section 3Moving a cell: the cells that use it follow it

Moving (cut and paste) takes a cell's contents out of one place and puts them in another. The old cell is left empty. Two things happen to the formulas. First, a moved formula keeps its references exactly as they were. =B2+C2 moved from D2 to F2 is still =B2+C2, and it still shows the same answer. Second, every other formula that pointed at the moved cell is updated to point at its new address. If D4 held =D2+D3 and D2 is moved to F2, D4 becomes =F2+D3 and the total does not change. This also applies to absolute references: if a rate cell $F$1 is moved to H1, formulas using it change to $H$1. Keep to single-cell references when you are working out these answers. Cell ranges are not part of what you need to predict here.

Section 4Move or copy: same destination, different result

Easy to mix up: moving and copying a formula to the same place can give very different answers. Take D2 holding =B2*C2, with B2 = 150 and C2 = 12. Move D2 to F2 and it is still =B2*C2, so it shows 1800. Copy D2 to F2 and the references shift two columns: =D2*E2. If E2 is empty, the multiplication uses zero and the cell shows 0. So before you choose, ask one question: should the formula keep pointing at the same cells (move), or should it be re-aimed at the cells beside it (copy)? Watch out: copying a formula into a place where its shifted references land on empty cells often gives 0, with no error to warn you.

Section 5Deleting the contents of a cell

Deleting the contents of a cell empties it, but the cell is still there. A formula that points at it does not break. It treats the empty cell as zero in arithmetic. For example, B2 to B4 hold 20, 30 and 50 and B5 holds =SUM(B2:B4). Delete the contents of B3 and B5 now shows 70. A cell holding =B3*2 would show 0, because the empty B3 counts as zero in the multiplication. Watch out: there is no error message. The sheet quietly gives a smaller total, and nothing on screen tells you a figure is missing. This is why you check the totals after every deletion.

Section 6Deleting a row or column: #REF!

Deleting the whole row or column is different. The cell itself is removed and the cells below (or to the right) move up (or left) to fill the gap. A formula that pointed directly at a deleted cell has nothing left to point at, so it shows the error #REF!. For example, B8 holds =B3 and the whole of row 3 is deleted. B8 moves up to B7, its formula becomes =#REF!, and the cell shows #REF!. A SUM over a range behaves more gently. If B6 holds =SUM(B2:B5) and row 3 is deleted, the total moves to B5 and the range shrinks to =SUM(B2:B4). It adds the cells that remain. Here's the trick: #REF! is the spreadsheet telling you that a reference points at something that no longer exists. Fix it by undoing the delete or by rewriting the formula.

Section 7Check after you change anything

Make a habit of checking the formulas and results after every copy, move or delete. Click the cell, read the formula bar, and ask whether it still points at the cells you meant. Look for three warning signs: an error message such as #REF!, a total that is smaller than it should be, and a result of 0 where a real answer was expected. If something goes wrong, use undo at once, before you make more changes. Then decide again whether you needed to move, copy or delete.

Examples

A Portmore tuck shop sheet has titles in row 1: Item, Price, Qty and Total. Row 2 is Patty, 150, 12, and D2 holds =B2*C2. Row 3 is Bun, 80, 20, and D3 was made by copying D2 down. D4 holds =D2+D3. (a) State the formula in D3 and the values of D2, D3 and D4. (b) D2 is moved (cut and pasted) to F2. State the formula in F2 and the new formula in D4, and say what D4 shows. (c) Suppose D2 had been copied to F2 instead, with the original left in place and E2 empty. State the formula in F2 and the value it shows.

(a) Copying D2 one row down shifts B2 to B3 and C2 to C3, so D3 holds =B3*C3. D2 = 150 × 12 = 1800. D3 = 80 × 20 = 1600. D4 = 1800 + 1600 = 3400. (b) A moved formula keeps its references, so F2 holds =B2*C2 and shows 1800. D4 pointed at D2, which has moved, so D4 is updated to =F2+D3. It still shows 1800 + 1600 = 3400. Nothing was lost. (c) Copying two columns to the right shifts B to D and C to E, so F2 holds =D2*E2. D2 holds 1800 but E2 is empty and counts as zero, so F2 shows 1800 × 0 = 0. D2 and D4 are untouched. The same destination gave 1800 for a move and 0 for a copy.

A Mandeville shop records takings in B2 to B5 for Monday to Thursday: 4200, 3800, 5100 and 2900. B6 holds =SUM(B2:B5). Lower down, B8 holds =B3 (Tuesday's takings) and B9 holds =B4 (Wednesday's takings). (a) State the values of B6, B8 and B9. (b) The contents of B3 are deleted and the row is left in place. State what B6 now shows. (c) B3 is restored. This time the whole of row 3 is deleted. State the address and formula of the total, its value, and what the cells that were B8 and B9 now contain and show. Explain the difference between B8 and B9.

(a) B6 = 4200 + 3800 + 5100 + 2900 = 16000. B8 = B3 = 3800. B9 = B4 = 5100. (b) Deleting the contents leaves B3 empty and counts as zero. B6 shows 4200 + 5100 + 2900 = 12200. There is no error message, so the missing figure is easy to overlook. (c) With the whole row removed, Wednesday moves up to row 3 and Thursday to row 4. The total moves from B6 to B5 and its range shrinks to =SUM(B2:B4), which shows 4200 + 5100 + 2900 = 12200. The cell that was B8 is now B7. It pointed at the deleted Tuesday cell, so it holds =#REF! and shows #REF!. The cell that was B9 is now B8. Wednesday moved up to B3, so its formula was updated to =B3 and it still shows 5100. B7 failed because its target was deleted, but B8 followed its target as it moved up.

Now let's water it

Session runs notes to flashcards to quiz back-to-back.

Where this comes from