# 3.1: More on Formulas and Functions

### Learning Objectives

1. Review the use of the =MAX function.
2. Examine the Quick Analysis Tool to create standard calculations, formatting, and charts very quickly.
3. Create Percentage calculation.
– Use the Smart Lookup tool to acquire additional information about percentage calculations.
– Review the use of Absolute cell reference in a division formula.

# Another use for =MAX

Before we move on to the more interesting calculations we will be discussing in this chapter, we need to determine how many points it is possible for each student to earn for each of the assignments. This information will go into Row 25. The =MAX function is our tool of choice.

1. Open the data file CH3 Data and save the file to your computer as CH3 Gradebook.
2. Make B25 your active cell.
3. Start typing =MAX (See Figure 3.2) Note the explanation you see on the offered list of functions. You can either keep typing ( or double click MAX from the list.

Figure 3.2  Entering a function

4. Select the range of numbers above row 25. Your calculation will be: =MAX(B5:B24)
5. Now, use the Fill Handle to copy the calculation from Column B through Column N.
Note that as you copy the calculation from one column to the next, the cell references change. The calculation in column B reads: =MAX(B5:B24). The one in column N reads: =MAX(N5:N24). These cell references are relative references.

By default, the calculations that Excel copies change their cell references relative to the row or column you copy them to. That makes sense. You wouldn’t want column N to display an answer that uses the values in column L.

Want to see all the calculations you have just created? Press Ctrl ~ (See Figure 3.3.) Ctrl ~ displays your calculations (formulas). Pressing Ctrl ~ a second time will display your calculations in the default view – as values.

Figure 3.3 Relative References – Displayed as calculations.

# Quick Analysis Tool

The Quick Analysis Tool allows you to create standard calculations, formatting, and charts very quickly. In this exercise we will use it to insert the Total Points for each student in Column O.

Be sure to press Ctrl ~ to return your spreadsheet to the normal view (the formula results should display, not the formulas themselves).

1. Select the range of cells B5:N25
2. In the lower right corner of your selection, you will see the Quick Analysis tool (see Figure 3.4).

Figure 3.4 Quick Analysis Tool

3. When you click on it, you will see that there are a number of different options. This time we will be using the Totals option. In future exercises, we will use other options.
4. Select Totals, and then the SUM option that highlights the right column (see Figure 3.5). Selecting that SUM option places =SUM() calculations in column O.

Figure 3.5 Quick Analysis Tool – Totals, Sum Column

# Percentage calculation

Column P requires a Percentage calculation. Before we launch in to creating a calculation for this, it might be handy to know precisely what it is we are looking for. If you are connected to the internet, and are using Excel 2016, you can use the Smart Lookup tool to get some more information.

1. Select cell P4.
2. Find the Smart Lookup tool on the Review tab (see Figure 3.6).
3. Press the Smart Lookup tool to find more about Percentage calculations.
If this is the first time you have used the Smart Lookup tool, you may need to respond to a statement about your privacy. Press the Got it button.

I think the first Wikipedia article does a pretty good job explaining the calculation, don’t you?

Figure 3.6 Smart Lookup tool

Now that we know what is needed for the Percentage calculation, we can have Excel do the calculation for us. We need to divide the Total Points for each student by the Total Points of all the Points Possible. Notice that there is a different number on each row – for each student. But, there is only one Total Points Possible – the value that is in cell O25.

1. Make sure that P5 is your active cell.
2. Press = then select cell O5. Press /, then cell O25. Your calculation should look like this: =O5/O25. The result of the formula should be 0.95641026.  (So far, so good. DeShea Andrews is doing well in this class – with a percentage grade of almost 96%. Definitely an “A”!)
3. Next use the Fill handle to copy the calculation down through row 24 to calculate the other students’ grades. You should get the error message #DIV/0!. This error message reminds us that you can’t divide a number by 0 (zero). And that is just what is happening. If you look at the calculation in P9, the calculation reads: =O9/O29. The first cell reference is correct – it points to Moesha Gashi’s total points for the class. But the second reference is wrong. It points to an empty cell – O29.

Before copying the calculation, we have to make the second reference (O25) an absolute cell reference. That way, when we copy the formula down, the cell reference for O25 will be locked and will not change.

1. Make P5 your active cell. In the Formula Bar click on O25 (see Figure 3.7).

### Key Takeaways

• Functions can be created using cell ranges or selected cell locations separated by commas. Make sure you use a cell range (two cell locations separated by a colon) when applying a statistical function to a contiguous range of cells.
• To prevent Excel from changing the cell references in a formula or function when they are pasted to a new cell location, you must use an absolute reference. You can do this by placing a dollar sign (\$) in front of the column letter and row number of a cell reference or by using the F4 function key.
• The #DIV/0 error appears if you create a formula that attempts to divide a constant or the value in a cell reference by zero.