# Relative Addresses: After I enter =B2/52 in cell C2 and then drag it down the C column to the last row what formula would I see in cell C5 if I clicked.

## Presentation on theme: "Relative Addresses: After I enter =B2/52 in cell C2 and then drag it down the C column to the last row what formula would I see in cell C5 if I clicked."— Presentation transcript:

Relative Addresses: After I enter =B2/52 in cell C2 and then drag it down the C column to the last row what formula would I see in cell C5 if I clicked on it? ABC 1PID (faked)PointsPercent 23587590500.962 3580732444 4692077032 5693083944 A)=B2/52 B)=B2/55 C)=B5/52 D)=B5/55

Conditional/If Function: What would be the correct function to type into cell C2 to indicate either “passed” or “failed”. Assume anyone who earned more than 30 pts passed. ABC 1PID (faked)PointsPassed? 2358759050 3580732444 4692077032 5693083944 A)=IF(B2>30,”passed”,”failed”) B)=IF(B2>=30,”passed”,”failed”) C)=IF(B2>30,”failed”,”passed”) D)=IF(B2>=30,”failed”, “passed”

The COUNT function counts the number of cells in a range with numerical data in them What does the COUNTA function return in this case? =COUNTA(A2:C5) ABC 1PID (faked)PointsPassed 2358759050passed 3580732444passed 4692077032 passed 5693083944 passed A)4 B)8 C)12 D)None of the above

Relative Addressing Copy A2 into D2 and into B3: What formula would be in each? D2B3 A=A1-11 B=D1-11=B1-11 C=D1-11=B2-11 ABCD 133445566 2=A1-11 3 4 5

Excel: Formulas and Functions Data (and increasingly large amounts of it) permeates our society and our disciplines – Those who can leverage computational tools and techniques for analyzing it will be primed to make contributions Excel is an amazingly powerful tool for – Data analysis – Data visualization We’ll find a new level of “understanding” of many Excel tools given our understanding of core computing concepts gained in Alice

Working Example: CSE3 grades in Excel Many profs keep track of grades in excel – Scantron form scanned, emailed as CSV (comma separated value), which is imported to Excel (chapter 3) – Each row has 2 entries* Student PID Number of points *Actually I get the direct scans and do my own grade calculations, so I can give partial credit… more later

An Example of a Common Organization National Data Buoy Center: – Station 46410 (LLNR 984.6) - 330 NM Southeast of Anchorage, AK(LLNR 984.6) #YY MM DD hh mm ss T HEIGHT #yr mo dy hr mn s - m 2010 11 18 12 00 00 1 3728.243 2010 11 18 11 45 00 1 3728.303 2010 11 18 11 30 00 1 3728.370 2010 11 18 11 15 00 1 3728.441 2010 11 18 11 00 00 1 3728.521 2010 11 18 10 45 00 1 3728.601 2010 11 18 10 30 00 1 3728.681

Faked: Dental Data Last NameFirst NameInsurance #Contact PhoneLast Cleaning RamirezJose1234455555-555-555510/26/09 SongSally1234567555-555-55548/29/10

Faked: UCSD Class Lists LastName, FirstName PIDCollegeEmailStaus Smith, Tanya Ann A09999999SIssmith1@u csd.edu FR Alvarado, Maria A011111111FImalvarado@uc sd.edu SO

What BEST explains in English the “purpose” of this formula? A.It generates the values 22, 33, 44 and 55 B.It generates a value which is 11 less than the top value in that column C.It generates a value which is 11 less than the value in the cell directly above it D.None of the above ABCD 133445566 2=A1-11 3 4 5

Absolute Reference: Uses in grading CSE3 midterms Keeping the “total number of points” – Rather than “hard coding” the number 52 in the equation, it should always use the number in B2 Easy for someone “looking” at the sheet to see the max points ABC 152 2PID (faked)PointsPercent 3358759050=B3/52 4580732444 5692077032 Let’s Change this

What would be the right formula: Given I want to be able to copy/drag it into ANY column on the sheet and get the grade for that row A.=B3/B\$1 B.=B3/\$B\$1 C.=\$B3/B\$1 D.=\$B3/\$B\$1 ABC 152 2PID (faked)PointsPercent 3358759050=B3/52 4580732444 5692077032 Let’s Change this

More CSE3 Midterm Analysis: How many people picked a specific distractor Count of each item (A-E) in a column – I’ll enter into B6: = COUNTIF(B\$2:B\$4,=“A”) I want to drag it down over the next three rows and then just change A to B, or C or D (less typing) ABC 1PID (faked)Q1Q2 23587590AD 35807324C D 46920770A B 5 6Count of As 7Count of Bs 8Count of Cs 9Count of Ds

Why do I use absolute addressing for the ROW? A.Because you want to be able to easily drag this equation across all the columns (questions on exam) without having to change it B.Because you want to make sure it always performs COUNTA on rows 2-4 C.I don’t know ABC 1PID (faked)Q1Q2 23587590AD 35807324C D 46920770A B 5 6Count of As 7Count of Bs 8Count of Cs 9Count of Ds = COUNTIF(B\$2:B\$4,”=A”) In B6

In Excel, a relative reference (no \$) (compared to an absolute reference (with \$))… A.Keeps the same row, column reference when you copy it into another cell B.Changes the row, column reference when you copy it into another cell, based on the value in the original cell C.Changes the row, column reference when you copy it into another cell, based on the location of the new cell compared to the old one

Absolute Addressing is useful for A.When you want to always reference the same column, no matter where you copy it B.When you want to always reference the same row, no matter where you copy it C.When you always want to reference the same cell, no matter where you copy it D.More than one of the above is true

Suppose I have two classes grades, in different sheets I find the average in the first class (Sheet1: B5) Then I’ll copy that over to (Sheet2: B4) so I’ll have the average grade for that class as well AB 1PIDPoints 25555552 34444448 43333350 5=AVERAGE(B2:B4) AB 1PIDPoints 29999940 38888838 4 5

What is in B4 in Sheet2? A.39 B.50 C.78 AB 1PIDPoints 25555552 34444448 43333350 5=AVERAGE(B2:B4) AB 1PIDPoints 29999940 38888838 4 5 D. Excel gives an error E. None of the above

Which of the following would cause a circular reference if I entered it in B2 and dragged it across row 2? A.=B1+B3 B.=A2+C2 C.Neither of those D.Both of those ABCD 1 2 3 4 5

Assume this function is put into I1 and then copied down to I4, =IF(H1="OK",G1+\$F\$1,G1-F1) What is in Cell I3? A.2 B.5 C.9 D.15

Assume this function is put into I1 and then copied down to I4, =IF(H1="OK",G1+\$F\$1,G1-F1) What is in Cell I4? A.2 B.5 C.12 D.15

Assigning points with If commands

What is the correct formula to use For Question 1 – D was worth 2 points – C was worth 1 point – Others worth 0 points A.=IF(B3=“D”,2), IF(B3=“C”,1,0)) B.=IF(B3=“D”,2,IF(B3=“C”,1,0)) C.=IF(B3=“C”,1,IF(B3=“D”,2,0)) D.More than one of the above E.None of the above

Match your PID (from scantron) to name (from classlist) In one sheet, I have the midterm scanned data – I’ve used if statements to assign points per question and summed them to get exam points In another sheet I have the downloaded class roster – (which usually has some people who didn’t take the exam – not the same number of rows) – It has PID and Name on each row Goal: Add a column in midterm sheet with the matching name for each student

What commands would you use to fill A3? A.An IF command B.An IF command with nested IFs C.A VLOOKUP command D.A VLOOKUP command with an IF nested in it E.A COUNTA function

To calculate A3= VLOOKUP(B3,classList!A\$1:B\$572,2,TRUE) For all items_in_classList_ColA one at a time If item_in_classList_ColA == midterm!B3 midterm!A3’s value is classList!B(index) else Do Nothing

Download ppt "Relative Addresses: After I enter =B2/52 in cell C2 and then drag it down the C column to the last row what formula would I see in cell C5 if I clicked."

Similar presentations