Presentation is loading. Please wait.

Presentation is loading. Please wait.

1. Common Functions 2.

Similar presentations


Presentation on theme: "1. Common Functions 2."— Presentation transcript:

1 http://web.cse.ohio-state.edu/~ricel/ 1

2 Common Functions 2

3 Round Function 3 Syntax: =ROUND(number, num_digits) number: Number to be rounded num_digits: Number of decimal places

4 4

5 Type in Function or use the Function Wizard Function wizard: A short-cut to all the functions in excel (use fx toolbar button) that walks you through building a function 5

6 Copying Formulas with Relative cell referencing Automatically adjusts formula cell references when formula is copied. 6

7 Copying Formulas with Mixed cell referencing Keeps the column or the row reference in the formula the same when copying the formula (Signified by $) 7

8 Copying Formulas with Absolute cell referencing Keeps the column and the row reference in the formula the same when copying the formula (Signified by $ in front of column and row) 8

9 Hard Coding values Typing in the value in a formula or function instead of a cell reference What if service charge changes to 8%? 9

10 Named Ranges You can name a cell or a group of cells and use that name in your formulas. Treated as an absolute cell reference 10

11 COUNTIF FUNCTION Counts the number of items in a range that meet a specific criteria =COUNTIF(range, criteria) Range: A continuous range Criteria: Determines what cells to count 11 CriteriaCriteria SyntaxExample NumberType in number=COUNTIF(C1:C10,5) TextSurround text in quotes=COUNTIF(E1:E10,”USA”) Cell ReferenceType in cell reference=COUNTIF(G1:G10,A2) “Hard Coded” Boolean Expression Surround Boolean expression in quotes=COUNTIF( I1:I10,”>=5”) Cell Reference Boolean Expression Surround Boolean expression in quotes and type & before the cell reference =COUNTIF(K1:K10, “>=” &A5) Wild CardUse Asterisk=COUNTIF(M1:M10,”USA*”)

12 12

13 13

14 14

15 COUNTIFS FUNCTION Counts the number of items in a range (using multiple criteria and multiple ranges) that meet a specific criteria All criterion must be true in order for the cell to be counted =COUNTIFS(criteria_range1, criteria1,[criteria_range2,criteria2], …) Criteria_range1: A continuous range Criteria1: Determines what cells to count Syntax rules the same as COUNTIF 15

16 16

17 SUMIF/AVERAGIF FUNCTIONS Sums the number of items in a range that meet a specific criteria =SUMIF(criteria_range, criteria,[sum_range]) Averages the number of items in a range that meet a specific criteria =AVERAGEIF(criteria_range, criteria,[average_range]) Criteria_Range: A continuous range Criteria: Determines what cells to sum Sum_Range: If criteria is met, the computer will sum the corresponding entry in this range Same criteria syntax as COUNTIF If a sum_range argument is not used, the sum_range will be the same as the criteria_range 17

18 18

19 19

20 SUMIFS/AVERAGEIFS FUNCTIONs Sums a range (using multiple criteria and multiple ranges) that meet a specific criteria All criterion must be true in order for the cell to be summed =SUMIFS(sum_range, criteria_range1,criteria1,[criteria_range2,criteria2], …) Averages a range (using multiple criteria and multiple ranges) that meet a specific criteria =AVERAGEIFS(average_range, criteria_range1,criteria1[criteria_range2,criteria2], …) Sum_Range: Range to sum if criterion are met Criteria_Range1: Range of first criteria Criteria1: Criteria for range1 Criteria syntax rules the same as COUNTIF 20

21 21

22 IF FUNCTION Checks to see if a condition is true or false. If true one thing happens, if false another thing happens IF this is true, do this, else do this. =IF(logical test, value_if_true, [value_if_false]) Logical test must evaluate to true or false 22

23 23

24 NESTED IF IF this is true, do this, else IF this is true, do this, else, do this. =if(this = true, do this, else if(this = true, do this, otherwise do this)) Can be nested up to 64 times. 24

25 Assume no student has the same score. 25

26 IF with a range 26

27 Using Boolean functions =AND(logical1, [logical2], …) Returns true if all arguments evaluate to true =OR(logical1, [logical2], …) Returns true if at least one argument evaluates to true =NOT(logical) Changes false to true and true to false 27

28 28 Scores Statistics

29 Write a formula in cell Statistics!F2 to determine T/F if everyone passed the class. (A passing score is 320) 29 =AND(Scores!E5>=Scores!B2, Scores!E6>=Scores!B2,Scores!E7>=Scores!B2)

30 Write a formula in cell Statistics!F3 to determine T/F if all the students are honors students. 30

31 Write a formula in cell Statistics!F4 to determine T/F if Led Zeppelin’s total score and Rob Thomas’ total score is greater than Rascal Flat’s total score. 31

32 Write a formula in cell Statistics!F5 to determine T/F if as least one person passed the class. 32 =OR(Scores!E5>=Scores!B2, Scores!E6>=Scores!B2,Scores!E7>=Scores!B2)

33 Write a formula in cell Statistics!F6 to determine T/F if at least one person is an honors student. 33

34 34 Scores New Stats

35 Write a formula in cell New Stats!F2 to determine if everyone passed the class. (A passing score is 320) Display the text, “Everyone”, or “Not Everyone” 35 =IF(AND(Scores!E5>=Scores!B2,Scores!E6>=Scores!B2, Scores!E7>=Scores!B2),"Everyone", "Not Everyone")

36 Write a formula in cell New Stats!F3 to determine if all the students are honors students. Display the text, “All Honor Students”, or “Not Everyone is an Honor’s student” 36 =IF(AND(Scores!F5:F7),"All Honor Students", "Not Everyone is an Honors student")

37 Write a formula in cell New Stats!F4 to determine if Led Zeppelin’s total score and Rob Thomas’ total score is greater than Rascal Flat’s total score. Display the text, “Led and Rob”, or Rascal” 37 =IF(AND(Scores!E5>Scores!E7,Scores!E6>Scores!E7), "Led and Rob", "Rascal")

38 Write a formula in cell New Stats!F5 to determine if at least one person passed the class. Display the text, “At least one passed” or “No One passed” 38 =IF(OR(Scores!E5>=Scores!B2,Scores!E6>=Scores!B2,Scores! E7>=Scores!B2),"At least one passed", "No One passed")

39 Write a formula in cell New Stats!F6 to determine if at least one person is an honors student. Display the text, “At least one Honors student”, or “No Honor students”) 39 =IF(OR(Scores!F5:F7),"At least one Honors student", "No Honor students")

40 VLOOKUP/HLOOKUP Finds an entry from a vertical array (table) based on a criteria =VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup]) Finds an entry from a horizontal array based on a criteria =HLOOKUP(lookup_value,table_array,row_index_num,[range_lookup]) lookup_value: criteria to lookup or “match” table_array: the range or boundary of your table (excluding headings) col_index_num: the column number in your range that contains the corresponding data range_lookup: – True: Finds the finds the closest value in your table array without going over – False: Finds an exact match in your table array 40

41 Grade Book 41

42 Write an excel formula in cell C7 that can be copied down the column to determine the student’s letter grade. 42

43 Write an excel formula in cell D7 that can be copied down the column to determine the student’s letter grade. 43

44 44 Write an excel formula in cell C7 that can be copied down the column to determine the student’s letter grade.

45 45

46 CSE 2111 Lecture Iferror Function and Examples 46

47 47

48 Write an excel formula in cell C6 that can be copied down the column to determine the new rent for the corresponding rental property. 48

49 TABLE/ARRAY CREATION RULES FOR LOOKUP RANGE: TRUE TRUE Leftmost column should contain the table range Rightmost column should contain the value Leftmost column must be in ascending order Beginning value in table array must be the lowest lookup value used in the lookup function 49


Download ppt "1. Common Functions 2."

Similar presentations


Ads by Google