HOW TO – Simplify Calculations with Spreadsheets
All calculations done in lab may be done in a spreadsheet. You should be able to do all calculations by hand, but you may find it faster use a spreadsheet when there are multiple calculations using the same formula. The following information is specific to Microsoft Excel, but other spreadsheet programs (e.g. Google Sheets, LibreOffice, Numbers) are virtually identical.
Each column of data should have a header with the following information:
- The name or description of the quantity
- Its units in parentheses
To have Excel make a calculation:
- Highlight a cell and then click on the formula bar at the top of the data area.
- Type an equals sign (=) and then enter your formula.
- The contents of a given cell can be input by typing the cell number in parentheses, e.g., (A4).
- You can then use various operators as listed below to write a formula. For example, typing “=(A4)+(B4)” into the formula bar for cell C4 will return the sum of A4 and B4 into cell C4.
- You need to hit “enter” to complete the formula. If you copy-paste this formula into the next cell down, Excel will automatically change the cell numbers to match the new row. That is, the above formula copied from C4 to C5 will become “=(A5)+(B5)”. If you don’t want the formula to change as you copy it, put a dollar sign in front of the cell number and/or letter. For example “=($A$4)+($B$4)” will always return the sum of A4 and B4 no matter what cell it is copied into.
There are a large number of functions in Excel and clicking the “fx” button by the formula bar will bring up a list of them. Some common ones are below.
- SQRT(A4), – Returns the square root of the value in cell A4
- ABS(A4) – Returns the absolute value of the quantity in cell A4
- POWER(A4,X) – Raises the value in cell A4 to the X power
- TAN(A4), COS(A4), SIN(A4) – Returns the tangent, cosine or sine of the value in cell A4 (in radians)
- ATAN(A4), ACOS(A4), ASIN(A4) – Returns the arctan, arccos, or arcsine of the value in cell A4 (in radians)
- AVERAGE(A1:A34) – Returns the mean of the values in cells A1 through A34
- STDEV(A1:A34) – Returns the standard deviation of the values in cells A1 through A34