Dealing With Data in Excel 2013/2016
Dealing With Data in Excel 2013/2016
Excel provides the ability to do computations and graphing of data. Here we provide the basics and
some advanced capabilities available in Excel that are useful for dealing with scientific data.
Graphing Data
Let’s consider graphing the data given below. Go to cell A5 click and hold while highlighting to cell B12.
Then go to the Insert
ribbon and click on Scatter
to bring down the choices.
If you move the cursor
around on the choices, an
explanation appears.
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 1
One instance where you may want to use a different type of scatter plot is if you have non-linear data
such as absorption spectra: in such cases using the “Scatter/ smooth lines” option may be appropriate.
Click on the Layout ribbon (under Chart Tools, NOT “Chart Layouts” on the Design ribbon) as this is the
most useful ribbon for charts. Here you can remove the gridlines, label the x and y axes, add a title, and
maneuver the legend if needed. The Chart tools only appear if the graph is highlighted – click on the
graph to get them. Clean up your graph at this point!
You can also switch the x and y axes, or select a new set of data
by clicking the value box next to the series X and Y values and
highlighting the appropriate data.
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 2
This will get you the Format Trendline menu on the right
side and the Trendline Options. This menu will default to
a linear regression which you can change by clicking on
the other types of regression fits.
Linear regression minimizes the sum of the square of the deviations, where the deviation is the
difference between the calculated y-value minus the y-data value. This is shown visually with user eye-
balling a best-fit line using an interactive Excel spreadsheet at:
http://academic.pgcc.edu/~ssinex/regression.xls
Users can also explore the difference between interpolation and extrapolation with this spreadsheet:
http://academic.pgcc.edu/~ssinex/interpol_extrapol.xls
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 3
Simple Computations and Formatting Data
Transformation of data for analysis is very common. A large number of functions are available in the on
the Formula ribbon (click anywhere in the spreadsheet outside of a chart, then click Formula) using the
Function Library.
The More Functions button includes many common statistical functions such as standard deviation,
median, plus others.
You can type the function directly into a cell, or you can select it from the library.
Any function will have a specific syntax that will appear when the function is
selected. Hence to use average, you place the range of cells to average.
If you need to calculate a quantity down a column of data, click on the first cell and go to the lower right
corner (note the cursor changes) and click and hold while dragging down the column.
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 4
All calculations must start with an equal sign, “=” in the cell. To multiply numbers use the asterisk such
as 3*2. To raise a number to a power: 52 is 5^2. Many of the functions need only a cell reference to
deliver the quantity.
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 5
When the Format Cells menu pops up, select the Number tab. Here you can select Number and set the
number of decimal places. You can select Scientific is you want to use scientific notation. In Excel the
number 2.0 x 105 will show up as 2.0E5.
http://academic.pgcc.edu/~ssinex/excelets/Computational_Spreadsheets.pdf
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 6
Both horizontal and vertical error bars appear with a fixed value. The vertical or y error bars opens up
first as seen on the screenshot below of the Format Error Bars pop-up menu. To set the horizontal or x
error bar click on the horizontal bars on the graph. If you highlight the x error bars and then hit delete,
you can remove them.
We can add custom error amounts such as plus and minus one standard deviation. Here we are using
the standard deviation of the three values, so the error bar is plus/minus one standard deviation around
the mean value. Select the Custom at the bottom of the Format Error Bar menu and the Custom Error
Bars menu pops up. Click in the Positive Error Value box and then highlight the column of data and then
repeat for the Negative Error Value.
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 7
Standard Error of Slope and Y-intercept for Linear Regression with Confidence Intervals
This is a prebuilt spreadsheet to which you can add data that uses LINEST. This spreadsheet calculates
the standard error of the slope and y-intercept plus plots confidence intervals on the graph.
http://academic.pgcc.edu/~ssinex/excelets/regression_2.xls
The easiest way is to click on a graph and then right click and select copy in Excel. Move to Word or
PowerPoint and paste. You can drag a corner to resize. An alternate method is to use the Snipping Tool
is Windows 7 or your favor screen capture software to capture the graph as an image and save as gif or
jpeg and name the file.
Here is an Excel graph with y-variable error bars on the data points (markers), axes labeled, title, and a
linear regression line and equation. Try to keep the colors simple and all items readable on printing
especially if using a black ink printer. This is what a graph should look like!!!
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 8
Appendix
Adding a Regression Line or Trendline in Excel 2010
This will get you the Format Trendline pop-up menu. You may need to move it off the graph. This menu
will default to a linear regression which you can change by clicking on the other types of regression.
Dealing with Data in Excel Sinex & Wong (2012) modified by Sinex (2017) Page 9