01 Lecture 3 Advanced Excel Functions
01 Lecture 3 Advanced Excel Functions
The advantage of
using a function:
Saves time writing
Simplifies complex calculations
Faster execution
Less chance of typographical errors
Fewer characters in the formula bar
Lab1 Lab2
D
MT
D
E
Final
E
F
F
Total Percent
G
G
H
H
=COUNT(B5:B8)?
Use =COUNTA(B5:B8) 2
IF SCORES SHOULD ONLY BE REPORTED AS
INTEGERS.. HOW CAN WE FIX THIS IN EXCEL?
The Increase/Decrease
decimal buttons do NOT
change a value only how
the value is displayed.
Use the ROUND function to change the
precision of a value
THE ROUND FUNCTION CHANGES THE
PRECISE VALUE OF A NUMBER, NOT
JUST ITS DISPLAY
Syntax: Round (number, num_digits)
= Round (24.44,1) results in the value 24.4
The ROUND function can be part of a larger formula:
What value results: =Round (B2,0)*10 if cell B2 contains the value 81.3?
How would your write a formula to round the average value in cells Cl:C10 to the nearest
ten?
810
ROUND(AVERAGE(C1:C10),-1)
THE NUM_DIGITS
Positive num_digits
ARGUMENT round to the specified
number of decimal
places
A zero results in a
whole number
Negative num_digits
round values to tens,
hundreds etc.
Notice the Σ SUM gives different
results when adding rounded values
How can we count the number of honor students if regular students have
the letter R in the honor’s column? Before we used a COUNTA and
ignored blanks but counted text.
USE THE COUNTIF
FUNCTION
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 comma tells the computer the next argument is the criteria – so
you cannot list individual cells separated by a comma for the range
How many people scored above 6
points on either lab?
=COUNTIF(C5:C8,D5:D8, “>6”)X
=COUNTIF(C5:D8, “>6”) √
The SUMIF Function sums the values in a
range that meet a specific criteria
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
the 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
SUMIF FUNCTION
=SUMIF(B$2:B$6,A9, C$2:C$6)
USE THE AVERAGEIF FUNCTION TO AVERAGE VALUES THAT MEET A
SPECIFIED CRITERIA – AVERAGE NUMBER OF COURSES TAKEN BY
STUDENTS IN EACH COLLEGE
=AVERAGEIF(B$2:B$6,A9, C$2:C$6)
=AVERAGEIF($B$3:$B$9,$B13,C$3:C$9)
Is this equivalent to a sumif/countif?
Other Categories of Functions
• Statistics:
• Mean, Median, Standard
deviation
• Financial:
• Present value, Future value
• Logical:
• NOT, AND, OR
• Trigonometric:
• COS, TAN,