Sub topic 2
Copying and Filling Formulas
This chapter assumes you can enter values and formulas in Google Sheets, read basic cell addresses such as A1 and B2, and use arithmetic operators such as +, -, *, and /.
Copying a formula saves time when the same calculation applies to many cells. Google Sheets does not usually copy a formula as fixed text. It adjusts the formula's cell references based on the new location. This behavior is called reference adjustment.
How copying changes a formula
Suppose column A contains prices and column B should contain a 20% tax amount:
| Cell | Content |
|---|---|
| A2 | 25 |
| B2 | `=A2*0.2` |
| A3 | 40 |
When you copy the formula from B2 to B3, Google Sheets changes A2 to A3. The formula in B3 points to the price on the same row.
Cell B2: =A2*0.2
Cell B3 after copying down: =A3*0.2The formula keeps its pattern relative to its location. A reference such as A2 is therefore called a relative reference. Relative references are useful when each row contains its own input.
Three ways to copy a formula
Use the fill handle
The fill handle is the small square at the lower-right corner of the selected cell or range.
- Enter a formula in the first cell, such as B2.
- Select B2.
- Point to the fill handle until the pointer changes.
- Drag down or across the cells that need the formula.
- Release the mouse button.
Google Sheets places an adjusted version of the formula in each destination cell.
You can also select the formula cell and the destination range, then use Edit > Fill > Down or Edit > Fill > Right. The keyboard shortcut may vary by operating system, so the menu is a reliable alternative.
Copy and paste
Copy and paste works well when the destination is far away or when you want to paste into a carefully selected range.
- Select the formula cell.
- Choose Edit > Copy, or press the copy shortcut for your operating system.
- Select the destination cell or range.
- Choose Edit > Paste.
Normal paste adjusts relative references. Paste special > Values only pastes the displayed results instead of formulas. Use this option when you want a snapshot that will not recalculate from the original inputs.
Double-click the fill handle
Double-clicking the fill handle can fill a formula down automatically. Sheets looks for neighboring data and extends the formula beside that data.
For example, if column A contains a continuous list of prices and B2 contains a formula, double-clicking B2's fill handle can fill column B alongside the price list. This method depends on nearby data. It may stop early if there is a blank row, and it may not behave as expected when the surrounding layout is unusual.
Choosing a copying method
| Method | Best use | Important limitation |
|---|---|---|
| Fill handle | A visible adjacent range | Easy to drag too far or too short |
| Copy and paste | A specific destination range | You must select the correct destination |
| Double-click fill handle | A formula beside a continuous data column | Blank rows can stop the fill |
See the reference pattern before filling
Click a formula cell and inspect the colored reference highlight in the sheet. Then compare the formula in the first filled cell with the formula in the next row or column.
For example, if B2 contains =A2*0.2, filling downward should produce this pattern:
B2: =A2*0.2
B3: =A3*0.2
B4: =A4*0.2If a value must remain the same in every copied formula, a relative reference is not enough. You will need an absolute reference, such as $E$1, which locks both the column and row. The next chapter explains that distinction in detail.
Common copying errors
- The formula was pasted as a value. Check whether the destination cell begins with
=when selected. - The formula filled in the wrong direction. Copying across changes column references; copying down changes row references.
- The fill stopped early. Look for a blank row or missing neighboring data.
- A fixed input moved. If every result should use one tax rate, budget limit, or conversion factor, lock that input before copying.
- The destination was not selected correctly. Confirm the highlighted range before using paste or fill.
Exercise
B2 contains =A2*0.2. What formula should appear in B5 after copying the formula down three rows?
Show answer
=A5*0.2, because the relative row reference changes with the formula's new location.