# INTRODUCTION TO EXCEL 2003

(partially taken from "User's Guide to Microsoft Excel") Welcome to Excel! This reading will walk you through a simple physics example and how you can use Excel to do data analysis more efficiently and easily. This section will be a valuable reference as you go through the semester doing your analyses.

**Starting Microsoft Excel
**

If there is no desktop icon to open Excel, click the Start button and open the All Programs menu. Excel will show up as a separate icon or will be found in the Microsoft Office folder.

Opening a Workbook

The workbook is the normal document or file type in Microsoft Excel. A workbook is the electronic equivalent of a three-ring binder. Inside workbooks you'll find sheets, such as worksheets and chart sheets. Each sheet's name appears on a tab at the bottom of the workbook. You can move or copy sheets between workbooks, and you can rearrange sheets within a workbook. In this tour, you'll make a new workbook in which you will be calculating the velocity and its uncertainty from a set of data values for distance and time.

**What's on the Screen
**

When you create or open a workbook, Microsoft Excel displays it in a window. There are a few areas of the Excel window which you should note.

formula bar

menu bar

tool bars

Most of the work you do in Microsoft Excel will be on a worksheet. A worksheet is a grid of rows and columns. Each cell is the intersection of a row and a column and has a unique address, or reference. For example, the cell where column B and row 5 intersect is cell B5. You use cell references when you write formulas or refer to cells. Generally, you first select the cell or cells you want to work with, and then you enter data or choose a command. Selected cells appear highlighted on your screen. The active cell is the cell in which data is entered when you start typing. Only one cell is active at a time. The active cell is shown by a heavy border. In the preceding illustration, cell A1 is the active cell. To change the active cell Move the mouse pointer into cell B4 and click the left mouse button. Notice that the cell's reference ("B4") and its value (blank, so far) appear in the formula bar.

you know that the velocity is related to the distance and time traveled in the following way (assuming constant v):
v=
d where v is the velocity. Similarly enter the corresponding distances in the B column. and then release the mouse button. select cell C1 and enter: Velocity (m/s). Move the pointer between the B and C column headings until it changes into a double arrow. You should periodically save your worksheet.xls (e. Initially. and then click. The worksheet scrolls down one row. Highlight cells A2:B4 (A2 through B4). Hold the left mouse button down. t
So. 42s. Your worksheet should now resemble the following illustration:
Building Formulas to Calculate Values
. Select cell A1 and type: Time (s). Excel files are given the extension . you could click the mouse cursor up in the formula bar and retype. Click the scroll bar area below the scroll box. calculate the velocity using the above equation. occasionally save your worksheet by typing CTRL-S. Move the pointer to the down arrow in the vertical scroll bar on the right edge of the window. click on the down arrow under Drives and select a:. From basic physics. First. Since the entire word does not fit into the cell. and then double click (always use the left mouse button).
Entering and Editing Data
Imagine wanting to find the velocity of a car. Enter 20.To scroll through the worksheet 1. This is called dragging.g. 2. we need to enter the data. It’s useful to give each column a heading. 9 (no units) in cells A2. Let’s have three columns: distance. 1000m. you will need to adjust the column width. To save the file on your floppy disk (if it is not already). vel. d is distance and t is time. Generally. a simple experiment would be for the experimenter (you!) to use a stop watch to test the amount of time it takes the car a known distance and from this. time and velocity. Let’s try this. A3. As you proceed. Go back and select cell A1. choose SaveAs. Select cell B1 and type: Distance (m) and press ENTER. Notice in the formula bar appears “Time (s)”. 3. The worksheet scrolls back up to the first row. Now we can enter our data. Finally. 9s respectively. Move the pointer into the scroll box. The worksheet scrolls down one screen. go into the File menu. Let’s assume that this measurement was performed three times at three different distances of 500m. and A4 respectively. This simply indicates that the column of data following cell A1 will be of times measured in seconds. and the times were found to be 20s. A suggested file name will appear under File Name: To change it. 42. 250m. If you wanted to change the heading.xls). move the pointer back to the top of the vertical scroll bar. click on the File Name: box and edit it as desired.

If they are present. Otherwise. To really make that data useful.. you will know how many digits it should have. You may also need to adjust the column width. In Excel. you can type them directly into the cell (after the = sign).. while the value should be 27. You normally see the formula itself only when you're editing the cell that contains the formula. Type = in the function bar.777. Select AVERAGE if it appears as a function selection in the current menu or delect the Statistical category of functions and click on AVERAGE. the formula should read =B4/A4. click on them to decrease the values to only have digits in the tenths place. With the mouse. You can add them by customizing your toolbar. or they can do much more complex things. highlight cells C2:C5. For now. Formulas can do simple things. 1. such as adding the values in two cells. This tells Excel to use the value in cell B2 (500) and divide it by the value in cell A2 (20). 3. Here's how Excel uses the SUM function to add two values together. Notice that the formula =B2/A2 appears in the formula bar. 3. you see the value produced by the formula. Position the mouse cursor in the lower right corner (known as the fill handle) of cell C2 until it resembles a plus sign. then click on the fx button just at the left of the formula bar. As is. Select cell C5. you might add two numbers like this
1 +2 3
You can always identify a formula in Excel because it starts with an equal sign (=). Say you wished to find the average of all the velocities. The formula should automatically increment such that in cell C4. you've entered data in a worksheet. When you learn more about significant figures. 2. Type C2:C4 NOTE: You may also use the mouse to highlight these cells. 1. your toolbar has been preset or customized not to include the buttons. Type =B2/A2. Hit ENTER.. you'll write formulas. Press ENTER to accept the proposed formula. Note the parenthesis and don’t hit ENTER yet! You should be prompted to enter the range of cells to be averaged. 2. choose cell C2. 4. The value 25 should appear in the cell. Instead of having to rewrite the same formula for cells C3:C4. Click back onto cell C2. Close the parenthesis with the final result being: =AVERAGE(C2:C4) 5.So far. On paper. The far right on the toolbar should include Increase/Decrease Decimal buttons which look like this: . Instead of typing =(C2+C3+C4)/3. If necessary. your final value could have any number of digits. Selected cell Fill handle Click on the fill handle of cell C2 and drag the mouse down through cell C4. The final value should be 25.. but for now you can also change the number of decimal places clicking on
. you’ll want to use the “fill handle”. Excel has a function which will do this automatically. you could click up there to edit it. If it’s not already selected. let’s assume we only want to go to the tenths place. do this Now you will create a formula to calculate the velocity. If the Increase/Decrease Decimal buttons are not present. Note: when you become familiar with the different functions available in Excel and the proper format for entering function arguments.529.

Decrease the decimals down to 1. Standard deviation only works for a large number. (For more explanation on standard deviation. The uncertainty in the average is not just σ. if it’s a bad day and the darts are going all over the place. then there is a large standard deviation. The formula used to calculate standard deviation. since you have 3 data points. type = and using the function (fx) in the tool bar or the function menu in the formula bar select the command for standard deviation (but don’t press ENTER yet).m/s.) Label this by typing Uncertainty = in cell B6. N. it is
σ
N
. To divide by √N. select the range from the data given. 4. but fortunately. Cells A8:C8 should now be a duplicate of A2:C2.960. of data points.
Whenever you have a new value. 2. The value you should get is 0. you should always give it a label. 1. Choose PASTE from the Edit menu. you should have at least 10 data points to use standard deviation. think of it as throwing darts at a dart board. you’ll need to do a few things first.. Be careful not to change any values in your range! Before proceeding.Format in the menu bar. Before we proceed to the next section. Excel has a function which will work through it automatically. be sure to delete any new formulas you've created. read the last section of the Experimental Uncertainty Review link on the Physics 108 web page and the Uncertainty Tutorial link on the Physics 108 web page. In cell B5. A dotted line should appear around the cells. given as σ. but how do you account for it only being the average? The best way to do this is to use the property of standard deviation which gives an indication of the spread of velocities used in calculating this average. 3. for this case. most of the darts will hit a small area near the bulls-eye resulting in a small standard deviation. Choose COPY from the Edit menu. If things are going well. end the parenthesis and hit ENTER. Select cell
C6. You might want to try other formulas and see how they all work. However. The range. then select Number from the Number Tab. type average = . Choose a formula. You worksheet should now appear like the following:
=B4/A4
=AVERAGE(C2:C4)
Select any blank cell and hit the fx (function) button from the toolbar to discover what other formulas Excel offers. You will be prompted for the number of decimal places you want. enter /SQRT(3). Select cells A2:C2. The end formula should be =STDEVP(C2:C4)/SQRT(3). This function is =STDEVP(range) where range is the set of data for which you wish to calculate σ.
. is: σ =
1 N −1
∑[ x(i) − x]
N i=1
2
This is a pretty
involved expression. Click on cell A8. will be C2:C4. As an analogy. as a general rule.. rather. which you can type in manually or select by highlighting those cells.
Standard Deviation
This average value is perfectly reasonable.

This uncertainty will tell the person reading your data (us!) about what the velocity is. But. For example. Finally. To find the uncertainty in the velocity. Let’s do the distance first. 1. Choose cell B9. The corresponding velocity should have automatically changed to 25. Move to cell C14 and do similarly for the partial with respect to time. Enter the min distance (=500-1) into cell B10. (isn’t Excel great?!) 4. This value is the total uncertainty for the velocity. you will enter the max distance of 501 (=500+1). in cell A13. our distance has some uncertainty to it as well. line. Excel includes several chart types. In that case. 5. For example. Now you should have five identical rows of data. see the Experimental Uncertainty Review and Uncertainty Tutorial links on the Physics 108 web page. select cell C15 and add together cells C13+C14. 2. Find this value using Excel.Partial Uncertainty
The above calculations assumed that every data value is exact.
Creating a Chart
Charts are visual representations of worksheet data. you could type: partial unc wrt d = For more on partial uncertainties. and pie charts. t = (20 ± 3)sec . This means that we will find the partial uncertainty of the velocity with respect to the 1) distance and 2) time and then sum of the partials gives the total uncertainty. The partial for v wrt t is from the diff/2 of cells C11:C12. Highlight cells A8:C8. We assume there’s no time uncertainty and see how just the distance uncertainty affects our calculation of the velocity. suppose that you measure the time traveled to have been 20 sec. if you find the difference of cells C9:C10 divided by two. Using the fill handle. Let’s say d = (500 ± 1) m. This section of your worksheet should resemble the following:
diff/2=unc in v wrt d diff/2=unc in v wrt t Now. or maybe it was a little hard to tell when the car exactly crossed the border (how well do you know the distance anyway?). To find the total uncertainty of the velocity. drag down through cells A12:C12. select cell C13 and enter the formula =(C9-C10)/2. your reaction time may have slowed you down. such as bar. Since no measuring device is completely accurate. You can use charts to clarify trends or relationships that might not be apparent in the worksheet data alone.
. but makes no claims that this is exactly what the velocity is (because it’s not). There is an uncertainty associated with each measurement which will give an uncertainty for the calculated velocity. you will need to make an educated guess (how these guesses are made will be explained in lab) as to how far off your measurements might be. To get an uncertainty. Enter the min and max times in cells A11 and A12 respectively. so maybe the time could have been anywhere between (17-23)sec. 3. this will give the partial uncertainty of velocity with respect to (wrt) the distance. Notice cell C9. we will use partial uncertainties. To find the partial with respect to d.1. In here. It is also very helpful to label each of these uncertainties for what they are. add together these two partial uncertainties.

Choose the Next button to continue. Single click on your chart (it will become outlined in color). you can also adjust the axes. choose Trendline. Under the Options tab. Type best slope = 2. Click on one of the data points (they should appear highlighted). and A2:A4 are the x. choose the linear graph option. double click on the best fit line on your graph. 2. add gridlines and a legend for data points. time data and embed it directly on the worksheet. Under Type. Add a chart title and x and y axis labels. 6. and the value for the best-fit slope (which is the velocity--do you see why?) of 22. To do this.
Manipulating the Chart
Often. 3. Select cell B17. 4. Select the appropriate button to place the chart on your current worksheet. Choose the Next button to continue. You can change the weight of the line by going to the Patterns tab.
. or it appears on its own chart sheet in the workbook. make the changes in the data range box. Hit OK and the best-fit line should appear on your graph. A2:A4). Click the ChartWizard button. A Format Trendline window should appear. Move to cell C17.. Notice the slope calculated above corresponds to the linear term of your trendline equation. Enter =linest(B2:B4. If it is not correct or you want to change it. double click on the line itself. 4. click on the legend tab and deselect the Show Legend box. For this graph. 7. Where B2:B4 are the y data. select Display Equation on Chart and hit OK. Make your own calculation of this slope and see how it compares to Excels.. Excel automatically updates a chart if the worksheet data upon which it's based changes.A chart is either embedded directly on a worksheet. Using different tabs in this window. That data range you selected in step 1 should be displayed as the current setting. Highlight the cells in the worksheet that you want to be graphed. Select the graph subtype from the samples that plots data points but doesn’t draw lines or curves. Now you'll create a line chart of the distance vs. Choose the Next button to continue. A new window should appear with two options. To display the equation on your graph. You now have the choice to place the chart on the current worksheet or to place it on a new sheet. 8. you'll use the ChartWizard. 11. 1. To plot this best fit line 1. 1. 2.7 m/s should appear. Select Finish. The ChartWizard dialog box appears.
9. 3. and interactive charting assistant. 3. Select X-Y scatter. 6.
Excel creates the chart on the worksheet. 5. Hit enter. Excel will calculate it numerically as well as draw this line (called a “trendline”) on the chart. we will ask you to find the slope of the best-fit line for your data. To make the line thinner.. 10. Under the Chart menu in the toolbar. 5.

Double click on the y axes. Finally. button. Can you figure them out? For hints. Compare your finished page with the final product below.. Under Scaling. you may need to change the scale of the axes. These lines indicate page breaks. On the right side of this window.. 2. (you can get there directly under the File menu). Select Landscape for the Orientation and click on OK. If it will take many pages. Change the scaling: Again. once everything will fit on a (hopefully!) single page. check to make sure that the printer is on and on-line and then click on OK.. and the scale of the y axes should have changed. B. Excel will NOT do this for you. To see how the printed copy will appear. We will ask you to do max and min slopes as well. select Print Preview from the File menu. (Do NOT select the printer icon!) At the bottom of the Print Preview page. Try to prevent words from spilling out onto the next page by adjusting column widths. A print dialog box will appear. you will change the y. Under Scale tab. click on the Setup button. so make careful note of its contents. Always try to make sure it will print how you want it the FIRST time. by 1 tall. go back to Page Setup. first unclick the Auto box next to Minimum: and change its value to -1000.
. it will indicate how many pages long the document will be. try one of the following "tricks" to minimize pages: A. Print. In this example. 1. double click on it. click the Print. click the box next to Row and Column Headings. Page tab. When you’re happy with how your worksheet looks and it’s ready to be printed. A Format Axes window should appear.. Have the document print horizontally rather than vertically: Click on the Setup button and then choose the Page tab. If you scroll around on your worksheet. 3. such that a small x appears. either Adjust to: X% of normal size. Please do this every time you print an Excel worksheet. we try to make the analysis such that it will take only one sheet of paper.) Occasionally. or hit ENTER. or click on Fit to: 1 page wide. you should notice two dotted lines: vertical near column J. In general. if it’s not already selected. In the middle section. 4.
Printing your results
The information in this section should apply to EVERY lab you do. The same technique applies to either the x or y axes. go to the Experimental Uncertainty Review link on the Physics 108 web page to the section on Graphs and Error Flags--Uncertainty in the Slope of a Line. Choose OK. save it to your floppy and move to one of the printer-connected computers.(Note: This is only the best slope. Close the Print Preview option. Select the tab Sheet. If the chart isn’t still selected from before. and horizontal near row 40.

3x10-3) [arc]cosine of θ (θ in radians) [arc]cosine of θ (θ in degrees) slope from m=∆y/∆x
in Excel + . it will save a lot of time for doing analysis..g. if you learn it. Spend the rest of the time simply messing around with Excel. write the formulas used in Excel on the sheet itself or in your lab notebook.* / ^ =average(range) =stdevp(range) =pi( ) =sqrt(cell) E (e. and it definitely has its quirks! But. 3E-3) =[a]cos(cell) =[a]cos((PI()/180)*(cell)) =linest(y range. x range)
. Have fun!
USEFUL EXCEL FORMULAS
in English plus minus times divided by power of average standard deviation π square root exponent (e.After printing your worksheet.g. It's a powerful spreadsheet and fairly straightforward to use.