Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS&E 200 Exfunctions Using Functions in Excel Objectives: Using Excel functions l Sum, Min, Max, Average, Count l Large, Small, Rank l Round l Countif.

Similar presentations


Presentation on theme: "CS&E 200 Exfunctions Using Functions in Excel Objectives: Using Excel functions l Sum, Min, Max, Average, Count l Large, Small, Rank l Round l Countif."— Presentation transcript:

1 CS&E 200 Exfunctions Using Functions in Excel Objectives: Using Excel functions l Sum, Min, Max, Average, Count l Large, Small, Rank l Round l Countif & Sumif

2 CS&E 200 Exfunctions A Function is a predefined worksheet formula The advantage of using a function: l Saves time l Simplifies complex calculations l Faster l Less chance of typographical errors l Fewer characters in the formula bar Example: instead of =A1+A2+A3+A4+A5 use =SUM(A1:A5)

3 CS&E 200 Exfunctions The general format of a function is - Functionname(arguments) l Arguments – argument variables are used by the function to calculate the result. Arguments appear in a specific order. l Syntax – specific format required to use a function its name and order of arguments l Result – the value calculated by the function l Algorithm – a step-by-step procedure for accomplishing some end task. Functions take arguments and return a result

4 CS&E 200 Exfunctions The SUM Function l Syntax: SUM(number1,number2) Can type into cell, use AutoSum toolbar button or function wizard l Argument: Value or Range of cells to be summed l Algorithm: Arithmetic sum of all values listed in the range argument Example: In the formula =SUM(B2:B8) * 3 Excel will add the values in cells B2 through B8 and then multiple the result by 3.

5 CS&E 200 Exfunctions Function Wizard l Function wizard: A short-cut to all the functions in excel (use fx toolbar button) that walks you through building a function

6 CS&E 200 Exfunctions Using functions What formula is written in cell G5 and copied down the column to determine the total points earned by the corresponding student? (grades.xls) =SUM(C5:F5)

7 CS&E 200 Exfunctions Valid Range Arguments for a SUM function l A1:A4 - Range along a column l A1:D1 - Range along a row l A1:D4 - A two-dimensional range (Block) l A1, D3:D5, 7 - non-contiguous cells* * not all range arguments of functions can be used with non-contiguous cells Arguments of a SUM function

8 CS&E 200 Exfunctions Common Functions- with only a range argument Where number1, number2 are 1 to 255 numeric arguments. Arguments can either be numbers, ranged names or ranges of cell references which contain numbers.

9 CS&E 200 Exfunctions Inserting Rows/Columns into the Data What would happen to the value in cell B6 if we insert a row between 3 and 4 and add the order# 301 with the quantity of 1000? (1)Assume the formula in cell B6 is originally =A2+A3+A4+A5 (2)Assume the formula in cell B6 is originally =SUM(A2:A5) Cell references are modified but the new row is not included with ‘+’. The new row is included with the SUM.

10 CS&E 200 Exfunctions How a function’s algorithm can affect the resulting value l How does the Average function algorithm treat blank cells? l What value will result in cell A5 if it contains the formula =AVERAGE(A1:B4)? Blank cells are ignored  the resulting value is 20

11 CS&E 200 Exfunctions Many functions consist of several argument types l LARGE(array, k)  Large(B2:B5,2) will return the 2 nd highest value in the range B2 to B5 l SMALL(array,k)  Small(B2:B5,2) will return the 2 nd lowest value in the range B2 to B5 l What would happen if you tried to use a non- continuous range in these functions  =Large(B2:B5,E2:E5,2)? =Large(B2:B5,E2:E5,2) -- The comma tells the computer the next argument is the criteria – so the range E2:E5 is interpreted as the k value and an error will result.

12 CS&E 200 Exfunctions Use the Large function to Calculate the total lab score dropping the lowest score l The following formula with count only the 4 highest scores: =LARGE(C3:G3,1) + LARGE(C3:G3,2)+ LARGE(C3:G3,3) + LARGE(C3:G3,4) l Is this formula always equivalent to =SUM(C3:G3)-SMALL(C3:G3,1)?

13 CS&E 200 Exfunctions Setting up a Ranking Table using the LARGE/SMALL Functions =LARGE(A$2:A$5,C2) =SMALL(A$2:A$5,C2)

14 CS&E 200 Exfunctions Ranking a List: RANK(Number, Ref, Order) The rank function will give you the rank order of a specific value from a list of values. l Cell I3: =RANK(H3,H$3:H$6,1) – 83 is the third lowest value l Cell J3: =RANK(H3,H$3:H$6,0) – 83 is the second highest value Notice Lee’s Rank is also 3 and there is no Rank 4

15 CS&E 200 Exfunctions Syntax: Round (number, num_digits) l = Round (24.44,1) results in the value 24.4 l What value will result if you write the formula =Round (B2,0)*10 if cell B2 contains the value 81.3? l How would your write a formula to round the average value in cells Cl:C10 to the nearest ten? The Round Function changes the precise value of a number, not just its display  810  ROUND(AVERAGE(C1:C10),-1)

16 CS&E 200 Exfunctions COUNTIF (range*, criteria) – Range - a continuous cell range Criteria Syntax: - A number 6 =COUNTIF(B2:B7,6) - Text “USA” =COUNTIF(A1:A50,“USA”) - A cell reference B2 =COUNTIF(C3:C10,B2) - A Boolean expression “>5” =COUNTIF(A1:A10, “>5”) The COUNTIF Function counts the number of items in a range that meet a specific criteria.

17 CS&E 200 Exfunctions How many people scored above 70 points on Midterm 1? Using the COUNTIF Function =COUNTIF(B4:B6, “>70”)

18 CS&E 200 Exfunctions SUMIF(range, criteria, sum-range) Range – Continuous range used to compare the criteria Criteria – Comparison Criteria Sum-Range - If criteria is met, the computer will sum corresponding entry in this range The syntax of the criteria is the same as the syntax of the COUNTIF function: - a number such as 6 - text such as “Honor” - a Boolean value such as “<2” - a cell reference such as A1 The SUMIF Function sums the values in a range that meet a specific criteria

19 CS&E 200 Exfunctions Simple Examples of Using SUMIF =SUMIF(B2:B8, "BUS", D2:D8) Write a formula to determine the total value of all scholarships for BUS majors: Write a formula to determine the total value of all scholarship awards that are over $3000: = SUMIF(D2:D8,">3000")

20 CS&E 200 Exfunctions What formula can be written in cell C13 to determine the average freshman GPA for Graduating Seniors in BUS? How can we make the formula work when copied both down and across? = SUMIF ($B$3:$B$9,$B13,C$3:C$9)/ COUNTIF ($B$3:$B$9,$B13 )

21 CS&E 200 Exfunctions Other Categories of Functions Statistics: Mean, Median, Standard deviation Financial: Present value, Future value Logical: NOT, AND, OR Trigonometric: COS, TAN,

22 CS&E 200 Exfunctions What we’ve learned about functions l Functions are formula “shortcuts” – to use a function you need the function name and to enter the function arguments in the correct order and observe the specified rules. l Functions can be input into the worksheet either by directly typing them, in some cases using the AutoSum button on the toolbar or by using the function wizard. l The functions SUM, MIN, MAX, AVERAGE, & COUNT all have a single argument – a range and ignore blank cells and text. l More complex functions covered include LARGE, SMALL, ROUND, COUNTIF and SUMIF.


Download ppt "CS&E 200 Exfunctions Using Functions in Excel Objectives: Using Excel functions l Sum, Min, Max, Average, Count l Large, Small, Rank l Round l Countif."

Similar presentations


Ads by Google