Download - Conditional and Cross-Sheet Formulas
![Page 1: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/1.jpg)
Conditional and Cross-Sheet FormulasWilliam Klingelsmith
![Page 2: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/2.jpg)
Announcements• Homework 2 (Healthcare Expenditures Problem) due this
Friday (2/15/13) by 11:59pm• Homework 3 due 2/22/13 by 11:59pm
![Page 3: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/3.jpg)
Homework 1 Review• Grades overall were very good• Submission rates were high• Any questions about your grade? Ask after class or during
open lab this week
![Page 4: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/4.jpg)
Cheating Cases• There was one instance
of cheating in both sections• Remember that cheating
twice will automatically earn you an F for the class• Protip: when copying
files from your friends, remember to remove their name from the very first cell in the worksheet
![Page 5: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/5.jpg)
Homework 1 Common Errors• =RANK() function• If you used the pointing method to construct your formula, you
may ignore rant• =RANK(B4,B$4:B$336)
• =RANK(B4,$B$4:$B$336) also acceptable
• Average duration formula• =(D4-E4)/F4• Remember that the order of operations matters!
• Using AVERAGE in Miles Per Day and Passengers Per Day• Unnecessary because the ‘averaging’ is done by the division• Points were not taken off this time
![Page 6: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/6.jpg)
Good job!• One student had a
unique solution to the two formulas on the Usage worksheet• =IF(E4=0," ",B4/E4)• Prevents the division
by zero errors
![Page 7: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/7.jpg)
Conditional Formulas• Excel has a set of formulas which implement logical tests to
narrow down results• One you may have seen thus far is the =IF() statement
![Page 8: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/8.jpg)
=IF() Statement• The IF function lets you perform one calculation or another
depending on a specific condition• The =IF() function has three arguments• Logical_test: the defined condition• Value_if_true: what will happen if the logical test is true• Value_if_false: what will happen if the logical test is false
![Page 9: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/9.jpg)
=IF() Statement• On the band worksheet, insert a new column called ‘SA
Good/Bad’ to the right of Scholarship Amount• In cell I2, enter the formula• =IF(H2>=4500, "Good", "Bad")
• The above formula works as follows:• Take the value (H2) and compare it to the logical condition• If the logical test is true, do the second argument (Place the word
“Good” in the cell)• If the logical test is false, do the third argument(Place the word
“Bad” in the cell)
![Page 10: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/10.jpg)
=IF() Statement
>4500
“Good” “Bad”
![Page 11: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/11.jpg)
=IF() Statement• All of the familiar comparison operators from mathematics
can be used in the logical test of an IF statement (=, <, >, >=, <=)
• To construct a logical test using textual data, you will need to use quotation marks• Example: =IF(B2=“M”, “Boy”, “Girl”)
• Create a new column called ‘Graduating Soon?’• If the student is a senior, have an IF statement output the word
Yes, else output No
![Page 12: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/12.jpg)
Multiple Conditions• There will be instances where one logical test is insufficient• Let’s say we wanted to highlight which band members were
women who play the flute• By embedding an AND() function in the logical test of our IF
statement, we can test for multiple conditions
![Page 13: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/13.jpg)
AND() Function• The AND function is an aggregation of several logical tests• All logical tests must be true for the AND function to return
true• Insert a column to the left of ‘Sex’ and name it ‘Female
Flautist?’• In B2, enter the formula:• =IF(AND(C2="F", G2="Flute"), "X", "")
![Page 14: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/14.jpg)
Statistical Conditional Functions• We have learned about basic stat. functions such as AVERAGE,
SUM, MIN, MAX, etc.• Excel has functions which combine the above functions with
the power of an IF statement• All of these functions have similar syntax:• Range: the cell range which holds the criteria• Criteria: the condition we’re trying to satisfy• [function_range]: the cell range the function will execute on
![Page 15: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/15.jpg)
Statistical Conditional Functions• Let’s say we’re trying to find the average scholarship amount
of women only• In cell A67, type “F Amount”• In cell B67, type the formula:• =AVERAGEIF(C2:C65, “F”, I2:I65)
![Page 16: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/16.jpg)
=COUNTIF()• We’re now interested in counting up the number of students
with a height of six feet or more• In cell A68 enter the label “Tall Students”• In cell B68 enter the formula:• =COUNTIF(D2:D65, 6)
![Page 17: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/17.jpg)
Plural Versions• Each of these functions has a counterpart which allows
multiple conditions to be used• AVERAGEIFS• SUMIFS• COUNTIFS• Etc.
![Page 18: Conditional and Cross-Sheet Formulas](https://reader035.vdocument.in/reader035/viewer/2022062422/56813087550346895d966221/html5/thumbnails/18.jpg)
Cross Sheet Formulas• Excel has the capability of using data from one worksheet in
functions on another worksheet• The syntax takes the form of:• =SUM(‘Sheet Name’!<Cell Range>)
• The easiest way to set up these formulas is to simply select them