Data Analysis using Spreadsheets

3. Calculations

You can also use spreadsheets to create calculations and display or extract data in certain ways using functions.

Creating Spreadsheet Formulas - click on the Formula Bar and type the formula. Begin the line with an equal sign (=). Formulas use a variety of mathematical operators and worksheet functions to work with values or text. As such they consist of:

  • Mathematical operators, such as + (for addition), * (for multiplication), - (for subtraction), / (for division). For instance, =A1+A2, adds the values in cells A1 and A2.
  • Values or text, for example, =420*0.5, multiplies 420 times 0.5. This formula uses only values, and it always returns the same result as 210.
  • Cell reference (including named cells and ranges), like =A1=C12, compares cell A1 with cell C12. If the cells are identical, the formula returns TRUE; otherwise, it returns FALSE.
  • Worksheet functions (such as SUM or AVERAGE), for example, =SUM(A1:A12), adds the values in the range A1:A12.

Graphic showing how to create Formulas

Graphic showing how to create Formulas

Inserting and reusing functions - like with formulas, functions are inserted into the Formula Bar and they begin with an equal sign (=). This is followed by the name of the function and parentheses. Inside the parenthesis is a list of arguments. Functions vary in how they use arguments and depending on what it needs to do, there are:

  • No arguments −Now(), Date(), etc.
  • One argument − UPPER(), LOWER(), etc.
  • A fixed number of arguments − IF(), MAX(), MIN(), AVERAGE(), etc.
  • An infinite number of arguments
  • Optional arguments

There are a variety of built-in functions to choose from. Just by typing any letter after = in the Formula Bar, you will see a list of functions to choose from starting with that letter. Another way of inserting functions is to click fx next to the Formula Bar. You can also go to the Formulas Tab and select Insert Function. This will open a window where you can search for functions by categories or even describe what it is supposed to do to find it.

Graphic showing how to Insert and Reuse Functions

After selecting the desired function, click OK. This will open another window where you will be required to enter the values that will be operated on by the function. Once the values are entered, click OK.

Graphic showing how to click on a Function

You can see the SUM function being applied above.