Google

Tuesday, February 26, 2008

Copying Formulas

Sometimes when we enter a formula, we need to repeat the same formula for many different cells. In the spreadsheet we can use the copy and paste command. The cell locations in the formula are pasted relative to the position we Copy them from.


ABC
153=A1+B1
282=A2+B2
346=A3+B3
438=? + ?
Cells information is copied from its relative position. In other words in the original cell (C1) the equation was (A1+B1). When we paste the function it will look to the two cells to the left. So the equation pasted into (C2) would be (A2+B2). And the equation pasted into (C3) would be (A3+B3).

If you have a lot of duplicate formulas you can also perform what is referred to as a FILL DOWN. (discussed next).

Fill Down

Often we have several cells that need the same formula (in relationship) to the location it is to be typed into. There is a short cut that is called Fill Down. There are a number of ways to perform this operation. One of the ways is to

  1. select the cell that has the original formula
  2. hold the shift key down and click on the last cell (in the series that needs the formula)
  3. under the edit menu go down to fill and over to down

ABC
153=A1+B1
282 fill down
346fill down
438fill down
Cells information is copied from its relative position. In other words in the original cell (C1) the equation was (A1+B1). When we paste the function it will look to the two cells to the left. So the equation pasted into (C2) would be (A2+B2). And the equation pasted into (C3) would be (A3+B3). And the equation pasted into (C4) would be(A4+B4).

Absolute Positioning

Sometimes it is necessary to keep a certain position that is not relative to the new cell location. This is possible by inserting a $ before the Column letter or a $ before the Row number (or both). This is called Absolute Positioning.

ABC
153=$A$1+$B$1
282=$A$1+$B$1
346=$A$1+$B$1
438=$A$1+$B$1
If we were to fill down with this formula we would have the exact same formula in all of the cells C1, C2, C3, and C4. The dollar signs Lock the cell location to a FIXED position. When it is copied and pasted it remains EXACTLY the same (no relative).

Fill Right

We can also fill right. We must select the original cell (and the cells to the right) and select from the Edit menu -- Fill and Right.

ABC
1=A2+$B$3=B2+$B$3=C2+$B$3
2625
37104
4987
If we were to fill right from A1 to C1 we would get the formulas displayed to the left. Notice that the second part of the equation is FIXED or (ABSOLUTE REFERENCE so always references B3 which is 10).

Answers would be A1=16, B1=12, C1=15.

No comments: