Sub topic 5
Worked Example: One Tax Rate Cell for a Whole Price List
Assume you know how to enter values and formulas in Google Sheets. You should also know basic cell addresses such as A1 and B2, and arithmetic operators such as +, *, and /.
A price list often applies one tax rate to many prices. Store that rate in one cell, then copy one formula down the list. The formula must keep using the same tax-rate cell while changing the price reference for each row.
Set up the price list
Create a sheet with this layout:
| Cell | Content |
|---|---|
| A1 | Item |
| B1 | Price |
| C1 | Tax |
| D1 | Total |
| E1 | Tax rate |
| E2 | 0.2 |
Enter several items and prices in columns A and B. The value 0.2 means 20 percent. A spreadsheet stores percentages as decimals, so 20% is represented by 0.2.
You can format E2 as a percentage by selecting it and choosing Format, Number, Percent. The underlying value remains 0.2.
Use a relative price reference
To calculate the tax amount for the first item, enter this formula in C2:
=B2*$E$2This formula multiplies the price in B2 by the tax rate in E2. The dollar signs make E2 an absolute reference. An absolute reference stays fixed when you copy the formula.
In D2, calculate the price including tax:
=B2+C2Here, both references are relative. When you copy the formula down, B2 becomes B3 and C2 becomes C3.
Fill the formulas down
Select C2 and D2 together, then drag the small blue square in the lower-right corner of the selection down to the last item. This square is the fill handle. Google Sheets copies the formulas and adjusts references for each row.
You can also copy C2 and D2, select the destination range, and use Edit, Paste. For a continuous list next to filled data, double-clicking the fill handle can autofill down the neighboring data range.
After filling, the formulas should follow this pattern:
C2: =B2*$E$2
C3: =B3*$E$2
C4: =B4*$E$2
D2: =B2+C2
D3: =B3+C3
D4: =B4+C4The price reference changes because B2 is relative. The tax-rate reference does not change because $E$2 is absolute.
Understand the common mistake
If you enter this formula instead, the result may be wrong after copying:
=B2*E2When copied from C2 to C3, it becomes:
=B3*E3The rate reference moved from E2 to E3. If E3 is blank, the tax may calculate as zero. If E3 contains another value, the formula uses the wrong rate.
The correct formula locks both the column and row:
=B2*$E$2Check the formula bar when a result looks wrong. Confirm that every copied formula still contains $E$2.
Change the rate once
A fixed input cell makes updates simple. If the tax rate changes from 20% to 22%, replace E2 with 0.22. Every formula using $E$2 recalculates automatically. You do not need to edit each row.
You can type the dollar signs yourself. While editing a reference, press F4 to cycle through relative and absolute forms. Depending on the keyboard, you may need to press Fn+F4. The forms include:
| Reference | What stays fixed |
|---|---|
| B2 | Nothing |
| $B$2 | Column B and row 2 |
| B$2 | Row 2 only |
| $B2 | Column B only |
For this price-list example, both the tax-rate column and row must stay fixed.
> callout note > Keep shared inputs, such as tax rates, in clearly labeled cells. A fixed reference prevents copying errors, but a clear label helps other people understand what the formula uses.
Exercise
If the tax rate is in E1 and the price for the current row is in B2, what formula calculates the tax amount correctly when filled down?
Show answer
Use =B2*$E$1. B2 changes to B3, B4, and so on, while $E$1 remains fixed.