Skip to main content
Mathematics LibreTexts

1.3: Introduction to Excel Spreadsheets

  • Page ID
    83912
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    This book will rely heavily upon the use of Excel, since it is the standard mathematical tool used in the business world. (More precisely, the spreadsheet is the standard tool, and Excel is currently the de facto standard brand. Most of this text can easily be used with other spreadsheets.) However, we do not assume that the student has worked with Excel previously. Throughout the course we will introduce those features of Excel we need to do mathematics and model the business problems we encounter.

    While introducing Excel, we will also introduce rules of “Good Excel practice.” In a business environment, spreadsheets should be written so that someone else can easily understand the worksheet, and maintain it for future use. You should assume those same standards when submitting work in Excel.

    This section is meant as an introduction to several standard features of Excel we will use often. These include:

    • Basic Arithmetic such as add, subtract, multiply etc.
    • Show formulas: allows us to check if the formulas in the cells are what they should be.
    • Quick fill: this feature takes a pattern and fills it across a column or a row.
    • Relative and Absolute Reference: when do we refer to a fixed cell and when does the reference depend on our place in the spreadsheet?
    • SUM(): Adding a large number of cells can be efficiently done with this feature.

    Basic Arithmetic, show formulas and quick fill..

    \(Figure \text { } 1.3.1.\) Video presentation of this example

    We start with an example that covers basic arithmetic. Assume we are given the following worksheet:

    clipboard_e3c8121c1db616e94214e1c011a686a7f.png

    From data we would like to compute the figures for the quarter (add the three months), the monthly profit (revenues-cost), and the monthly unit costs (costs/ units sold).

    With the formula ribbon, we go to show and select Show Formulas. Since we want the worksheet to be readable by others, we add labels for the quantities we are computing, and in each cell we enter the formula for the quantity. The formula bar tells us which cell has been selected and the formula for that cell. It is generally easier to edit a formula by using the formula bar.

    In this example, we have used several different ways of writing the formula. In cells E2, B6, and B7 we simply typed in the equation like we would on a calculator. Thus the profit for January is Revenues – Costs, or 3600-2700. Since we want Excel to compute this value, we put an equals sign at the start of the formula.

    In cells E3, C6 and C7, instead of typing the values, we use a reference to the cell where the value is kept. This allows us to change the raw data and have Excel automatically recompute the quantities that were derived from those numbers.

    In cells E4 and E5 we use Excel's SUM command. In cell E4, we are taking the sum of the values in the cells from B4 through D4. We will come back to commands in Excel later in the section.

    clipboard_e831c88463a90b6d3fe421ff323160082.png

    If we unselect Show Formulas, we see the values that Excel computes.

    clipboard_e4031372f31e748472834e9f501ca7e17.png

    We want to finish our assignment by computing the Profit and Per Unit Costs for March and for the Quarter. However, we would prefer not to type any more formulas. (Typing in four more cells is not so bad, but we can imagine being told to do this for several years of data.) We will use a process called Quick Fill, that tells Excel to repeat the same formula, with the cell references appropriately modified.

    To do the quick fill, we select the cells we want copied.

    clipboard_e54a6302e4134f438e24657acd967f5a3.png

    We can move the cursor until the cell(s) show the fill handle. This will change the symbol in the corner of the cell to a thin dark ‘+’.

    clipboard_ee2eba9fde3f67c0cfa7f030d20526585.png

    We then drag the little blue box at the lower left corner of the box of selected cells. Excel automatically fills in the new values.

    clipboard_e430c14bb34ea4d616756320a110837f8.png

    We look back at the formulas and see that Excel has produced formulas where cells are in the same relative position. Profit is the value from the cell 4 rows higher minus the value of the cell three rows higher.

    clipboard_e584e5f50ffbb53f195a1a647a70549b5.png

    There is a last detail to fix in our report. The quantities in profit and Per Unit Cost are in money, so we want them formatted correctly. (They should start with a dollar sign, have a decimal point, and stop at two decimal places or cents.) We do this by selecting the cells and then formatting the cells as currency.

    clipboard_e3e1e28e006437a423eb8f722a762e4b9.png

    If we use the quick fill on a pair of numbers, Excel produces an arithmetic sequence. A pair of cells containing 1 then 4 becomes the start of a sequence 1, 4, 7, 10, … .

    Absolute and Relative Cell References.

    \(Figure \text { } 1.3.2.\) Video presentation of this example

    One of the reasons that spreadsheets are so useful for doing mathematics in a business setting is that businesses often do a relatively simple computation for a large number of cases. That means we should pay attention to formulas with cell references and the process of copying a formula from one case to another. In the example above, all of the values change from one month to the next. It is not hard to imagine a calculation where some values remain the same for many cases. Thus we want to look at the idea of absolute and relative cell references. This is a very important topic and an Excel feature we will be using for the rest of the term.

    Consider the following example: Your rich uncle Fred decided to give you 10 shares of Google stock (GOOG) on January first 2009, with the option of receiving instead the same value in either Microsoft (MSFT) or Apple stock (AAPL). You would like to see the monthly change in value of the portfolios over a three-year period.

    We start by going to finance.yahoo.com and collecting the monthly prices of the stocks, downloading the answers into a spreadsheet. When we look up historical prices from yahoo, we are interested in the adjusted closing price. (They adjust the price to account care of splits and dividends.) That produces a spreadsheet like the one below.

    clipboard_e6093ef1e6db40528f5bf976b05b733dc.png

    Next we want to compute the number of shares for each stock. This is 10 times the closing price of Google divided by the closing price of the stock we selected.

    clipboard_ef90a33e18cd24236439b71c371cb0c3c.png

    In the formula for the number of shares of MSFT, we used $B$3 for the initial price of GOOG. This is an absolute cell reference. When we copy the formula from cell C1 to cell D1, the new formula is =10*$B$3/D3. This formula in cell D1 asks for 10 times the value in cell B3, divided by the value in the 2 rows below the cell of the formula.

    Absolute references refer to a particular column and/or row. The dollar sign ‘$’ is used to fix the reference.

    Relative references refer to the cell the same distance away from the cell containing the formula.

    We continue our example by computing the change in value of our GOOG portfolio in the first month. That will be the share price at the beginning of the next month minus the share price at the beginning of the month, times the number of shares. For January 2009, for GOOG this becomes =(B4-B3)*B$1.

    Since we have properly used relative and absolute references, we can now copy this formula to complete the chart, and Excel will modify the formula appropriately.

    We note that the rows and columns can be independently made absolute or relative. Thus if we are looking at a formula in cell A1, and see a reference to B2 it means the cell one below and to the right of the location of the formula. If we see $B2 it means the cell in column B that is one row down from the formula. If we see B$2 it means the cell in row two that is one column to the right of the formula.

    When we convert back to see the values, we see that an original investment of $3,385.30 would have made a profit of $3,073.70 in GOOG stock, $2,128.02 in MSFT stock and $11,826.60 in AAPL stock. Once again we use the SUM function and a cell range to add the values in the column. We also use the split screen icons in the scroll bars to be able to see the correct rows and columns.

    clipboard_e200c0c8b76d600596a43caa3b386263b.png

    Note: Excel can also make references across multiple pages of a workbook, but we will not need that capability for htis course.

    Named Cell References.

    An alternative to using absolute references in formulas is to name the cells.

    By default, Excel names each cell by its row and column. We can use the name cell in the upper left corner of the Excel sheet to change the name from the letter/number format into a descriptive name.

    The more descriptive name can be useful when constructing and documenting the process we are using for our computations. Consider the previous example with the rich uncle. In cells B1, C1, and D1, we had the number of shares of Google, Microsoft, and Apple we could have had in the portfolio. Better names for those cells would then be SharesGOOG, SharesMSFT, and SharesAAPL. We can name a cell by editing the name box at the left side of the formula bar.

    clipboard_e8f222dc1bfcfd2fb0132ba523b538434.png

    We can then use the names in formulas. In general, the formulas with nicely named variables are easier to read.

    clipboard_e66abe744403e0556aeaf16627170723f.png

    Getting Help.

    One of the ways that doing mathematics with a program like Excel differs from working with a calculator is that computer programs have help features. It is worthwhile pointing out two that come with Excel. We illustrate both with the SUM function we have used a number of times.

    When we call Help from the top menu, we are given a pop up window for Excel Help. It has a number of topics listed by default. It also has a bar for searching topics.

    clipboard_eb6b489d0984dcdbf437f99c7fd9b6ddb.png

    We type the name of the command we are looking for and we are given a page of help for that command.

    clipboard_e751b88b4d18954a35baa3df302222994.png

    A second kind of help is the formula builder from the formula ribbon. It gives a more concise help when you do not remember the exact syntax of a command.

    clipboard_e0d4d2da52c78a4cb74ba5e1df8ef081e.png

    A third source of help is simply to do a web search for Excel help. To find how to do a computation with an exponential functions you can search for “Excel formulas exponential.”

    Other Details.

    Excel is a rich and complex tool. We will be looking at more features as we go through the course. There are several that are worth pointing out explicitly at this point.

    • For ordinary arithmetic, Excel uses the standard symbols of +, -, *, /, and ^ for plus, minus, times, divided by, and raising to a power.
    • We can also use the SUM, PRODUCT, QUOTIENT, and POWER commands for ordinary arithmetic.
    • The order of operations used by Excel differs from the traditional order of operations when it comes to taking powers of negative numbers. The problem is illustrated in evaluating \(-3^2\text{,}\) which has a negative sign and an exponentiation. In all math classes you have taken this is interpreted as \(-(3^2)\) or \(-9\text{,}\) with exponentiation done first. In Excel, this is interpreted as \((-3)^2\) or 9, with negation done first. When in doubt, use parenthesis to make the order of operations explicit.
    • Excel also has the other mathematical functions you have used before. The functions for square root, log base 10, log base e, and e to the power of, are respectively, SQRT, LOG, LN, and EXP.
    • The value of \(e\) is represented by EXP(1).
    • Excel has a number of very useful operations on collections of numbers. We start with easy ones where the name is self explanatory, like SUM, AVERAGE, COUNT, MIN, and MAX.
    class="

    ExercisesExercises Introduction to Excel Spreadsheets

    Exercise 1:

    Produce a spreadsheet where the first 100 rows are used. The cell in row n and column A should have value n. The cell in row n and column B should have value 2*n. You should be able to do this by typing in the value of 4 cells and using quick fill.

    Answer

    The formulas entered should look like this:

    clipboard_e06a1693272a238a354c22fe4852d7ca0.png

    Once we quickfill and have the regular view (not showing the formulas)

    clipboard_e50922d5346e1f2a219b4c3336ed58cd3.png

    • The actual spreadsheet has 100 rows.
    • Note that there is a small window that shows how far the quickfill has gone.
    • If you want to check the formulas used you go to the “Formula” menu and choose “Show formulas”. This feature is good for debugging any problem that may happen.
    Exercise 2:

    Produce a spreadsheet where the first 100 rows are used. Column A should contain the first 100 odd numbers. Column B should contain multiples of 7 starting with 21.

    Exercise 3:

    Start with the worksheet given. Complete the worksheet in such a way that if the values of x, y, and z are changed, the other values are automatically recomputed.

    Answer

    We do not need to use absolute references in this case, but when we are computing something involving the \(x\text{,}\) \(y\) and \(z\) values we should refer to cells B1, B2, and B3 respectively.

    clipboard_e4ce4fda3fa0f502bc20da8187c812654.png

    The spreadsheet should have entries as shown above.

    Exercise 4:

    Produce a spreadsheet where the first 101 rows are used. Row 1 should be used for labels. Column A should contain integers from 1 to 100. Columns B through F should contain the squares, cubes, square roots, logs base 10 and natural logs of the entries in columns A.

    Exercise 5:

    Start with the spreadsheet section below.

    clipboard_ef06885030551e8abe5100ef20da5b5cd.png

    If column E is copied and pasted into column G, give both the formula and value for each non-empty cell in column G.

    Answer

    Any entry that is absolute (with a $) will be fixed. The relative references (without the $) will change all the Bs to Ds because we moved over 2 columns.

    Formulas

    clipboard_e488ac7cfaa7690a36e2b5248a937f979.png

    Entries

    clipboard_e7a62f483af5d4cfeee5c1cf0fcb68cc8.png

    Exercise 6:

    We would like to really understand what happens when we use quick fill.

    1. Let's consider the entries =A1, =$A1, =A$1, and =$A$1 in row 2. Do quick fill below to fill in 3 more rows and see what happens. Clearly in the first row these cells all now point to cell A1 and the value returned is 1. After the first row we get a mixture of values. Why?
      clipboard_effd2622ed844273ebe1abedab903a841.png

    This page titled 1.3: Introduction to Excel Spreadsheets is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Mike May, S.J. & Anneke Bart via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.