Compo02 Chapter 4
Compo02 Chapter 4
Objectives:
a.) Learn how to use call references to create a simple
. formula
in Excel.
b.) Create a complex formula in Excel
Know more about absolute and relative reference.
One of the most powerful features in Excel is the ability to calculate numerical information using
formulas. Just like a calculator, Excel can add, subtract, multiply, and divide. In this lesson, we'll
show you how to use cell references to create simple formulas.
Mathematical operators
Excel uses standard operators for formulas, such as a plus sign for addition (+), a minus
sign for subtraction (-), an asterisk for multiplication (*), a forward slash for division (/), and
a caret (^) for exponents.
All formulas in Excel must begin with an equals sign (=). This is because the cell contains, or is
equal to, the formula and the value it calculates.
While you can create simple formulas in Excel using numbers (for example, =2+2 or =5*5), most
of the time you will use cell addresses to create a formula. This is known as making a cell
Page 1
MODULE SPREADSHEET – COMPO02
reference. Using cell references will ensure that your formulas are always accurate because you
can change the value of referenced cells without having to rewrite the formula.
In the formula below, cell A3 adds the values of cells A1 and A2 by making cell references:
When you press Enter, the formula calculates and displays the answer in cell A3:
If the values in the referenced cells change, the formula automatically recalculates:
By combining a mathematical operator with cell references, you can create a variety of simple
formulas in Excel. Formulas can also include a combination of cell references and numbers, as
in the examples below:
Page 2
MODULE SPREADSHEET – COMPO02
To create a formula:
In our example below, we'll use a simple formula and cell references to calculate a budget.
1. Select the cell that will contain the formula. In our example, we'll select
cell D12.
2. Type the equals sign (=). Notice how it appears in both the cell and
the formula bar.
3. Type the cell address of the cell you want to reference first in the formula:
cell D10 in our example. A blue border will appear around the referenced
cell.
Page 3
MODULE SPREADSHEET – COMPO02
4. Type the mathematical operator you want to use. In our example, we'll
type the addition sign (+).
5. Type the cell address of the cell you want to reference second in the
formula: cell D11 in our example. A red border will appear around the
referenced cell.
Page 4
MODULE SPREADSHEET – COMPO02
If the result of a formula is too large to be displayed in a cell, it may appear as pound
signs (#######) instead of a value. This means the column is not wide enough to display the cell
content. Simply increase the column width to show the cell content.
Formulas can also be copied to adjacent cells with the fill handle, which can save a lot of time
and effort if you need to perform the same calculation multiple times in a worksheet. The fill
handle is the small square at the bottom-right corner of the selected cell(s).
1. Select the cell containing the formula you want to copy. Click and drag
the fill handle over the cells you want to fill.
Page 5
MODULE SPREADSHEET – COMPO02
2. After you release the mouse, the formula will be copied to the selected
cells.
To edit a formula:
Sometimes you may want to modify an existing formula. In the example below, we've entered
an incorrect cell address in our formula, so we'll need to correct it.
1. Select the cell containing the formula you want to edit. In our example,
we'll select cell D12.
2. Click the formula bar to edit the formula. You can also double-click the
cell to view and edit the formula directly within the cell.
Page 6
MODULE SPREADSHEET – COMPO02
3. A border will appear around any referenced cells. In our example, we'll
change the first part of the formula to reference cell D10 instead of
cell D9.
Page 7
MODULE SPREADSHEET – COMPO02
5. The formula will be updated, and the new value will be displayed in the
cell.
If you change your mind, you can press the Esc key on your keyboard or click
the Cancel command in the formula bar to avoid accidentally making changes to your formula.
Page 8
MODULE SPREADSHEET – COMPO02
To show all of the formulas in a spreadsheet, you can hold the Ctrl key and press ` (grave
accent). The grave accent key is usually located in the top-left corner of the keyboard. You can
press Ctrl+` again to switch back to the normal view.
You may have experience working with formulas that contain only one operator, such as 7+9.
More complex formulas can contain several mathematical operators, such as 5+2*8. When there's
more than one operation in a formula, the order of operations tells Excel which operation to
calculate first. To write formulas that will give you the correct answer, you'll need to understand
the order of operations.
In the example below, we'll demonstrate how Excel uses the order of operations to solve a more
complex formula. Here, we want to calculate the cost of sales tax for a catering invoice. To do
this, we'll write our formula as =(D3+D4+D5)*0.075 in cell D6. This formula will add the prices of
our items, then multiply that value by the 7.5% tax rate (which is written as 0.075) to calculate
the answer.
Page 9
MODULE SPREADSHEET – COMPO02
Excel follows the order of operations and first adds the values inside the
parentheses: (45.80+68.70+159.60) = 274.10. It then multiplies that value by the tax
rate: 274.10*0.075. The result will show that the sales tax is $20.56.
It's especially important to follow the order of operations when creating a formula. Otherwise,
Excel won't calculate the results accurately. In our example, if the parentheses are not included,
the multiplication is calculated first and the result is incorrect. Parentheses are often the best way
to define which calculations will be performed first in Excel.
Page 10
MODULE SPREADSHEET – COMPO02
In the example below, we'll use cell references along with numerical values to create a
complex formula that will calculate the subtotal for a catering invoice. The formula will calculate
the cost of each menu item first, then add these values.
1. Select the cell that will contain the formula. In our example, we'll select
cell C5.
Page 11
MODULE SPREADSHEET – COMPO02
You can add parentheses to any equation to make it easier to read. While it won't change the
result of the formula in this example, we could enclose the multiplication operations within
parentheses to clarify that they will be calculated before the addition.
There are two types of cell references: relative and absolute. Relative and absolute references
behave differently when copied and filled to other cells. Relative references change when a
formula is copied to another cell. Absolute references, on the other hand, remain constant no
matter where they are copied.
Relative references
By default, all cell references are relative references. When copied across multiple cells, they
change based on the relative position of rows and columns. For example, if you copy the
formula =A1+B1 from row 1 to row 2, the formula will become =A2+B2. Relative references are
especially convenient whenever you need to repeat the same calculation across multiple rows
or columns.
In the following example, we want to create a formula that will multiply each item's price by
the quantity. Instead of creating a new formula for each row, we can create a single formula in
cell D4 and then copy it to the other rows. We'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.
Page 12
MODULE SPREADSHEET – COMPO02
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.
Page 13
MODULE SPREADSHEET – COMPO02
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.
Page 14
MODULE SPREADSHEET – COMPO02
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.
Absolute references
There may be times when you do not want a cell reference to change when filling cells. Unlike
relative references, absolute references do not change when copied or filled. You can use an
absolute reference to keep a row and/or column constant.
An absolute reference is designated in a formula by the addition of a dollar sign ($) before the
column and row. If it precedes the column or row (but not both), it's known as a mixed
reference.
You will use the relative (A2) and absolute ($A$2) formats in most formulas. Relative references
are used less frequently.
When writing a formula in Microsoft Excel, you can press the F4 key on your keyboard to switch
between relative, absolute, and mixed cell references, as shown in the video below. This is an
easy way to quickly insert an absolute reference.
Page 15
MODULE SPREADSHEET – COMPO02
For more knowledge about this chapter, please check the link provided;
L1: INTRO TO FORMULAS
Excel: Intro to Formulas - YouTube
L2: COMPLEX FORMULAS
Excel: Creating More Complex Formulas - YouTube
L3: RELATIVE AND ABSOLUTE REFERENCE
Excel: Relative and Absolute Cell References - YouTube
REFERENCES
https://www.excel-easy.com/
Page 16