0% found this document useful (0 votes)
11 views21 pages

Function Examples

The document provides a comprehensive overview of various mathematical, statistical, financial, logical, date, time, text, and database functions used in spreadsheet applications. It includes examples of formulas, sample data, and their outputs, demonstrating how to perform calculations and data analysis. Additionally, it covers pivot tables and forecasting functions for analyzing sales data and predicting future trends.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views21 pages

Function Examples

The document provides a comprehensive overview of various mathematical, statistical, financial, logical, date, time, text, and database functions used in spreadsheet applications. It includes examples of formulas, sample data, and their outputs, demonstrating how to perform calculations and data analysis. Additionally, it covers pivot tables and forecasting functions for analyzing sales data and predicting future trends.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Math Functions Test Value:

=round(number, decimalPlaces) 15 Dec places:


=roundup(number, decimalPlaces) 15
=rounddown(number, decimalPlaces) 15
=trunc(number, decimalPlaces) 15
=mod(number, divisor) 6 Number:
=ceiling(number, multiple) 15 Divisor:
=floor(number, multiple) 15
=sum(range) 45
=combin(number, number_chosen) 10 Test Value:
=roman(number) XVI Test Value:

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

More Examples: Start Date 9/10/1990


End Date 10/20/1992

Number of months between above dates: 25


Number of days between above dates: 771
Number of years between above dates: 2
Logical Functions
Test Score: 69
=if(logical test, value if true, value if false) Grade(P/F): F
Grade(A-F): D
Does 1 = 2? FALSE
Does 1 = 1? TRUE
=and(condition1, condition2, …) 1 FALSE
=or(condition1, condition2, …) TRUE
=not(logical_value) FALSE

Nested IF statements
pass 70
A 93
B 85
C 78
D 70

SCORE P/F A-F A-F


95 P C C
90 P C C
85 P C C
80 P C C
75 P C C
70 P C C
65 P C C
60 P C C
55 P C C
50 P C C
Time Functions
Summing Time
Start Time End Time Elapsed Time
8:15 AM 5:30 PM 9:15

Accumulating Time Over 24 Hours


9:00
12:30
16:05
22:00
Total (in decimal): 59.58
Total ([h]:mm:ss): 59:35:00

Converting Time in h:mm Format to Decimal Format


17.83 17:50

Converting Time in Decimal Format to h:mm Format


4:30:00 4.5
Financial Functions
=pmt(RatePerPeriod, Periods, Principal) $514.31
=ppmt(RatePerPeriod, PaymentNumber, Periods, Principal) $14.31
=ipmt(RatePerPeriod, PaymentNumber, Periods, Principal) $500.00
=fv(RatePerPeriod, Periods, Payment) $87,743.68
Rate: 12.00%
Years: 30
Amount: 50000
Text Functions
=concatenate(text1, text2, …) George Washington Test Cells:
=len(text) 17
=search(find_text, within_text) 7
#VALUE!
=find(find_text, within_text) 8
#VALUE!
=left(text, #chars) George
=right(text, #chars) Washington Test Cell:
=mid(text, start, #chars) shin
=value(text_number) 123
=upper(text) GEORGE WASHINGTON
=lower(text) george washington

Sample_Text: He was out at first base.


Functions Using
and Operators Cell References
LEFT() He was out
MID() at
RIGHT() first base.
CONCATENATE() He was out at first
Concatenation (&) He was out at first
George Washington

123

out at first base.


Using
Defined Names
He was out
at
first base.
He was out at first base.
He was out at first base.
Pivot Tables
Volcano Coffee Company Sales
Product Month Region Revenue
Brazilian Coffee January North 43200
Brazilian Coffee February North 45000
Brazilian Coffee March North 35280
Brazilian Coffee April North 39600
Brazilian Coffee May North 39960
Brazilian Coffee June North 39600
Brazilian Coffee January East 39600
Brazilian Coffee February East 42300
Brazilian Coffee March East 42300
Brazilian Coffee April East 42750
Brazilian Coffee May East 43650
Brazilian Coffee June East 44550
Brazilian Coffee January South 39600
Brazilian Coffee February South 42300
Brazilian Coffee March South 42300
Brazilian Coffee April South 42750
Brazilian Coffee May South 43650
Brazilian Coffee June South 44550
Brazilian Coffee January West 41280
Brazilian Coffee February West 41760
Brazilian Coffee March West 39360
Brazilian Coffee April West 40900
Brazilian Coffee May West 42000
Brazilian Coffee June West 43500
Turkish Coffee January North 35000
Turkish Coffee February North 35500
Turkish Coffee March North 36900
Turkish Coffee April North 36100
Turkish Coffee May North 36400
Turkish Coffee June North 36100
Turkish Coffee January East 22100
Turkish Coffee February East 24300
Turkish Coffee March East 24300
Turkish Coffee April East 24600
Turkish Coffee May East 25400
Turkish Coffee June East 23100
Turkish Coffee January South 26200
Turkish Coffee February South 24500
Turkish Coffee March South 24300
Turkish Coffee April South 24800
Turkish Coffee May South 25400
Turkish Coffee June South 26100
Turkish Coffee January West 23400
Turkish Coffee February West 23800
Turkish Coffee March West 23900
Turkish Coffee April West 23100
Turkish Coffee May West 24000
Turkish Coffee June West 23200
French Coffee January North 50700
French Coffee February North 52900
French Coffee March North 41200
French Coffee April North 46400
French Coffee May North 46900
French Coffee June North 46400
French Coffee January East 46400
French Coffee February East 49700
French Coffee March East 49700
French Coffee April East 50200
French Coffee May East 51300
French Coffee June East 52400
French Coffee January South 46400
French Coffee February South 49700
French Coffee March South 49700
French Coffee April South 50200
French Coffee May South 51300
French Coffee June South 52400
French Coffee January West 48400
French Coffee February West 49000
French Coffee March West 46100
French Coffee April West 48000
French Coffee May West 49300
French Coffee June West 51100
Pivot Tables
Sum of Revenue Month
Region January February March April May June
East 108100 116300 116300 117550 120350 120050
North 128900 133400 113380 122100 123260 122100
South 112200 116500 116300 117750 120350 123050
West 113080 114560 109360 112000 115300 117800
Total Result 462280 480760 455340 469400 479260 483000
Total Result
698650
743140
706150
682100
2830040
Database Functions
Tree Height Age Yield Profit Height
Apple >10 <16
Pear

Tree Height Age Yield Profit


Apple 18 20 14 $ 105.00
Pear 12 12 10 $ 96.00
Cherry 13 14 9 $ 105.00
Apple 14 15 10 $ 75.00
Pear 9 8 8 $ 76.80
Apple 8 9 6 $ 45.00

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.

e trees with a height between 10 and 16.


s from apple trees with a height between 10 and 16.
le trees over 10 feet in height.
s in the database.
eviation in the yield of apple and pear trees if the data in the database is only a sample of the total orchard population.
ion in the yield of apple and pear trees if the data in the database is the entire population.
yield of apple and pear trees if the data in the database is only a sample of the total orchard population.
ld of apple and pear trees if the data in the database is the entire orchard population.
more than one record meets the criteria.
n those records contain numbers.
ds in those records are not blank.

the total orchard population.

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

Predicting Values Using TREND() Predicting Values Using FORECAST()


Month Sales Month Sales
1 4200 1 4200
2 6100 2 6100
3 7300 3 7300
4 7300 4 7300
5 8700 5 8700
6 10500 6 10500
7 11280 Prediction 7 11280 Prediction
8 12403 Prediction 8 12220 Prediction
9 13526 Prediction 9 13384 Prediction
Y Intercept
3420

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy