Computers, part of your life 1 Grade 11 Calculations Module 4.2 2 3 Contents Functions Interpretation of error indicators Test and improve Module activities 4 Functions 5 ROUND function Used to round numbers to a specified number of decimal places Number Example of function 92.6 =ROUND(A1,0) Result Description Rounds a number to the 93 nearest integer 78.8987 =ROUND(A2,1) 78.9 Rounds a number to 1 decimal place 65.345 =ROUND(A3,2) 65.35 Rounds a number to 2 decimal places 68.5275 =ROUND(A4,3) Rounds a number to 3 68.528 decimal places 6 ROUND function vs. Increase / Decrease Decimal ROUND function • Result is the true rounded number Increase / Decrease Decimal • Values stored in cells remain the same Activity 1 7 8 LARGE and SMALL functions Function What the function does Example Determines Nth largest =LARGE(range, N) number of all values in =LARGE(A2:A30,2) range =SMALL(range, N) Determines Nth smallest number of all values in range =SMALL(B1:B100,3) Activity 2 9 10 Functions which can count (1) Function What the function counts Example =COUNT(range) Number of cells in a range which contain numerical values =COUNT(A1:A10) =COUNTA(range) Number of cells in a range which contain any value (text or numeric), i.e. cells which are not empty =COUNTA(C1:C10) 11 Functions which can count (2) Function What the function counts Example =COUNTBLANK(range) Number of empty cells in range =COUNTBLANK(B2:B12) =COUNTIF(range, criterion) Number of cells in range that meet a certain criterion =COUNTIF(A3:A10,10) =COUNTIF(C3:C10, "Pretoria") =COUNTIF(B2:B10,">=70") 12 COUNTIF example Count the number of grade 10 learners – i.e. the number of times the value in B12 is found in the range C3:C10 Note the use of absolute referencing Activity 3 13 14 SUBTOTAL function To summarise data quickly To have subtotals for each Grade group, SORT the worksheet by this column Subtotals for any of the columns can be inserted for each Grade 15 SUBTOTAL function • Select data (also column headings) • Sort data according to group you want to summarise • Data tab Outline group Subtotal Group to summarise Function to apply Column/s for subtotals Activity 4 16 17 Other handy functions Function What function does Example =RAND() Returns a random real number between 0 and 1 =RAND() (e.g. 0.2342 or 0.985678 ) =RANDBETWEEN (bottom,top) Returns a random whole number between two specified numbers Raises a number to a =POWER(number, power power) (e.g. 52 = 5 x 5 = 25) =RANDBETWEEN(1,100) =POWER(5,2) Activity 5 18 19 Calculate the sum of certain cells = SUMIF(range, criterion, sum_range) Range is the range of cells tested to determine if any cells in it meet the criterion Criterion determines which cells are added – can be a number, text or expression Sum_range is the range containing the cells that are added – if corresponding cells in the range meet the criterion 20 Calculate the sum of certain cells = SUMIF(B2:B6, 11, C2:C6) Tests range B2:B6 Criteria: cell must contain value 11 If the value of the corresponding cell in column B is 11, it must be added Result of the SUMIF function in cell C8 is R45.00 The cells that meet the criteria are B2, B4 and B5. The values in corresponding cells in column C are R20.00 (C2), R10.00 (C4) and R15.00 (C5), which add up to R45.00. 21 Entering a SUMIF function is made easy using the Insert Function command on the Formulas tab Activity 6 22 23 Interpretation of error indicators 24 Error indicators start with a hash (‘#’) Error indicator Likely cause of error Missing operator, colon or comma, e.g. #NULL! Circular Reference =D1 + D2 + D3 D4 =SUM(A1:A10 B1:B10) =SUM(A1 A10) When you enter a function / formula that contains a cell reference that is the same as the current cell, e.g. entering =A1*2 in cell A1 Possible solutions Ensure that an operator, colon, or comma is entered where required Ensure there is no reference to the same cell where the function / formula has been entered Activity 7 25 26 Test and improve Use summary for your revision Written module activity 27 Practical module activity 28