Function Examples
Function Examples
Sample List
Name Salary Dept. Qty Sold
Nancy Davolio 16,000 9 19
Andrew Fuller 25,000 3 129
Michael Suyama 28,500 3 234
Janice Leverling 30,000 12 199
Linda Callahan 50,000 9 126
Johnathan King 50,000 12 45
Use the new COUNTIF and SUMIF functions to total data that meets specified criteria.
The formulas in the following table use the sample data above
Using
Cell
Functions Referenc Using
and Operators es Defined Names
COUNTIF() 2 0
SUMIF() 145 0
SUM(IF()) 2 0
SUM(IF()) 145 0
SUM(IF(IF())) 0 0
15
4
20
7
5 3
16
Using
OFFSET()
0
0
0
0
0
Statistical Functions
=count(range) 5 Test Data
=countA(range) 6 1 4
=countBlank(range) 5 5
=countIf(range, criteria) 3 x
=stdev(range) 1.9235384
=average(range) 3.8
=min(range) 1 3 6
=max(range) 6
Date Functions
=now() 2/13/2025 19:13
=today() 2/13/2025
=month(date_value) 2
=day(date_value) 13
=year(date_value) 2025
=date(year, month, day) 1/1/2000
=time(hour, min, sec) 12:00 PM
=datevalue("January 5, 1999 36165
=datevalue("05-Jan-99") 36165
=datevalue("01/05/99") 36165
Nested IF statements
pass 70
A 93
B 85
C 78
D 70
123
Examples:
1 DCOUNT(Database,"Age",A1:F2) equals 1. This function looks at the records of apple trees between a
1 DCOUNTA(Database,"Profit",A1:F2) equals 1. This function looks at the records of apple trees betwee
105 DMAX(Database,"Profit",A1:A3) equals $105.00, the maximum profit of apple and pear trees.
75 DMIN(Database,"Profit",A1:B2) equals $75.00, the minimum profit of apple trees over 10.
225 DSUM(Database,"Profit",A1:A2) equals $225.00, the total profit from apple trees.
75 DSUM(Database,"Profit",A1:F2) equals $75.00, the total profit from apple trees with a height between
10 DPRODUCT(Database,"Yield",A1:F2) equals 140, the product of the yields from apple trees with a hei
12 DAVERAGE(Database,"Yield",A1:B2) equals 12, the average yield of apple trees over 10 feet in heigh
13 DAVERAGE(Database,3,Database) equals 13, the average age of all trees in the database.
2.966479 DSTDEV(Database,"Yield",A1:A3) equals 2.97, the estimated standard deviation in the yield of apple
2.6533 DSTDEVP(Database,"Yield",A1:A3) equals 2.65, the true standard deviation in the yield of apple and p
8.8 DVAR(Database,"Yield",A1:A3) equals 8.8, the estimated variance in the yield of apple and pear trees
7.04 DVARP(Database,"Yield",A1:A3) equals 7.04, the true variance in the yield of apple and pear trees if t
Err:502 DGET(Database,"Yield",Criteria) returns the #NUM! error value because more than one record meets
ords of apple trees between a height of 10 and 16 and counts how many of the Age fields in those records contain number
ecords of apple trees between a height of 10 and 16 and counts how many of the Profit fields in those records are not blan
apple and pear trees.
ple trees over 10.
rd population.
Table Lookup
Sample List
Name Salary Dept. Qty Sold
Nancy Davolio 16,000 9 19
Andrew Fuller 25,000 3 129
Michael Suyama 28,500 3 234
Janice Leverling 30,000 12 199
Linda Callahan 50,000 9 126
Johnathan King 50,000 12 45
Using
Functions Cell Using Using
and Operators References Defined Names OFFSET()
VLOOKUP() 50,000 50,000
MATCH() 6 6
INDEX() 30,000 30,000
INDEX(MATCH()) 50,000 50,000 50,000
Information Functions
=isnumber(value) TRUE Test Cell: 5
=iserror(Cell) FALSE
=isblank(Cell) FALSE
=istext(value) FALSE
Forecasting Functions
Creating a Best Fit Line Using TREND() Creating a Best Fit Line Using LINEST()
Predicted Y Predicted Y
Month Sales TREND() Month Sales LINEST() Slope
1 4200 4543 1 4200 0 1122.857
2 6100 5666 2 6100 0
3 7300 6789 3 7300 0
4 7300 7911 4 7300 0
5 8700 9034 5 8700 0
6 10500 10157 6 10500 0