Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 105 – Fall 20091 CS105 Lab 2 – Introduction to Excel Announcements: Midterm 1 on Sept. 29 th Watch website for info. on conflict exam.

Similar presentations


Presentation on theme: "CS 105 – Fall 20091 CS105 Lab 2 – Introduction to Excel Announcements: Midterm 1 on Sept. 29 th Watch website for info. on conflict exam."— Presentation transcript:

1 CS 105 – Fall 20091 CS105 Lab 2 – Introduction to Excel Announcements: Midterm 1 on Sept. 29 th Watch website for info. on conflict exam

2 CS 105 – Fall 20092 Objectives Understand cells and ranges Understand the difference between absolute and relative cell reference Use the fill handle Use functions in Excel Know the difference between copy, paste and fill

3 CS 105 – Fall 20093 Download the File Open a web-browser. Go to course website Click on “Lab Discussion Slides” Right-click on Excel Worksheet for Lab 2. C hoose “Save Link As” or “Save Target As” and save it on your desktop.Excel Worksheet

4 CS 105 – Fall 20094 A Spreadsheet cell reference cell contents Range of cells: click and drag over selected area B7:D7

5 CS 105 – Fall 20095 Entering Formulas Enter a formula in cell E7 to calculate the total points the student has earned Formula always start with = There are several ways to write this formula One way is: =B7 + C7 + D7 Another way is: = sum(B7:D7) operators a function

6 CS 105 – Fall 20096 Copying Formulas Copy the formula in cell E7 to the cell just below it (use Ctrl-C to copy and Ctrl-V to paste) What happens? Why? You can check formula in E8 in two ways: Click on a cell. Look OR Press Ctrl-~ to at the formula field. see formulas in all cells Formula mode

7 CS 105 – Fall 20097 Copying Formulas using fill handle Now copy the formula in cell E8 to the cells E9:E11 (this time, use the fill handle: click on it, hold, and drag it down three cells.)

8 CS 105 – Fall 20098 More Formulas Now, enter a formula in cell F7 to calculate the grade value. Use the total points in cell B16. (You want to divide the total points earned by the total points possible) =E7/B16 NOTE: You might think of using the average function here, but it will not work if the tests have different weights, which is actually the case

9 CS 105 – Fall 20099 Copying Formulas Again Now, copy the formula in cell F7 to cells F8:F11 What happens? Why? How can we change the formula so this doesn’t happen?

10 CS 105 – Fall 200910 Cell References By default, Excel adjusts cell references in a formula when the formula is copied and pasted The cell references will be changed by the same number of rows and columns that you moved the formula If you want the row or column to stay the same, put a dollar ($) sign in front of it

11 CS 105 – Fall 200911 Correct Version Use Ctrl-Z to Undo the Fill-Handle operation in cells F8:F11 Put the formula in cell F7 = E7 / $B$16 Then copy to or fill in the cells below it Is the first dollar sign necessary?

12 CS 105 – Fall 200912 Calculating Average Scores To calculate average in cell B14, enter the formula = Average(B7:B11) Copy cell B14 to the four adjacent cells to the right. (C14:F14) Or use fill handle, but this time horizontally

13 CS 105 – Fall 200913 Highest and Lowest Scores In cells B19:F20 we need to compute the lowest and the highest grades respectively. How you will do this? Min and Max functions to calculate the minimum and maximum of a range of values. =MIN(B7:B11) =MAX(B7:B11)

14 CS 105 – Fall 200914 Why Spreadsheets? Suppose the total points for the semester is changed to 360. Put 360 in cell B16. Notice how all the other numbers are automatically recalculated.

15 CS 105 – Fall 200915 How do Cell References Change? RelativeC2A1 Mixed$A2$A1 MixedC$1A$1 Absolute$A$1 Reference Type Copied to D4 Reference in B3

16 CS 105 – Fall 200916 More on Fill Handle Filling a sequential numbers Put 1 on H1 Put 2 on H2 Select H1:H2 Drag the fill handle down to H5 What happens? Try again with 1 on H1 and 3 on H2 “Test1” on H1 and “Test2” on H2 “1-May” on H1, “1-Jun” on H2 Click here drag here Select H1,H2

17 CS 105 – Fall 200917 More on Fill Handle Fill Handle works with: Numeric data, e.g. 1,2,3,… or 1,3,5,… Time, e.g. 10:00, 11:00, 12:00,… Dates, 1-May, 1-Jul, 1-Sep,… Currency….

18 CS 105 – Fall 200918 Move, Copy, & Fill OperationMove (Cut & Paste) CopyFill KeystrokesCtrl-X + Ctrl-VCtrl-C + Ctrl-VClick and drag the fill handle Source cellIs emptied after the Cut Remains the same Destination cell Contains data from source cell after paste Contains data* from source cell after paste Contains data* from source cell after fill *Cell data in these operations may have been altered. See next slide for details on how the data might be altered.

19 CS 105 – Fall 200919 Move, Copy, & Fill (continued) Cell content Move (Cut & Paste) CopyFill FormulasRemain the Same Are altered based on cell reference. DatesRemain the same Are incremented by 1 day TextRemains the same

20 What you should know What is an Formula and How to enter one in Excel Functions in Excel like Sum, Average, Min, Max How does using $C$2 differ from using C2 in a formula if we copy the formula across cells? How to use Fill handle? Differences when we use Cut, Copy or Fill. 20CS 105 – Fall 2009

21 Additional Exercises (see handout) Suppose each of the following formulas was entered into cell A1, and then cell A1 was then copied and pasted (Ctrl-C, Ctrl-V) into cell C4. What would the resulting formula be in cell C4 (keep in mind that Excel updates the formula)? = B1 = $B1 = B$1 =$B$1 =AVERAGE($B1:$B3) What would the answers be if the cells were instead cut and then pasted (Ctrl-X, Ctrl-V)? CS 105 – Fall 200921

22 Exercises What is wrong with the following formula? = ADD(B5:B9) CS 105 – Fall 200922 Write a formula for cell B8 that will compute the total number of points the student has earned in the class. Use a range.

23 Practice functions Go to the Practice Worksheet. You cell C9 to be the average of the sum of money spent in each month. How would you do it? Method 1 : Step by step calculation. Enter =SUM(C2:C7) in cell C8. Fill D8 and E8 Enter =AVERAGE(C8:E8) in cell C9. Can we avoid “wasting” cells to compute the SUM? Method 2 : Use nested functions Stay tuned for next lab 23CS 105 – Fall 2009


Download ppt "CS 105 – Fall 20091 CS105 Lab 2 – Introduction to Excel Announcements: Midterm 1 on Sept. 29 th Watch website for info. on conflict exam."

Similar presentations


Ads by Google