facebook google plus twitter
Webucator's Free Introduction to Microsoft Excel Tutorial

Lesson: Using Formulas in Microsoft Excel

Welcome to our free Introduction to Microsoft Excel tutorial. This tutorial is based on Webucator's Introduction to Microsoft Excel 2019 Training course.

This is the math lesson, and whether you love or hate math, by the end of this lesson you will agree that Excel makes math easy. We will start by explaining some of the basic concepts you need to understand regarding how Excel does math and then will get into entering formulas.

Lesson Goals

  • Learn about math operators and the order of operations.
  • Learn to enter basic formulas.
  • Learn to use AutoSum to sum data with one click.
  • Learn about absolute, relative, and mixed cell references.
  • Learn to copy formulas and functions.

Math Operators and the Order of Operations

Math Operators

The six mathematical operators you need to know to enter basic formulas in Excel are:

  1. Addition. Plus sign (+).
  2. Subtraction. Minus sign (-).
  3. Multiplication. Asterisk (*).
  4. Division. Forward slash (/).
  5. Percent. Percent sign (%).
  6. Exponentiation. Exponents sign (^).

Math Operators

When a formula uses more than one operator, the order of operations in Excel is as follows:

  1. Parentheses. Operations contained in parentheses (or brackets) are executed first.
  2. Exponents. Exponents are executed second.
  3. Multiplication / Division. Multiplication and division, which Excel treats equally, are executed third, from left to right.
  4. Addition / Subtraction. Addition and subtraction, which Excel treats equally, are executed last, from left to right.

Entering Formulas

The simplest (not always the easiest) way to enter a formula in Excel is to:

  1. Select the cell in which you wish to enter a formula.
  2. Press "=" on your keyboard.
  3. Select the first cell which contains data you will use in your formula.
  4. Type the operator (+, -, *, or /).
  5. Select the second cell which contains data you will use in your formula.
  6. If necessary, type additional operators and select additional cells. If some operations should be performed before others, enclose those operations in parentheses.

Ink Equations

If you are using a touch-enabled device, you can "write" equations using a stylus or your finger and Excel will convert it to text. If you are not using a touchscreen device, you can do the same using your mouse.

To use Ink Equations, from the Insert tab of the Ribbon, in the Symbols group, select Equation.

Symbols Equation

From the drop-down, select Ink Equations.

Equation

A dialog box opens where you can insert your equation and then click Insert to add it to the worksheet.

Math Input

AutoSum (and Other Common Auto-Formulas)

Some formulas can be entered simply by clicking a button in Excel. Excel will even guess which data the formula applies to, meaning that if your spreadsheet is properly laid out, you don't have to select the cells.

AutoSum

To quickly sum a row or column of data:

  1. Select the cell to the right or at the bottom of a set of number. On the Home tab, in the Editing group, click the AutoSum command:Select Cells
  2. Note that Excel guesses the data you wish to sum and gives you the option to edit the formula if you wish:Excel Guesses Data
  3. Press Enter.

Count Numbers

To quickly count the number of cells in a row or column that have data:

  1. Select the cell to the right or at the bottom of a set of numbers.On the Home tab, in the Editing group, click the drop-down arrow to the right of the AutoSum command.Select Count Numbers.AutoSum Command
  2. Note that Excel guesses the cells in which you wish to count numbers and gives you the option to edit the formula if you wish:Excel Guesses
  3. Press Enter.

If you select the More Functions option from the AutoSum command, you can also use the COUNTA and COUNTBLANK functions. COUNTA will count all cells that contain data (not just numbers). COUNTBLANK will count the empty cells in a range of cells.

Average

To quickly average the numbers in a row or column:

  1. Select the cell to the right or at the bottom of a set of numbers. On the Home tab, in the Editing group, click the drop-down arrow to the right of the AutoSum command. Select Average:Average Command
  2. Note that Excel guesses the cells in which the data you wish to average lies and gives you the option to edit the formula if you wish:Edit Formula Option
  3. Press Enter.

Min

To quickly find the minimum number in a row or column:

  1. Select the cell to the right or at the bottom of a set of numbers. On the Home tab, in the Editing group, click the drop-down arrow to the right of the AutoSum command. Select Min:Min Option
  2. Note that Excel guesses the cells in which you wish to find the minimum number and gives you the option to edit the formula if you wish:Edit Formula Option
  3. Press Enter.

Max

To quickly find the maximum number in a row or column:

  1. Select the cell to the right or at the bottom of a set of numbers. On the Home tab, in the Editing group, click the drop-down arrow to the right of the AutoSum command. Select Max:Max Option
  2. Note that Excel guesses the cells in which you wish to find the maximum number and gives you the option to edit the formula if you wish:Edit Formula Option
  3. Press Enter.

Copying Formulas and Functions

Formulas can be copied from one cell to other cells in Excel. To copy formulas in Excel:

  1. Select the cell which contains the formula you wish to copy.
  2. On the Home tab, in the Clipboard group, click the Copy command.Copy Command
  3. Select the cell into which you wish to copy the formula.
  4. On the Home tab, in the Clipboard group, click the Paste command.Paste Command

Another way to copy formulas is by using Autofill, or dragging the Fill Handle in the cell containing the formula to the other cell or cells in which you wish to copy the formula. Autofill, which was introduced earlier in this course, is especially useful for copying formulas.

To use Autofill to copy formulas:

  1. Enter a formula in one cell:Select Formula
  2. Click on the Fill Handle, which is located in the bottom right cell of the selected cells:Fill Handle
  3. Drag the Fill Handle for as many rows or columns as desired:Drag Fill Handle
  4. Release the mouse to enter the formula into the desired cells:Release Mouse

Displaying Formulas

When working with formulas, if you wish to display the formula within its associated cell in a worksheet, select the Formula tab and in the Formula Auditing group, select Show Formulas.

Show Formulas Command

You can toggle this option on and off by selecting and de-selecting this option.

Relative, Absolute, and Mixed Cell References

Relative Cell References

Note that in the example above, when we copied the formula from one cell to others, the formula automatically changed to add the cells in the corresponding rows:

  1. The formula in cell E2 added B2, C2 and D2.
  2. The formula in E3 added B3, C3 and D3.
  3. etc...

This happened because the formula we entered contained Relative cell references.

Relative cell references are the default in Excel. They are called "relative" because the actual cell row and column used in the formula are not significant. Instead, the significant thing is the location of the cell used in the formula relative to the location of the cell in which the formula is entered.

The way to think of the formula E2 = B2 + C2 + D2 is Result = (cell 3 places to the left) + (cell 2 places to the left) + (cell 1 place to the left) of the cell in which the Result is entered.

Absolute Cell References

Absolute Cell ReferenceSometimes you want a formula to refer to a specific cell regardless of where in your worksheet the formula is executed. In the above example, the formulas in column F all refer to cell B1.

Absolute Cell ReferenceThe way to tell Excel that a formula should always refer to a specific cell is to use dollar signs ($). In the above example, the formula we used in cell F4 is =E4 / $B$1. No matter where we put this formula in our worksheet, it will divide the cell one to the left of the cell in which we enter the formula by cell B1.

Finally, notice that we entered the dollar sign twice in the above formula, before the "B" and before the "1". The first $ made the column an absolute reference and the second made the row an absolute reference. In this example, it was not actually necessary to make the column an absolute reference. The takeaway here is that when you refer to a cell in a formula, you can make either or both of the column and row references Absolute or Relative.

Mixed Cell References

Mixed cell references are a combination of relative and absolute references.

Just like in absolute cell references, in mixed cell references the dollar sign ($) is used to refer to a specific cell that is fixed.

An example of a mixed cell reference would be: $F4. This would mean that the the column letter, F, is fixed, while the row number is allowed to be copied from cell to cell.

Working with Formulas

Duration: 15 to 25 minutes.

In this exercise, you will use formulas to enter additional data into the quarterly profit and loss statement we are creating for Dave's Lemonade Stand.

  1. Continue working in the workbook from the last exercise or open Dave's Lemonade Stand - Working with Formulas.xlsx from your Webucator/Excel2019.1/Exercises folder.
  2. Use AutoSum to sum the Total Income in row 5.
  3. Enter a formula to make payroll 30% of Total Income each quarter.
  4. Enter a formula to make marketing 25% of the first quarter's Total Income each quarter (so all formulas refer to cell B5).
  5. Enter a formula to make Supplies 20% of Total Income each quarter.
  6. Use AutoSum to sum the Total Expense in row 10.
  7. Use a formula to calculate Net Income (Total Income - Total Expense).
  8. Enter "Margin" in cell A12 and then use a formula to calculate the Margin (Net Income / Total Income).
  9. Format all cells to look like they do in the below image:Formulas Exercise
  10. Save the workbook.

Solution:

  1. Open or go to the specified file.
  2. Use AutoSum to sum the Total Income in row 5.
    1. Select cell B5 and click AutoSum and press Enter:AutoSum
    2. Grab the Fill Handle in cell B5 and drag the formula in cell B5 to cell E5:Drag Formula
  3. Enter a formula to make payroll 30% of Total Income each quarter.
    1. In cell B7, enter "=B5*.3":Enter Formula
    2. Grab the Fill Handle in cell B5 and drag the formula in cell B7 to cell E7.
  4. Enter a formula to make marketing 25% of the first quarter's Total Income each quarter (so all formulas refer to cell B5).
    1. In cell B8, enter "=$B$5*.25":Enter Formula
    2. Grab the Fill Handle in cell B8 and drag the formula in cell B8 to cell E8.
  5. Enter a formula to make Supplies 20% of Total Income each quarter.
    1. In cell B9, enter "=B5*.2".
    2. Grab the Fill Handle in cell B9 and drag the formula in cell B9 to cell E9.
  6. Use AutoSum to sum the Total Expense in row 10.
    1. Select cell B10 and click AutoSum and press Enter.
    2. Grab the Fill Handle in cell B10 and drag the formula in cell B10 to cell E10.
  7. Use a formula to calculate Net Income (Total Income - Total Expense).
    1. Select cell B11 and enter "=B5-B10":Enter Formula
    2. Grab the Fill Handle in cell B11 and drag the formula in cell B11 to cell E11.
  8. Enter "Margin" in cell A12 and then use a formula to calculate the Margin (Net Income / Total Income), which should be displayed as a percent.
    1. Enter "Margin" in cell A12.
    2. In cell B12 enter "=B11/B5":Enter Formula
    3. Grab the Fill Handle in cell B12 and drag the formula in cell B12 to cell E12.
    4. Select cells B12:E12 and click the Percent command:Percent Command
  9. Make any necessary formatting changes.
  10. Save the workbook.