Practice Task # 3: To Create and Copy A Formula Using Relative References
Practice Task # 3: To Create and Copy A Formula Using Relative References
In the following file (Practice Workbook 3, Menu Order (No Tax) Sheet), you will create a formula that
will multiply each item's price by the quantity. Instead of creating a new formula for each row, you can
create a single formula in cell D2 and then copy it to the other rows. You'll use relative references so the
formula calculates the total for each item correctly.
1. Select the cell that will contain the formula. In our example, we'll select cell D4.
2. Enter the formula to calculate the desired value. In our example, we'll type =B4*C4.
3. Press Enter on your keyboard. The formula will be calculated, and the result will be displayed in
the cell.
4. Locate the fill handle in the bottom-right corner of the desired cell. In our example, we'll locate
the fill handle for cell D4.
5. Click and drag the fill handle over the cells you want to fill. In our example, we'll select cells
D5:D13.
6. Release the mouse. The formula will be copied to the selected cells with relative references,
displaying the result in each cell. You can double-click the filled cells to check their formulas for
accuracy. The relative cell references should be different for each cell, depending on their rows.
In the same file (Practice Workbook 3, Menu Order Sheet), you’re going to use cell E2 (which contains
the tax rate at 7.5%) to calculate the sales tax for each item in column D. To make sure the reference to
the tax rate stays constant—even when the formula is copied and filled to other cells—you'll need to
make cell $E$2 an absolute reference.
1. Select the cell that will contain the formula. In our example, we'll select cell D4.
2. Enter the formula to calculate the desired value. In our example, we'll type =(B4*C4)*$E$2,
making $E$2 an absolute reference.
3. Press Enter on your keyboard. The formula will calculate, and the result will display in the cell.
4. Locate the fill handle in the bottom-right corner of the desired cell. In our example, we'll locate
the fill handle for cell D4.
5. Click and drag the fill handle over the cells you want to fill (cells D5:D13 in our example).
6. Release the mouse. The formula will be copied to the selected cells with an absolute reference,
and the values will be calculated in each cell. You can double-click the filled cells to check their
formulas for accuracy. The absolute reference should be the same for each cell, while the other
references are relative to the cell's row.
* NOTE:
Be sure to include the dollar sign ($) whenever you're making an absolute reference across multiple
cells. The dollar signs were omitted in the example below. This caused Excel to interpret it as a relative
reference, producing an incorrect result when copied to other cells.
Using cell references with multiple worksheets - To reference cells across worksheets:
In the same file (Practice Workbook 3, Menu Order and Catering Invoice Sheets), you'll refer to a cell
with a calculated value between two worksheets. This will allow us to use the exact same value on two
different worksheets without rewriting the formula or copying data.
1. Locate the cell you want to reference, and note its worksheet. In our example, we want to
reference cell E14 on the Menu Order worksheet.
2. Navigate to the desired worksheet. In our example, we'll select the Catering Invoice worksheet.
3. Locate and select the cell where you want the value to appear. In our example, we'll select cell
C4.
4. Type the equals sign (=), the sheet name followed by an exclamation point (!), and the cell
address. In our example, we'll type ='Menu Order'!E14.
5. Press Enter on your keyboard. The value of the referenced cell will appear. Now, if the value of
cell E14 changes on the Menu Order worksheet, it will be updated automatically on the Catering
Invoice worksheet.
NOTE:
If you rename your worksheet at a later point, the cell reference will be updated
automatically to reflect the new worksheet name.
If you enter a worksheet name incorrectly, the #REF! error will appear in the cell. In our
example below, we've mistyped the name of the worksheet. To edit, ignore, or investigate
the error, click the Error button beside the cell and choose an option from the menu.
Challenge!
1. Open our practice workbook.
2. Click the Paper Goods tab in the bottom-left of the workbook.
3. In cell D4, enter a formula that multiplies the unit price in B4, the quantity in C4, and the tax rate
in E2. Make sure to use an absolute cell reference for the tax rate because it will be the same in
every cell.
4. Use the fill handle to copy the formula you just created to cells D5:D12.
5. Change the tax rate in cell E2 to 6.5%. Notice that all of your cells have updated. When you're
finished, your workbook should look like this:
6. Paper Goods Tab
7. Click the Catering Invoice tab.
8. Delete the value in cell C5 and replace it with a reference to the total cost of the paper goods.
Hint: The cost of the paper goods is in cell E13 on the Paper Goods worksheet.
9. Optional: Use the same steps from above to calculate the sales tax for each item on the Menu
Order worksheet. The total cost in cell E14 should update. Then, in cell C4 of the Catering
Invoice worksheet, create a cell reference to the total you just calculated. Note: If you used our
practice workbook to follow along during the lesson, you may have already completed this step.
10. When you're finished, the Catering Invoice worksheet should look something like this:
11. cell_references_challenge