Excel Functions Training Version
Excel Functions Training Version
1 DAVERAGE
2 DCOUNT
3 DCOUNTA
4 DGET
5 DMAX
6 DMIN
7 DSUM
8 DATE
9 DATEDIF
10 DATEVALUE
11 DAY
12 DAYS360
13 EDATE
14 EOMONTH
15 HOUR
16 MINUTE
17 MONTH
18 NETWORKDAYS
19 NOW
20 SECOND
21 TIME
22 TIMEVALUE
23 TODAY
24 WEEKDAY
25 WORKDAY
26 YEAR
27 YEARFRAC
28 BIN2DEC
29 CONVERT
30 DEC2BIN
31 DEC2HEX
32 DELTA
33 GESTEP
34 HEX2DEC
35 DB
36 SLN
37 SYD
38 CELL
39 COUNTBLANK
40 ERROR.TYPE
41 INFO
42 ISBLANK
43 ISERR
44 ISERROR
45 ISEVEN
46 ISLOGICAL
47 ISNA
48 ISNONTEXT
49 ISNUMBER
Category
Location
Database
Database
Database
Database
Database
Database
Database
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Date
Engineering
Engineering
Engineering
Engineering
Engineering
Engineering
Engineering
Financial
Financial
Financial
Information
Information
Information
Information
Information
Information
Information
Information
Information
Information
Information
Information
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Analysis ToolPak
Analysis ToolPak
Built-in
Built-in
Built-in
Analysis ToolPak
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Analysis ToolPak
Built-in
Analysis ToolPak
Analysis ToolPak
Analysis ToolPak
Analysis ToolPak
Analysis ToolPak
Analysis ToolPak
Analysis ToolPak
Analysis ToolPak
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Analysis ToolPak
Built-in
Built-in
Built-in
Built-in
50 ISODD
51 ISREF
52 ISTEXT
53 N
54 NA
55 TYPE
56 AND
57 IF
58 NOT
59 OR
60 CHOOSE
61 HLOOKUP
62 INDEX
63 INDIRECT
64 LOOKUP (vector)
65 MATCH
66 SUM_with_OFFSET
67 TRANSPOSE
68 VLOOKUP
69 ABS
70 CEILING
71 COMBIN
72 COUNTIF
73 EVEN
74 FACT
75 FLOOR
76 GCD
77 INT
78 LCM
79 MINVERSE
80 MMULT
81 MOD
82 MROUND
83 ODD
84 PI
85 POWER
86 PRODUCT
87 QUOTIENT
88 RAND
89 RANDBETWEEN
90 ROMAN
91 ROUND
92 ROUNDDOWN
93 ROUNDUP
94 SIGN
95 SUBTOTAL
96 SUM
97 SUM_as_Running_Total
98 SUMIF
99 SUMPRODUCT
Information
Information
Information
Information
Information
Information
Logical
Logical
Logical
Logical
Lookup
Lookup
Lookup
Lookup
Lookup
Lookup
Lookup
Lookup
Lookup
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Mathematical
Analysis ToolPak
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Analysis ToolPak
Built-in
Analysis ToolPak
Built-in
Built-in
Built-in
Analysis ToolPak
Built-in
Built-in
Built-in
Built-in
Analysis ToolPak
Built-in
Analysis ToolPak
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
100 TRUNC
101 Age Calculation
102 AutoSum shortcut key
103 Brackets in formula
104 FileName formula
105 Instant Charts
106 Ordering Stock
107 Percentages
108 Project Dates
109 Show all formula
110 Split ForenameSurname
111 Time Calculation
112 TimeSheet For Flexi
113 SUM_using_names
114 -Timesheet
115 AVERAGE
116 CORREL
117 COUNT
118 COUNTA
119 FORECAST
120 FREQUENCY
121 GROWTH
122 LARGE
123 MAX
124 MEDIAN
125 MIN
126 MODE
127 PERMUT
128 QUARTILE
129 RANK
130 SMALL
131 STDEV
132 STDEVP
133 TREND
134 VAR
135 VARP
136 CHAR
137 CLEAN
138 CODE
139 CONCATENATE
140 DOLLAR
141 EXACT
142 FIND
143 FIXED
144 LEFT
145 LEN
146 LOWER
147 MID
148 PROPER
149 REPLACE
Mathematical
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Statistical
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Text
Built-in
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Sample
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
150 REPT
151 RIGHT
152 SUBSTITUTE
153 T
154 TEXT
155 TRIM
156 UPPER
157 VALUE
Text
Text
Text
Text
Text
Text
Text
Text
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
Built-in
CLEAN
Dirty Text
Hello
He_x0007_llo
_x0007_Hello_x0007_
Clean Text
Hello
Hello
Hello
CONCATENATE
Name 1
Alan
Bob
Carol
Alan
Bob
Carol
Name 2
Jones
Williams
Davies
Jones
Williams
Davies
Name 2
Jones
Williams
Davies
Jones
Williams
Carol
Davies
Original Number
10
10
10
10
10.25
10.25
10.25
10.25
Converted To Text
$10,00
$10
$10,0
$10,00
$10,25
$10
$10,3
$10,25
DOLLAR
EXACT
Text1
Hello
Hello
Hello
Text2
Hello
hello
Goodbye
FIXED
Original Number
10
10
10
10
10.25
10.25
10.25
10.25
1000
1000.23
1000.23
Converted To Text
10,00
10
10,0
10,00
10,25
10
10,3
10,25
1.000,00
1.000
1000
What Does It Do ?
This function converts a numeric value to text.
During the conversion the value can be rounded to a specific number of decimal places,
and commas can be inserted at the 1,000's.
Syntax
=FIXED(NumberToConvert,DecimalPlaces,Commas)
If DecimalPlaces places is not specified the function will assume 2.
The Commas option can be TRUE for commas or FALSE for no commas.
If the Commas is not specified the function will assume TRUE.
Formatting
No special formatting is needed.
Note that any further formatting with the Format, Cells, Number command will not have any effect.
LEFT
Text
Alan Jones
Alan Jones
Alan Jones
Cardiff
ABC123
Number Of
Characters Required
1
2
3
6
4
What Does It Do ?
This function displays a specified number of characters from the left hand side of a
piece of text.
Syntax
=LEFT(OriginalText,NumberOfCharactersRequired)
Formatting
No special formatting is needed.
Example
The following table was used to extract the first name of a person from their full name.
The =FIND() function was used to locate position of the space between the first and second name.
The length of the first name is therefore the position of the space minus one character.
The =LEFT() function can now extract the first name based on the position of the space.
Full Name
Alan Jones
Bob Smith
Carol Williams
First Name
Alan
Bob
Carol
Text
Alan Jones
Bob Smith
Carol Williams
Cardiff
ABC123
Length
10
9
14
7
6
LEN
Length
What Does It Do ?
This function counts the number of characters, including spaces and numbers, in a piece of text.
Syntax
=LEN(Text)
Formatting
No Special formatting is needed.
Example
This example shows how the =LEN() function is used in a formula which extracts the
second name from a text entry containing both first and second names.
Original Text
Carol Williams
Carol Williams
Williams
LOWER
Upper Case Text
ALAN JONES
BOB SMITH
CAROL WILLIAMS
CARDIFF
ABC123
Lower Case
alan jones
bob smith
carol williams
cardiff
abc123
What Does It Do ?
This function converts all characters in a piece of text to lower case.
Syntax
=LOWER(TextToConvert)
Formatting
No special formatting is needed.
MID
Text
ABCDEDF
ABCDEDF
ABCDEDF
Start
Position
1
2
5
ABC-100-DEF
ABC-200-DEF
ABC-300-DEF
100
200
300
Large
Medium
Small
What Does It Do ?
This function picks out a piece of text from the middle of a text entry.
The function needs to know at what point it should start, and how many characters to pick.
If the number of characters to pick exceeds what is available, only the available characters
will be picked.
Syntax
=MID(OriginalText,PositionToStartPicking,NumberOfCharactersToPick)
Formatting
No special formatting is needed.
Example 1
The following table uses the =MID() function to extract a post code from a branch ID used
by a company.
It is assumed that all branch ID's follow the same format with the letters identifying the
postal region being in the 5th and 6th positions.
Branch ID
DRS-CF-476
DRS-WA-842
HLT-NP-190
Postal Region
CF
WA
NP
Example 2
This example shows how to extract an item which is of variable length, which is inside
a piece of text which has no standard format, other than the required text is always
between two slash / symbols.
Full Branch Code
Postal Region
DRS/STC/872
STC
HDRS/FC/111
FC
S/NORTH/874
NORTH
HQ/K/875
K
SPECIAL/UK & FR/876
UK & FR
=MID(C274, FIND("/",C274)+1, FIND("/",C274,FIND("/",C274)+1)
=MID(OriginalText, PositionToStartPicking, NumberOf
Find the first /, plus 1 for the Start of the code.
Find the second /, occurring after the first /
Calculate the length of the text to extract, by subtracting the position
of the first / from the position of the second /
PROPER
Original Text
alan jones
bob smith
caRol wILLIAMS
cardiff
ABC123
Proper
Alan Jones
Bob Smith
Carol Williams
Cardiff
Abc123
What Does It Do ?
This function converts the first letter of each word to uppercase, and all subsequent letters
are converted to lower case.
Syntax
=PROPER(TextToConvert)
Formatting
No special formatting is needed.
REPLACE
Original Text
ABCDEFGH
ABCDEFGH
ABCDEFGH
ABCDEFGH
Start
Position
2
2
2
2
Characters
To Replace
1
5
1
5
What Does It Do ?
This function replaces a portion of text with a new piece of text.
You need to specify where the replacement should start, how many characters to
remove and what the new replacement text should be.
Syntax
=REPLACE(OriginalText,StartPosition,NumberOfCharactersToReplace,NewText)
Formatting
No special formatting is needed.
REPT
Text To
Repeat
A
AB
|
Number Of
Repeats
3
3
10
10
What Does It Do ?
This function repeats a piece of text a specified number of times.
You need to specify the text to be repeated and how many times to repeat it.
Syntax
=REPT(TextToRepeat,Repetitions)
The maximum number of repetitions is 200.
Formatting
No special formatting is needed.
Example 1
The following table was used to display a simple histogram of sales figures.
The =REPT() function uses the value of Sales, but this is divided by 100 to scale down the
number of repetitions to below the maximum of 200.
Month
Jan
Feb
Mar
Apr
Sales
1,000
5,000
3,000
2,000
Example 2
The =REPT() function has been used to make a digital display for the current time.
The time functions of =HOUR(), =MINUTE() and =SECOND() have been used in conjunction
with the =NOW() as the basis for the number of repeats.
To update the clock press the function key F9.
Clock
Hour |||||||| 08
Minute ||||||||||||||||||||||||||||||| 31
Second ||||||||||||||||||||||||||||||||||||||||||||||| 47
RIGHT
Original
Text
Alan Jones
Alan Jones
Alan Jones
Cardiff
ABC123
Number Of
Characters Required
1
2
3
6
4
What Does It Do ?
This function displays a specified number of characters from the right hand side of a
piece of text.
Syntax
=RIGHT(OriginalText,NumberOfCharactersRequired)
Formatting
No special formatting is needed.
Example
The following table was used to extract the second name of a person from their full name.
The =FIND() function locates the position of the space between the first and second name.
The length of the second name is calculated by subtracting the position of the space from
the overall length of the full name.
The =RIGHT() function can then extract the second name.
Full Name
Alan Jones
Bob Smith
Carol Williams
Second Name
Jones
Smith
Williams
Original Text
ABCDEF
ABCDABCD
Northern Region
Sand and Cement
Old Text
To Remove
CD
CD
Region
and
New Text
To Insert
hello
hello
Area
&
Original Text
ABCABCABC
Sand and Cement
Old Text
To Remove
ABC
and
New Text
To Insert
hello
&
SUBSTITUTE
What Does It Do ?
This function replaces a specified piece of text with a different piece of text.
It can either replace all occurrences of the text, or a specific instance.
The function is case sensitive.
Syntax
=SUBSTITUTE(OriginalText,TextToRemove,TextToInsert,InstanceToUse)
The InstanceToUse is optional, if it is omitted all instances will be substituted.
Formatting
No special formatting is needed.
Note
To cope with upper or lower case in the substitution you can use other text functions
such as =UPPER(), =LOWER() or =PROPER() to ensure that the substitution will take place.
Table 1 shows how differing text cases alter the result of the substitution.
Table 1
Original Text
Northern Region
Northern region
Old Text
To Remove
Region
Region
New Text
To Insert
Area
Area
Northern Region
Northern Region
Northern Region
region
Region
region
Area
area
area
Table 2 shows how the =PROPER() function has been used to take account of the mixed cases.
Table 2
Old Text
To Remove
Region
Region
region
Region
region
Original Text
Northern Region
Northern region
Northern Region
Northern Region
Northern Region
New Text
To Insert
Area
Area
Area
area
area
=SUBSTITUTE(PROPER(B453),PROPER(C453),PRO
T
Cell To Test
Hello
10
1-Jan-98
What Does It Do ?
This function examines an entry to determine whether it is text or not.
If the value is text, then the text is the result of the function
If the value is not text, the result is a blank.
The function is not specifically needed by Excel, but is included for compatibility with
other spreadsheet programs.
Syntax
=T(CellToTest)
Formatting
No special formatting is needed.
TEXT
Original Number
10
10
10
10
10.25
Converted To Text
010
010
10
10
10
10.25
10
What Does It Do ?
This function converts a number to a piece of text.
The formatting for the text needs to be specified in the function.
Syntax
=TEXT(NumberToConvert,FormatForConversion)
Formatting
No special formatting is required.
TRIM
Original Text
ABCD
A B C D
Alan
Jones
ABCD
Trimmed Text
ABCD
ABCD
Alan Jones
ABCD
What Does It Do ?
This function removes unwanted spaces from a piece of text.
The spaces before and after the text will be removed completely.
Multiple spaces within the text will be trimmed to a single space
Syntax
=TRIM(TextToTrim)
Formatting
No special formatting is needed.
UPPER
Original Text
alan jones
bob smith
carOl wiLLiamS
cardiff
abc123
Upper Case
ALAN JONES
BOB SMITH
CAROL WILLIAMS
CARDIFF
ABC123
What Does It Do ?
This function converts all characters in a piece of text to upper case.
Syntax
=UPPER(TextToConvert)
Formatting
No special formatting is needed.
=CLEAN(C4)
=CLEAN(C5)
=CLEAN(C6)
Concatenated Text
AlanJones
BobWilliams
CarolDavies
Alan Jones
Williams, Bob
Davies, Carol
=CONCATENATE(C24,D24)
=CONCATENATE(C25,D25)
=CONCATENATE(C26,D26)
=CONCATENATE(C27,D27)
=CONCATENATE(C28,D28)
=CONCATENATE(C29,D29)
Concatenated Text
AlanJones
BobWilliams
CarolDavies
Alan Jones
Williams, Bob
=C45&D45
=C45&D45
=C45&D45
=C45&D45
=C45&D45
=DOLLAR(C57)
=DOLLAR(C58,0)
=DOLLAR(C59,1)
=DOLLAR(C60,2)
=DOLLAR(C61)
=DOLLAR(C62,0)
=DOLLAR(C63,1)
=DOLLAR(C64,2)
converted number.
Result
1
ill be shown.
=EXACT(C83,D83)
=EXACT(C84,D84)
=EXACT(C85,D85)
=FIXED(C105)
=FIXED(C106,0)
=FIXED(C107,1)
=FIXED(C108,2)
=FIXED(C109)
=FIXED(C110,0)
=FIXED(C111,1)
=FIXED(C112,2)
=FIXED(C113)
=FIXED(C114,0)
=FIXED(C115,0,TRUE)
of decimal places,
Left String
A
Al
Ala
Cardif
ABC1
=LEFT(C137,D137)
=LEFT(C138,D138)
=LEFT(C139,D139)
=LEFT(C140,D140)
=LEFT(C141,D141)
=LEFT(C160,FIND(" ",C160)-1)
=LEFT(C161,FIND(" ",C161)-1)
=LEFT(C162,FIND(" ",C162)-1)
=LEN(C169)
=LEN(C170)
=LEN(C171)
=LEN(C172)
=LEN(C173)
ch extracts the
=FIND(" ",C189)
This is the position of the space.
=LEN(C189)-FIND(" ",C189)
This is the length of the second name.
Calculated by taking the overall length of the complete
name and subtracting the position of the space.
=RIGHT(C189,LEN(C189)-FIND(" ",C189))
=LOWER(C208)
=LOWER(C209)
=LOWER(C210)
=LOWER(C211)
=LOWER(C212)
How Many
Characters
3
3
2
=MID(C232,5,3)
=MID(C233,5,3)
=MID(C234,5,3)
=MID(C236,12,99)
=MID(C237,12,99)
=MID(C238,12,99)
ny characters to pick.
available characters
Mid String
ABC
BCD
ED
=MID(C228,D228,E228)
=MID(C229,D229,E229)
=MID(C230,D230,E230)
m a branch ID used
rs identifying the
=MID(C259,5,2)
=MID(C260,5,2)
=MID(C261,5,2)
",C274,FIND("/",C274)+1)-FIND("/",C274)-1)
Picking, NumberOfCharactersToPick)
=PROPER(C288)
=PROPER(C289)
=PROPER(C290)
=PROPER(C291)
=PROPER(C292)
New
Character
x
x
hello
hello
Modified
Text
AxCDEFGH
AxGH
AhelloCDEFGH
AhelloGH
Repeated
Text
AAA
ABABAB
---------||||||||||
=REPT(C330,D330)
=REPT(C331,D331)
=REPT(C332,D332)
=REPT(C333,D333)
=REPLACE(C309,D309,E309,F309)
=REPLACE(C310,D310,E310,F310)
=REPLACE(C311,D311,E311,F311)
=REPLACE(C312,D312,E312,F312)
place,NewText)
|| || || || || || || || || ||
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|| || || || || || || || || || || || || || || || || || || || || || || || || || || || || ||
||||||||||||||||||||||||||||||||||||||||
=REPT("||",D355/100)
current time.
een used in conjunction
=REPT("|",HOUR(NOW()))&" "&TEXT(HOUR(NOW()),"00")
=REPT("|",MINUTE(NOW()))&" "&TEXT(MINUTE(NOW()),"00")
=REPT("|",SECOND(NOW()))&" "&TEXT(SECOND(NOW()),"00")
Right
String
s
es
nes
ardiff
C123
=RIGHT(C374,D374)
=RIGHT(C375,D375)
=RIGHT(C376,D376)
=RIGHT(C377,D377)
=RIGHT(C378,D378)
=RIGHT(C398,LEN(C398)-FIND(" ",C398))
=RIGHT(C399,LEN(C399)-FIND(" ",C399))
=RIGHT(C400,LEN(C400)-FIND(" ",C400))
Updated Text
ABhelloEF
ABhelloABhello
Northern Area
S& & Cement
Instance To
Be Replaced
3
2
=SUBSTITUTE(B407,C407,D407)
=SUBSTITUTE(B408,C408,D408)
=SUBSTITUTE(B409,C409,D409)
=SUBSTITUTE(B410,C410,D410)
Updated Text
ABCABChello
Sand & Cement
=SUBSTITUTE(B10,C10,D10,E10)
=SUBSTITUTE(B11,C11,D11,E11)
Updated Text
Northern Area
Northern region
Case Sensitivity
Updated Text
Northern Area
Northern Area
Northern Area
Northern Area
Northern Area
TUTE(PROPER(B453),PROPER(C453),PROPER(D453))
Result
Hello
=T(D4)
=T(D5)
=T(D6)
=T(D7)
mpatibility with
=TEXT(C484,"0.00")
=TEXT(C485,"0.00")
=TEXT(C486,"0")
=TEXT(C487,"0")
=TEXT(C488,"0.0")
=TEXT(C489,"0.0")
=TRIM(C506)
=TRIM(C507)
=TRIM(C508)
=TRIM(C509)
=UPPER(C527)
=UPPER(C528)
=UPPER(C529)
=UPPER(C530)
=UPPER(C531)
CHAR
ANSI Number Character
65 A
66 B
169
=CHAR(G4)
=CHAR(G5)
=CHAR(G6)
26
27
28
29
30
31
32
33 !
34 "
35 #
36 $
37 %
38 &
39 '
40 (
41 )
42 *
43 +
44 ,
45 46 .
47 /
48 0
49 1
50 2
51 3
52 4
53 5
54 6
55 7
56 8
57 9
58 :
59 ;
60 <
61 =
62 >
63 ?
64 @
65 A
66 B
67 C
68 D
69 E
70 F
71 G
72 H
73 I
74 J
75 K
76 L
77 M
78 N
79 O
80 P
81 Q
82 R
83 S
84 T
85 U
86 V
87 W
88 X
89 Y
90 Z
91 [
92 \
93 ]
94 ^
95 _
96 `
97 a
98 b
99 c
100 d
101 e
102 f
103 g
104 h
105 i
106 j
107 k
108 l
109 m
110 n
111 o
112 p
113 q
114 r
115 s
116 t
117 u
118 v
119 w
120 x
121 y
122 z
123 {
124 |
125 }
126 ~
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
Note
Number 32 does not show as it is the SPACEBAR character.
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
CODE
Letter
A
B
C
a
b
c
Alan
Bob
Carol
ANSI Code
65
66
67
97
98
99
65
66
67
=CODE(C58)
=CODE(C59)
=CODE(C60)
=CODE(C61)
=CODE(C62)
=CODE(C63)
=CODE(C64)
=CODE(C65)
=CODE(C66)
3 51
4 52
5 53
6 54
7 55
8 56
9 57
: 58
; 59
< 60
= 61
> 62
? 63
@ 64
A 65
B 66
C 67
D 68
E 69
F 70
G 71
H 72
I 73
J 74
L 76
M 77
N 78
O 79
P 80
Q 81
R 82
S 83
T 84
U 85
V 86
W 87
X 88
Y 89
Z 90
[ 91
\ 92
] 93
^ 94
_ 95
` 96
a 97
b 98
c 99
e 101
f 102
g 103
h 104
i 105
j 106
k 107
l 108
m 109
n 110
o 111
p 112
q 113
r 114
s 115
t 116
u 117
v 118
w 119
x 120
y 121
z 122
{ 123
| 124
~ 126
127
226
194
226
198
226
226
226
226
203
226
197
226
197
194
197
194
194
226
226
226
226
226
226
203
226
197
226
197
194
197
197
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
194
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
_x0019_ 95
2 50
K 75
d 100
} 125
226
194
195
195
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
er in a piece
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
195
251
252
253
254
255
195
COUNTBLANK
Range To Test
1
Hello
3
0
Blanks
2
=COUNTBLANK(C4:C11)
1-Jan-98
5
What Does It Do ?
This function counts the number of blank cells in a range.
Syntax
=COUNTBLANK(RangeToTest)
Formatting
No special formatting is needed.
Example
The following table was used by a company which was balloting its workers on whether
the company should have a no smoking policy.
Each of the departments in the various factories were questioned.
The response to the question could be Y or N.
As the results of the vote were collated they were entered in to the table.
The =COUNTBLANK() function has been used to calculate the number of departments which
have no yet registered a vote.
Factory 1
Factory 2
Factory 3
Factory 4
Factory 5
Factory 6
Factory 7
Factory 8
Factory 9
Factory 10
Admin
Y
N
Y
Y
N
Y
Y
Y
Y
Y
Y
N
N
N
N
Y
Y
16
=COUNTBLANK(C32:F41)
14
=COUNTIF(C32:F41,"Y")
Votes for No :
10
=COUNTIF(C32:F41,"N")
CHOOSE
Index Value
1
3
2
3
2
1
Result
Alan
Carol
Bob
18%
15%
10%
=CHOOSE(C4,"Alan","Bob","Carol")
=CHOOSE(C5,"Alan","Bob","Carol")
=CHOOSE(C5,"Alan","Bob","Carol")
=CHOOSE(C7,10%,15%,18%)
=CHOOSE(C8,10%,15%,18%)
=CHOOSE(C9,10%,15%,18%)
Time
1:30
1:15
2:45
1:05
1:20
Position
Medal
2
Silver
=IF(D30<=3,CHOOSE(D30,"Gold","Silver","Bronze"),"unplaced")
4
unplaced
=IF(D31<=3,CHOOSE(D31,"Gold","Silver","Bronze"),"unplaced")
1
Gold
=IF(D32<=3,CHOOSE(D32,"Gold","Silver","Bronze"),"unplaced")
5
unplaced
=IF(D33<=3,CHOOSE(D33,"Gold","Silver","Bronze"),"unplaced")
3
Bronze
=IF(D34<=3,CHOOSE(D34,"Gold","Silver","Bronze"),"unplaced")
=RANK(C34,$C$30:$C$34)
MATCH
Names
Bob
Alan
David
Carol
Type a name to look for :
The position of Alan is :
Alan
Type a value :
Value position :
=MATCH(E47,E42:E45,0)
=MATCH(I47,I42:I45,1)
What Does It Do ?
This function looks for an item in a list and shows its position.
It can be used with text and numbers.
It can look for an exact match or an approximate match.
Syntax
=MATCH(WhatToLookFor,WhereToLook,TypeOfMatch)
The TypeOfMatch either 0, 1 or -1.
*** Using 0 will look for an exact match. If no match is found the #NA error will be shown.
*** Using 1 will look for an exact match, or the next lowest number if no exact match exists.
If there is no match or next lowest number the error #NA is shown.
The list of values being examined must be sorted [Ascending] for this to work correctly.
*** Using -1 will look for an exact match, or the next highest number if no exact match exists.
If there is no exact match or next highest number the error #NA is shown.
The list must be sorted [Descending] for this to work properly.
Examples 1
Using the 0 option suitable for an exact match.
The Ascending list gives the exact match.
The Descending list gives the exact match.
The Wrong Value list cannot find an exact match, so the #NA is shown.
Ascending
10
20
30
40
Descending
40
30
20
10
Wrong Value
10
20
30
40
20
2
20
3
=MATCH(E83,E78:E81,0)
25
#N/A
Example 2
Using the 1 option suitable for a ascending list to find an exact or next lowest match.
The Ascending list gives the exact match.
The Descending list gives the #NA error.
The Wrong Value list finds the next lowest number..
Ascending
10
20
30
40
Descending
40
30
20
10
Wrong Value
10
20
30
40
20
2
20
#N/A
25
2
=MATCH(G100,G95:G98,1)
Example 3
Using the -1 option suitable for a descending list to find an exact or next highest match.
The Ascending list gives the #NA error.
The Descending list gives the exact match.
The Wrong Value list finds the next highest number.
Ascending
10
20
30
40
Descending
40
30
20
10
20
2
20
3
Wrong Value
40
30
20
10
25
2
=MATCH(G117,G112:G115,-1)
Example 4
The tables below were used to by a bus company taking booking for bus tours.
They need to allocate a bus with enough seats for the all the passengers.
The list of bus sizes has been entered in a list.
The number of passengers on the tour is then entered.
The =MATCH() function looks down the list to find the bus with enough seats.
If the number of passengers is not an exact match, the next biggest bus will be picked.
After the =MATCH() function has found the bus, the =INDEX() function has been used
to look down the list again and pick out the actual bus size required.
Bus 1
Bus 2
Bus 3
Bus 4
Bus 5
Bus Size
54
50
22
15
6
Example 5
The tables below were used by a school to calculate the exam grades for pupils.
The list of grade breakpoints was entered in a list.
The pupils scores were entered in another list.
The pupils scores are compared against the breakpoints.
If an exact match is not found, the next lowest breakpoint is used.
The =INDEX() function then looks down the Grade list to find the grade.
Exam Score
0
Grade
Fail
Alan
Pupil Score
60
Grade
Pass
50
90
95
Pass
Merit
Distinction
Bob
6
Fail
Carol
97
Distinction
David
89
Pass
=INDEX(D149:D152,MATCH(G152,C149:C152,1),0)
HLOOKUP
Jan
10
20
30
40
50
Feb
80
90
100
110
120
Mar
97
69
45
51
77
Feb
4
The result is :
100
row 1
row 2
row 3
row 4
row 5
row 6
=HLOOKUP(F166,D159:F166,F167,FALSE)
What Does It Do ?
This function scans across the column headings at the top of a table to find a specified item.
When the item is found, it then scans down the column to pick a cell entry.
Syntax
=HLOOKUP(ItemToFind,RangeToLookIn,RowToPickFrom,SortedOrUnsorted)
The ItemToFind is a single item specified by the user.
The RangeToLookIn is the range of data with the column headings at the top.
The RowToPickFrom is how far down the column the function should look to pick from.
The Sorted/Unsorted is whether the column headings are sorted. TRUE for yes, FALSE for no.
Formatting
No special formatting is needed.
Example 1
This table is used to find a value based on a specified month and name.
The =HLOOKUP() is used to scan across to find the month.
The problem arises when we need to scan down to find the row adjacent to the name.
To solve the problem the =MATCH() function is used.
The =MATCH() looks through the list of names to find the name we require.
It then calculates the position of the name in the list.
Unfortunately, because the list of names is not as deep as the lookup range,
the =MATCH() number is 1 less than we require, so extra 1 is added to compensate.
The =HLOOKUP() now uses this =MATCH() number to look down the month column and
picks out the correct cell entry.
The =HLOOKUP() uses FALSE at the end of the function to indicate to Excel that the
column headings are not sorted, even though to us the order of Jan,Feb,Mar is correct.
If they were sorted alphabetically they would have read as Feb,Jan,Mar.
Name
Bob
Eric
Alan
Carol
David
Jan
10
20
30
40
50
Feb
80
90
100
110
120
Mar
97
69
45
51
77
VLOOKUP
100
=VLOOKUP(F211,C203:F208,3,F
feb
alan
The result is :
100
=HLOOKUP(F210,D203:F210,MATCH(F211,C204:C208,0)+1,FALSE)
Example 2
This example shows how the =HLOOKUP() is used to pick the cost of a spare part for
different makes of cars.
The =HLOOKUP() scans the column headings for the make of car specified in column B.
When the make is found, the =HLOOKUP() then looks down the column to the row specified
by the =MATCH() function, which scans the list of spares for the item specified in column C.
The function uses the absolute ranges indicated by the dollar symbol $. This ensures that
when the formula is copied to more cells, the ranges for =HLOOKUP() and =MATCH() do
not change.
Maker
Vauxhall
VW
Ford
VW
Ford
Ford
Vauxhall
Ford
Spare
Ignition
GearBox
Engine
Steering
Ignition
CYHead
GearBox
Engine
Cost
50
Vauxhall
Ford
600
GearBox
500
450
1,200
Engine
1000
1200
275
Steering
250
350
70
Ignition
50
70
290
CYHead
300
290
500
1,200
=HLOOKUP(B235,$G$228:$I$233,MATCH(C235,$F$229:$F$233,0)+1,FALSE)
LOOKUP (Vector)
Name
Alan
Bob
Carol
David
Eric
Francis
Gail
Jan
10
20
30
40
50
60
70
Feb
80
90
100
110
120
130
140
Mar
97
69
45
51
77
28
73
Eric
120
=LOOKUP(F251,D243:G249,F243:F249)
What Does It Do ?
This function looks for a piece of information in a list, and then picks an item from
a second range of cells.
Syntax
=LOOKUP(WhatToLookFor,RangeToLookIn,RangeToPickFrom)
The WhatToLookFor should be a single item.
The RangeToLook in can be either horizontal or vertical.
The RangeToPickFrom must have the same number of cells in it as the RangeToLookin.
Be careful not to include unnecessary heading in the ranges as these will cause errors.
Formatting
No special formatting is needed.
Example
The following example shows how the =LOOKUP() function was used to match a name typed
in cell G41 against the list of names in C38:C43. When a match is found the =LOOKUP() then
picks from the second range E38:J38.
If the name Carol is used, the match is made in the third cell of the list of names, and then
the function picks the third cell from the list of values.
RangeToLookIn
Alan
Bob
Carol
David
Eric
Fred
10
Type a name :
Value :
RangeToPickFrom
15
20
Carol
15
=LOOKUP(G280,C277:C282,E277:J277)
Problems
The list of information to be looked through [Range to Look in] must be sorted in ascending order, otherwise error
will occur, either as #N/A or incorrect results.
TRANSPOSE
Name
Alan
Bob
Carol
Total
Jan
10
40
70
120
Feb
30
50
80
160
Name
Alan
Bob
Carol
Total
Jan
Feb
10
30
40
50
70
80
120
160
=TRANSPOSE(C293:E297)
VLOOKUP
The column numbers are not needed.
they are part of the illustration.
col 1
col 2
col 3
col 4
col 5
col 6
Jan
Feb
Mar
10
80
97
20
90
69
30
100
45
40
110
51
50
120
77
Feb
4
100
=VLOOKUP(G338,C333:H335,G339,FALSE)
What Does It Do ?
This function scans down the row headings at the side of a table to find a specified item.
When the item is found, it then scans across to pick a cell entry.
Syntax
=VLOOKUP(ItemToFind,RangeToLookIn,ColumnToPickFrom,SortedOrUnsorted)
The ItemToFind is a single item specified by the user.
The RangeToLookIn is the range of data with the row headings at the left hand side.
The ColumnToPickFrom is how far across the table the function should look to pick from.
The Sorted/Unsorted is whether the row headings are sorted. TRUE for yes, FALSE for no.
Formatting
No special formatting is needed.
Example 1
This table is used to find a value based on a specified name and month.
The =VLOOKUP() is used to scan down to find the name.
The problem arises when we need to scan across to find the month column.
To solve the problem the =MATCH() function is used.
The =MATCH() looks through the list of names to find the month we require. It then calculates
the position of the month in the list. Unfortunately, because the list of months is not as wide
as the lookup range, the =MATCH() number is 1 less than we require, so and extra 1 is
added to compensate.
The =VLOOKUP() now uses this =MATCH() number to look across the columns and
picks out the correct cell entry.
The =VLOOKUP() uses FALSE at the end of the function to indicate to Excel that the
row headings are not sorted.
Bob
Eric
Alan
Carol
David
Jan
10
20
30
40
50
Feb
80
90
100
110
120
Mar
97
69
45
51
77
eric
mar
The result is :
69
=VLOOKUP(F383,C377:F381,MATCH(F384,D376:F376,0)+1,FALSE)
Example 2
This example shows how the =VLOOKUP() is used to pick the cost of a spare part for
different makes of cars.
The =VLOOKUP() scans down row headings in column F for the spare part entered in column C.
When the make is found, the =VLOOKUP() then scans across to find the price, using the
result of the =MATCH() function to find the position of the make of car.
The functions use the absolute ranges indicated by the dollar symbol . This ensures that
when the formula is copied to more cells, the ranges for =VLOOKUP() and =MATCH() do
not change.
Maker
Vauxhall
VW
Ford
VW
Ford
Ford
Vauxhall
Ford
Spare
Ignition
GearBox
Engine
Steering
Ignition
CYHead
GearBox
Engine
Cost
Lookup Table
50
Vauxhall
Ford
600
GearBox
500
450
1,200
Engine
1000
1200
275
Steering
250
350
70
Ignition
50
70
290
CYHead
300
290
500
1,200
=VLOOKUP(C408,F402:I406,MATCH(B408,G401:I401,0)+1,FALSE)
Example 3
In the following example a builders merchant is offering discount on large orders.
The Unit Cost Table holds the cost of 1 unit of Brick, Wood and Glass.
The Discount Table holds the various discounts for different quantities of each product.
The Orders Table is used to enter the orders and calculate the Total.
All the calculations take place in the Orders Table.
The name of the Item is typed in column C of the Orders Table.
The Unit Cost of the item is then looked up in the Unit Cost Table.
The FALSE option has been used at the end of the function to indicate that the product
names down the side of the Unit Cost Table are not sorted.
Using the FALSE option forces the function to search for an exact match. If a match is
not found, the function will produce an error.
=VLOOKUP(C448,C441:D443,2,FALSE)
The discount is then looked up in the Discount Table
If the Quantity Ordered matches a value at the side of the Discount Table the =VLOOKUP will
look across to find the correct discount.
The TRUE option has been used at the end of the function to indicate that the values
down the side of the Discount Table are sorted.
Using TRUE will allow the function to make an approximate match. If the Quantity Ordered does
not match a value at the side of the Discount Table, the next lowest value is used.
Trying to match an order of 125 will drop down to 100, and the discount from
the 100 row is used.
=VLOOKUP(D448,F441:I443,MATCH(C448,G440:I440,0)+1,TRUE)
Item
Units
Brick
1
100
300
Orders Table
Unit Cost
Discount
Total
Discount Table
Wood
0%
0%
6%
3%
8%
5%
Brick
Wood
Glass
Brick
Wood
Glass
100
200
150
225
50
500
2
1
3
2
1
3
6%
3%
12%
6%
0%
15%
188
194
396
423
50
1,275
Formula for :
Unit Cost =VLOOKUP(C453,C441:D443,2,FALSE)
Discount =VLOOKUP(D453,F441:I443,MATCH(C453,G440:I440,0)+1,TRUE)
Total
=(D453*E453)-(D453*E453*F453)
o by the user.
","Silver","Bronze"),"unplaced")
","Silver","Bronze"),"unplaced")
","Silver","Bronze"),"unplaced")
","Silver","Bronze"),"unplaced")
","Silver","Bronze"),"unplaced")
Values
250
600
1000
4000
1000
3
=MATCH(I47,I42:I45,1)
match exists.
work correctly.
match exists.
G112:G115,-1)
66,D159:F166,F167,FALSE)
a specified item.
column and
=VLOOKUP(F211,C203:F208,3,FALSE)
211,C204:C208,0)+1,FALSE)
VW
600
800
275
45
310
$229:$F$233,0)+1,FALSE)
1,D243:G249,F243:F249)
ause errors.
OKUP() then
From
25
30
0,C277:C282,E277:J277)
Shortcut
Copy this table & do not use cut function
Right Click at the 1st cell where you want the transposed table
mula is required.
38,C333:H335,G339,FALSE)
pecified item.
n calculates
0)+1,FALSE)
ed in column C.
VW
600
800
275
45
310
01,0)+1,FALSE)
If a match is
ount Table
Glass
0%
12%
15%
AND
Items To Test
500
800
500
25
25
500
12
Result
1
=AND(C4>=100,D4>=100)
=AND(C5>=100,D5>=100)
=AND(C6>=100,D6>=100)
=AND(D7>=1,D7<=52)
Maths
80
50
60
90
20
40
10
80
30
10
English
75
30
70
85
30
60
90
70
10
20
Physics
85
40
50
95
Absent
80
80
60
20
30
Passed
1
0
0
1
0
0
0
1
0
0
=AND(C38>=AVERAGE($C$29:$C$38),D38>=AVERAGE($D$29:$D$38),E38>=AVERAGE($E$29:$E$38))
Averages
47
54
Name
Alan
Bob
Carol
Sales
1000
6000
2000
Target
5000
5000
4000
60
IF
Result
Not Achieved =IF(C48>=D48,"Achieved","Not Achieved")
Achieved
=IF(C49>=D49,"Achieved","Not Achieved")
Not Achieved =IF(C50>=D50,"Achieved","Not Achieved")
Sales
1000
6000
2000
Target
5000
5000
4000
Result
Not Achieved =IF(C75>=D75,"Achieved","Not Achieved")
Achieved
=IF(C76>=D76,"Achieved","Not Achieved")
Not Achieved =IF(C77>=D77,"Achieved","Not Achieved")
Example 2
The following table is similar to that in Example 1.
This time the Commission to be paid to the sales rep is calculated.
If the Sales are greater than or equal to the Target, the Commission is 10% of Sales.
If the Sales do not reach Target, the Commission is only 5% of Sales.
Name
Alan
Bob
Carol
Sales
1000
6000
2000
Target
5000
5000
4000
Commission
50
=IF(C87>=D87,C87*10%,C87*5%)
600
=IF(C88>=D88,C88*10%,C88*5%)
100
=IF(C89>=D89,C89*10%,C89*5%)
Example 3
This example uses the =AND() within the =IF() function.
A builders merchant gives 10% discount on certain product lines.
The discount is only given on products which are on Special Offer, when the Order Value
is 1000 or above.
The =AND() function is used with the =IF() to check that the product is on offer and that
the value of the order is above 1000.
Product
Wood
Glass
Cement
Turf
Special
Offer
Yes
No
Yes
Yes
Order
Value
2,000
2,000
500
3,000
Discount
Total
200 1,800
- 2,000
-
500
300 2,700
=IF (AND(C105="Yes",D105>=1000), D105*10%, 0)
NOT
Cells To Test
10
20
10
20
10
20
1-Jan-98 1-Feb-98
Hello
Goodbye
Hello
Hello
Result
1
1
0
1
1
=NOT(C113>D113)
=NOT(C114=D114)
=NOT(C115<D115)
=NOT(C116>D116)
=NOT(C117=D117)
=NOT(C118=D118)
What Does It Do ?
This function performs a test to see if the test fails. (A type of reverse logic).
If the test fails, the result is TRUE.
If the test is met, then the result is FALSE.
Syntax
=NOT(TestToPerform)
The TestToPerform can be reference to cells or another calculation.
Formatting
No special formatting is needed.
Example
The following table was used by a library to track books borrowed.
The date the book was Taken out is entered.
The period of the Loan is entered.
The date the book was returned is entered.
The =NOT() function has been used to calculate whether the book was returned within
the correct time, by adding the Loan value to the Taken date.
If the book was not returned on time the result Overdue is shown, otherwise OK is shown.
Taken
1-Jan-98
1-Jan-98
1-Jan-98
Loan
14
14
14
Returned
5-Jan-98
15-Jan-98
20-Jan-98
Status
OK
OK
Overdue
=IF(NOT(D142<=B142+C142),"Overdue","OK")
=IF(NOT(D143<=B143+C143),"Overdue","OK")
=IF(NOT(D144<=B144+C144),"Overdue","OK")
Order No.
AB001
AB002
AB003
AB004
Cost
1000
1000
2000
5000
Payment
Type
Cash
Visa
Cheque
Delta
Handling
Charge
OR
=IF(OR(E151="Visa",E151="Delta"),5,0)
=IF(OR(E152="Visa",E152="Delta"),5,0)
=IF(OR(E153="Visa",E153="Delta"),5,0)
=IF(OR(E154="Visa",E154="Delta"),5,0)
Syntax
=OR(Test1,Test2)
Note that there can be up to 30 possible tests.
Formatting
When used by itself it will show TRUE or FALSE.
Example
The following table shows a list of orders taken by a company.
A handling charge of 5 is made on all orders paid by Visa or Delta cards.
The =OR() function has been used to determine whether the charge needs to be applied.
Order No.
AB001
AB002
AB003
AB004
Cost
1000
1000
2000
5000
Payment
Type
Cash
Visa
Cheque
Delta
Handling
Charge
=IF(OR(E174="Visa",E174="Delta"),5,0)
=IF(OR(E175="Visa",E175="Delta"),5,0)
=IF(OR(E176="Visa",E176="Delta"),5,0)
=IF(OR(E177="Visa",E177="Delta"),5,0)
n such as =IF().
hree exams.
ot Achieved")
ot Achieved")
ot Achieved")
es "Achieved".
ot Achieved")
ot Achieved")
ot Achieved")
,"Overdue","OK")
,"Overdue","OK")
,"Overdue","OK")
a",E151="Delta"),5,0)
a",E152="Delta"),5,0)
a",E153="Delta"),5,0)
a",E154="Delta"),5,0)
such as =IF().
a",E174="Delta"),5,0)
a",E175="Delta"),5,0)
a",E176="Delta"),5,0)
a",E177="Delta"),5,0)
DATE
Day
25
25
33
Month
12
12
15
Year
99
99
99
Date
12/25/99 =DATE(E4,D4,C4)
25-Dec-99 =DATE(E5,D5,C5)
April 2, 2000 =DATE(E6,D6,C6)
DATEDIF
FirstDate
1-Jan-60
1-Jan-60
1-Jan-60
1-Jan-60
1-Jan-60
1-Jan-60
SecondDate
10-May-70
10-May-70
10-May-70
10-May-70
10-May-70
10-May-70
Interval
days
months
years
yeardays
yearmonths
monthdays
Difference
3782
124
10
130
4
9
=DATEDIF(C23,D23,"d")
=DATEDIF(C24,D24,"m")
=DATEDIF(C25,D25,"y")
=DATEDIF(C26,D26,"yd")
=DATEDIF(C27,D27,"ym"
=DATEDIF(C28,D28,"md"
Syntax
=DATEDIF(FirstDate,SecondDate,"Interval")
FirstDate : This is the earliest of the two dates.
SecondDate : This is the most recent of the two dates.
"Interval" : This indicates what you want to calculate.
These are the available intervals.
"d"
Days between the two dates.
"m"
Months between the two dates.
"y"
Years between the two dates.
"yd"
Days between the dates, as if the dates were in the same year.
"ym"
Months between the dates, as if the dates were in the same year.
"md"
Days between the two dates, as if the dates were in the same month and yea
Formatting
No special formatting is needed.
Birth date :
1-Jan-60
Years lived :
and the months :
and the days :
56 =DATEDIF(D53,TODAY(),"y")
9 =DATEDIF(D53,TODAY(),"ym")
13 =DATEDIF(D53,TODAY(),"md")
You can put this all together in one calculation, which creates a text version.
Age is 56 Years, 9 Months and 13 Days
="Age is "&DATEDIF(D53,TODAY(),"y")&" Years, "&DATEDIF(D53,TODAY(),"ym")&" Months and "&DATEDIF(D53,TODAY(),"md")&"
DATEVALUE
Date
25-dec-99
12/25/99
25-dec-99
mm/dd/yy
25/12/99
Date Value
36519
36519
36519
=DATEVALUE(C68)
=DATEVALUE(C69)
=DATEVALUE(C70)
=DATEVALUE(C72)
Property Ref.
BC100
FG700
TD200
HJ900
Days Until
Expiry Date
Expiry
25-dec-99
-6138
10-july/99
Err:502
13-sep-98
-6606
25/5/2000
Err:502
=DATEVALUE(E97)-TODAY()
DAY
Full Date
25-Dec-98
14-Oct-16
14-Oct-16
The Day
25
Sat 13
14
=DAY(C105)
=DAY(C106)
=DAY(C107)
DAYS360
StartDate
1-Jan-98
1-Jan-98
1-Jan-98
1-Jan-98
EndDate
5-Jan-98
1-Feb-98
31-Mar-98
31-Dec-98
Days Between
4
30
89
359
EDATE
Start Date
1-Jan-98
2-Jan-98
2-Jan-98
Plus Months
3
3
-3
End Date
1-Apr-98
2-Apr-98
2-Oct-97
=EDATE(C161,D161)
=EDATE(C162,D162)
=EDATE(C163,D163)
Duration
3
3
4
3
3
3
3
End
Mon 06-Apr-98
Sun 12-Apr-98
Sat 09-May-98
Thu 09-Apr-98
Sun 19-Apr-98
Sun 26-Apr-98
Sun 12-Apr-98
=EDATE(C184,D184)
=EDATE(C185,D185)
=EDATE(C186,D186)
=EDATE(C187,D187)
=EDATE(C188,D188)
=EDATE(C189,D189)
=EDATE(C190,D190)
If the week day number is 6 or 7, (Sat or Sun), then 5 is subtracted from the =EDATE() to
ensure the end of contract falls on a Friday.
Start
Tue 06-Jan-98
Mon 12-Jan-98
Fri 09-Jan-98
Fri 09-Jan-98
Mon 19-Jan-98
Mon 26-Jan-98
Mon 12-Jan-98
Duration
3
3
4
3
3
3
3
End
Mon 06-Apr-98
Fri 10-Apr-98
Fri 08-May-98
Thu 09-Apr-98
Fri 17-Apr-98
Fri 24-Apr-98
Fri 10-Apr-98
=EDATE(C205,D205)-IF(WEEKDAY(EDATE(C205,D205),2)>5,WEEKDAY(EDATE(C205,D205),2)-5,0)
EOMONTH
StartDate
5-Jan-98
5-Jan-98
5-Jan-98
Plus Months
2
2
-2
End Of Month
35885
31-Mar-98
30-Nov-97
=EOMONTH(C214,D214)
=EOMONTH(C215,D215)
=EOMONTH(C216,D216)
HOUR
Time
Number
Number
21:15
0.25
Hour
21
6
=HOUR(C234)
=HOUR(C235)
MINUTE
Number
10/14/2016 8:31
9:15:00 PM
0.02
0.52
1.52
Minute
31
15
28
28
28
=MINUTE(C251)
=MINUTE(C252)
=MINUTE(C253)
=MINUTE(C254)
=MINUTE(C255)
2:45
2.75
2
0.75
=F285*24
=INT(F285*24)
=MOD(F285*24,1)
[Reverse Calculation]^^
3.75
3:45
=F296/24
3:00
=INT(F296)/24
0:45
=MOD(F296,1)/24
The three formula above have also been formatted as hh:mm using
the Format, Cells, Number, Time command.
MONTH
Original Date
1-Jan-98
1-Jan-98
Month
1
December
=MONTH(C312)
=MONTH(C313)
8/31/2006
January
=MONTH(F328)
NETWORKDAYS
Start Date
1-Mar-98
25-Apr-98
24-Dec-98
End Date
7-Mar-98
30-Jul-98
5-Jan-99
Work Days
5
69
9
=NETWORKDAYS(C336,D336)
=NETWORKDAYS(C337,D337)
=NETWORKDAYS(C338,D338)
Holidays : This is a list of dates which will be excluded from the calculation, such as Xmas
and Bank holidays.
Formatting
The result will be shown as a number.
Note
The calculation does not include the last day. The result of using 1-Jan-98 and 5-Jan-98 will
give a result of 4. To correct this add 1 to the result. =NETWORKDAYS(Start,End,Holidays)+1
Example
The following example shows how a list of Holidays can be created.
Start Date
Mon 02-Mar-98
Mon 02-Mar-98
Mon 27-Apr-98
Bank Holiday
Xmas
New Year
New Year
New Year
End Date
Fri 06-Mar-98
Fri 13-Mar-98
Fri 01-May-98
Work Days
5
10
4
=NETWORKDAYS(B360,C360,C365:C369)
=NETWORKDAYS(B361,C361,C365:C369)
=NETWORKDAYS(B362,C362,C365:C369)
Holidays
1-May-98
25-Dec-98
1-Jan-97
1-Jan-98
1-Jan-99
NOW
The current Date and Time
10/14/2016 8:31 =NOW()
42657.3554164617 =NOW()
What Does It Do?
This function shows the current date and time. The result will be updated each time the
worksheet is opened and every time an entry is made anywhere on the worksheet.
Syntax
=NOW()
Formatting
The result will be shown as a date and time. If it is formatted to show as a number
the integer part is used for the date and the decimal portion represent the time.
SECOND
Number
14/Oct/16 08:31:48
Second
48
=SECOND(C395)
12:00:00 PM
0.50
0.51
1.51
0
0
24
24
=SECOND(C396)
=SECOND(C397)
=SECOND(C398)
=SECOND(C399)
Duration
0:01:08
0:02:03
0:01:47
0.01
Billed Duration
Minutes
Seconds
Cost
1
10
0.70
2
5
1.25
1
50
1.10
=MINUTE(C427) =CEILING(SECOND(C427),5)
=(Minutes*
=(D425*60*$F$421)+(E4
=(D426*60*$F$421)+(E4
=(D427*60*$F$421)+(E4
TIME
Hour
14
14
14
Minute
30
30
30
Second
59
59
59
Time
14:30:59
2:30:59 PM
0.60485
=TIME(C435,D435,E435)
=TIME(C436,D436,E436)
=TIME(C437,D437,E437)
The result will be shown as a time which can be formatted either as 12 or 24 hour style.
If a normal number format is applied a decimal fraction is shown which represents the
time as a fraction of the day.
TIMEVALUE
Text
14:30:59
14:30:59
14:30:59
Time
0.604849537
14:30:59
2:30:59 PM
=TIMEVALUE(C455)
=TIMEVALUE(C456)
=TIMEVALUE(C457)
TODAY
Today Is
14-Oct-16
=TODAY()
Days Since
7226
7005
=TODAY()-C492
=TODAY()-C493
Note that the result is actually the number of days before todays date. To calculate
a result which includes the current date an extra 1 will need to be added.
Date
1-Jan-97
10-Aug-97
Days Since
7227
7006
=TODAY()-C500+1
=TODAY()-C501+1
Example
The following example shows the number of days from today until the year 2000.
Year 2000
01-Jan-2000
Days Until
-6131
=C508-TODAY()
Date
Thu 01-Jan-98
Thu 01-Jan-98
Thu 01-Jan-98
Thu 01-Jan-98
Thu 01-Jan-98
Weekday
5
5
5
4
3
=WEEKDAY(C515)
=WEEKDAY(C516)
=WEEKDAY(C517,1)
=WEEKDAY(C518,2)
=WEEKDAY(C519,3)
WEEKDAY
Actual Day
Wednesday
Booking Cost
30.00 =LOOKUP(WEEKDAY(C545
7-Jan-98
Wednesday
=TEXT(C546,"DDDD")
25.00 =LOOKUP(WEEKDAY(C546,2
Booking Rates
Day Of Week
Cost
1
50
2
25
3
25
4
30
5
40
6
50
7
100
WORKDAY
StartDate
1-Jan-98
1-Jan-98
Days
28
28
Result
35836
10-Feb-98
=WORKDAY(D564,E564)
=WORKDAY(D565,E565)
Bank Holiday
Xmas
New Year
New Year
New Year
Holidays
Fri 01-May-98
Fri 25-Dec-98
Wed 01-Jan-97
Thu 01-Jan-98
Fri 01-Jan-99
YEAR
Date
25-Dec-98
Year
1998
=YEAR(C4)
YEARFRAC
Year Fraction
Start Date
1-Jan-98
1-Jan-98
1-Jan-98
End Date
1-Apr-98
31-Dec-98
1-Apr-98
Fraction
0.25
1
25%
=YEARFRAC(C615,D615)
=YEARFRAC(C616,D616)
=YEARFRAC(C617,D617)
End
31-Dec-98
31-Mar-98
Actual Salary
12,000
3,000
=YEARFRAC(B643,C643+1,4)*D643
=YEARFRAC(B644,C644+1,4)*D644
1-Jan-98
30-Jun-98
12,000
6,000
=YEARFRAC(B645,C645+1,4)*D645
Note
The extra 1 has been added to the End date to compensate for the fact that the =YEARFRAC()
function calculates from the Start date up to, but not including, the End date.
=DATE(E4,D4,C4)
=DATE(E5,D5,C5)
=DATE(E6,D6,C6)
=DATEDIF(C23,D23,"d")
=DATEDIF(C24,D24,"m")
=DATEDIF(C25,D25,"y")
=DATEDIF(C26,D26,"yd")
=DATEDIF(C27,D27,"ym")
=DATEDIF(C28,D28,"md")
he same year.
n the same year.
in the same month and year.
d "&DATEDIF(D53,TODAY(),"md")&" Days"
=DAY(F122)
30,D130,TRUE)
31,D131,TRUE)
32,D132,TRUE)
33,D133,TRUE)
-day months).
n the calculation.
05,D205),2)-5,0)
E(NOW()),"00")
ND(NOW()),"00")
=F285*24
=INT(F285*24)
=MOD(F285*24,1)
=INT(F296)/24
=MOD(F296,1)/24
=MONTH(F328)
AYS(C336,D336)
AYS(C337,D337)
AYS(C338,D338)
C365:C369)
C365:C369)
C365:C369)
=TIME(C435,D435,E435)
=TIME(C436,D436,E436)
=TIME(C437,D437,E437)
EEKDAY(C545),C550:D556)
EEKDAY(C546,2),C551:D557)
=WORKDAY(D564,E564)
=WORKDAY(D565,E565)
D25,E25,D28:D32)
B643,C643+1,4)*D643
B644,C644+1,4)*D644
B645,C645+1,4)*D645
DAVERAGE
Product
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Bulb
Life
Wattage Hours
Brand
200
3000
Horizon
100
2000
Horizon
60
10
8000
Sunbeam
80
1000
Horizon
100
unknown Horizon
200
3000
Horizon
25
unknown Sunbeam
200
3000
Sunbeam
100
2000
Sunbeam
100
unknown Sunbeam
10
800
Horizon
60
1000
Sunbeam
80
1000
Sunbeam
100
2000
Horizon
40
1000
Horizon
1.24
=DAVERAGE(B3:I19,F3,E23:E24)
What Does It Do ?
This function examines a list of information and produces an average.
Syntax
=DAVERAGE(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name, or cell, of the values to be averaged, such as "Unit Cost" or F3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record, or records, which are to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Examples
The average Unit Cost of a particular Product of a particular Brand.
Product
Bulb
Brand
Horizon
1.16
=DAVERAGE(B3:I19,F3,E49:F50)
This is the same calculation but using the actual name "Unit Cost" instead of the cell address.
1.16
=DAVERAGE(B3:I19,"Unit Cost",E49:F50)
0.17
Wattage
<100
=DAVERAGE(B3:I19,"Unit Cost",E60:F61)
DCOUNT
Product
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Bulb
Life
Hours
3000
2000
Wattage
Brand
200
Horizon
100
Horizon
60
10
8000
Sunbeam
80
1000
Horizon
100
unknown Horizon
200
3000
Horizon
25
unknown Sunbeam
200
3000
Sunbeam
100
2000
Sunbeam
100
unknown Sunbeam
10
800
Horizon
60
1000
Sunbeam
80
1000
Sunbeam
100
2000
Horizon
40
1000
Horizon
Count the number of products of a particular Brand which have a Life Hours rating.
=DCOUNT(B69:I85,D69,E89:E90)
What Does It Do ?
This function examines a list of information and counts the values in a specified column.
It can only count values, the text items and blank cells are ignored.
Syntax
=DCOUNT(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name, or cell, of the values to Count, such as "Value Of Stock" or I3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record, or records, which are to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Examples
The count of a particular product, with a specific number of boxes in stock.
Product
Bulb
The number of products is :
Boxes In
Stock
5
=DCOUNT(B69:I85,H69,E116:F117)
This is the same calculation but using the name "Boxes In Stock" instead of the cell address.
3
=DCOUNT(B69:I85,"Boxes In Stock",E116:F117)
Wattage
>=80
Wattage
<=100
=DCOUNT(B69:I85,"Boxes In Stock",E127:G128)
DCOUNTA
Product
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Life
Hours
3000
2000
Wattage
Brand
200
Horizon
100
Horizon
60
10
8000
Sunbeam
80
1000
Horizon
100
unknown Horizon
200
3000
Horizon
25
unknown Sunbeam
200
3000
Sunbeam
100
2000
Sunbeam
100
unknown Sunbeam
10
800
Horizon
60
1000
Sunbeam
80
1000
Sunbeam
100
2000
Horizon
Bulb
40
1000
Horizon
0.10
20
10.00
=DCOUNTA(B136:I152,E136,E156:E157)
What Does It Do ?
This function examines a list of information and counts the non blank cells in a specified column.
It counts values and text items, but blank cells are ignored.
Syntax
=DCOUNTA(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name, or cell, of the values to Count, such as "Value Of Stock" or I3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record, or records, which are to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Examples
The count of a product with an unknown Life Hours value.
=DCOUNTA(B136:I152,D136,E183:F184)
This is the same calculation but using the name "Life Hours" instead of the cell address.
1
=DCOUNTA(B136:I152,"Life Hours",E183:F184)
=DCOUNTA(B136:I152,"Product",E194:F196)
DGET
Product
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Bulb
Life
Wattage Hours
Brand
200
3000
Horizon
100
2000
Horizon
60
10
8000
Sunbeam
80
1000
Horizon
100
unknown Horizon
200
3000
Horizon
25
unknown Sunbeam
200
3000
Sunbeam
100
2000
Sunbeam
100
unknown Sunbeam
10
800
Horizon
60
1000
Sunbeam
80
1000
Sunbeam
100
2000
Horizon
40
1000
Horizon
Product
Bulb
Wattage
100
Life
Hours
Brand
Horizon
5
=DGET(B204:I220,H204,C224:F225)
What Does It Do ?
This function examines a list of information and produces one result.
If more than one record matches the criteria the error #NUM is shown.
If no records match the criteria the error #VALUE is shown.
Syntax
=DGET(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name, or cell, of the values to Get, such as "Value Of Stock" or I3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record which needs to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Example 1
This example extracts information from just one record.
Product
Bulb
Wattage
100
Life
Hours
Brand
Horizon
5
=DGET(B204:I220,H204,C253:F254)
Example 2
This example extracts information from multiple records and therefore shows the #NUM error.
How many boxes of a particular item do we have in stock?
Product
Bulb
Wattage
100
Life
Hours
Brand
Err:502 =DGET(B204:I220,H204,C264:F265)
This error is because of multiple brands for Bulb + 100
Example 3
This example extracts information from no records and therefore shows the #VALUE error.
How many boxes of a particular item do we have in stock?
Product
Bulb
Wattage
9999
Life
Hours
Brand
Err:504 =DGET(B206:I222,H206,C276:F277)
This error is because of non matching of wattage
Example 4
This example uses the =IF() function to display a message when an error occurs.
How many boxes of a particular item do we have in stock?
Product
Bulb
Wattage
9999
Life
Hours
Brand
DMAX
Product
Wattage
Life
Hours
Brand
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Bulb
200
100
60
10
80
100
200
25
200
100
100
10
60
80
100
40
3000
2000
Horizon
Horizon
4.50
2.00
4
15
3
2
8000
1000
unknown
3000
unknown
3000
2000
unknown
800
1000
1000
2000
1000
Sunbeam
Horizon
Horizon
Horizon
Sunbeam
Sunbeam
Sunbeam
Sunbeam
Horizon
Sunbeam
Sunbeam
Horizon
Horizon
0.80
0.20
1.25
2.50
0.50
5.00
1.80
0.25
0.20
0.15
0.20
0.80
0.10
25
40
10
15
10
3
20
10
25
25
30
10
20
6
3
4
0
3
2
5
5
2
0
2
5
5
54.00
60.00
0.00
120.00
24.00
50.00
0.00
15.00
30.00
180.00
12.50
10.00
0.00
12.00
40.00
10.00
=DMAX(B299:I315,I299,E319:E320)
What Does It Do ?
This function examines a list of information and produces the largest value from a specified column.
Syntax
=DMAX(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name or cell, of the values to pick the Max from, such as "Value Of Stock" or I3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record, or records, which are to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Examples
The largest Value Of Stock of a particular Product of a particular Brand.
Product
Bulb
Brand
sunbeam
30.00
=DMAX(B299:I315,I299,E345:F346)
This is the same calculation but using the name "Value Of Stock" instead of the cell address.
30.00
=DMAX(B299:I315,"Value Of Stock",E345:F346)
24.00
Wattage
<100
=DMAX(B299:I315,"Value Of Stock",E356:F357)
DMIN
Product
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Bulb
Life
Wattage Hours
Brand
200
3000
Horizon
100
2000
Horizon
60
10
8000
Sunbeam
80
1000
Horizon
100
unknown Horizon
200
3000
Horizon
25
unknown Sunbeam
200
3000
Sunbeam
100
2000
Sunbeam
100
unknown Sunbeam
10
800
Horizon
60
1000
Sunbeam
80
1000
Sunbeam
100
2000
Horizon
40
1000
Horizon
=DMIN(B365:I381,I365,E385:E386)
What Does It Do ?
This function examines a list of information and produces smallest value from a specified column.
Syntax
=DMIN(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name, or cell, of the values to pick the Min from, such as "Value Of Stock" or I3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record, or records, which are to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Examples
The lowest Value Of Stock of a particular Product of a particular Brand.
Product
Bulb
The lowest value is :
3.75
Brand
sunbeam
=DMIN(B365:I381,I365,E411:F412)
This is the same calculation but using the name "Value Of Stock" instead of the cell address.
3.75
=DMIN(B365:I381,"Value Of Stock",E411:F412)
12.00
Wattage
>=80
Wattage
<=100
=DMIN(B365:I381,"Value Of Stock",E422:G423)
DSUM
Product
Bulb
Neon
Spot
Other
Bulb
Spot
Spot
Other
Bulb
Neon
Bulb
Bulb
Bulb
Bulb
Bulb
Bulb
Life
Wattage Hours
Brand
200
3000
Horizon
100
2000
Horizon
60
10
8000
Sunbeam
80
1000
Horizon
100
unknown Horizon
200
3000
Horizon
25
unknown Sunbeam
200
3000
Sunbeam
100
2000
Sunbeam
100
unknown Sunbeam
10
800
Horizon
60
1000
Sunbeam
80
1000
Sunbeam
100
2000
Horizon
40
1000
Horizon
What Does It Do ?
This function examines a list of information and produces the total.
Syntax
=DSUM(DatabaseRange,FieldName,CriteriaRange)
The DatabaseRange is the entire list of information you need to examine, including the
field names at the top of the columns.
The FieldName is the name, or cell, of the values to be totalled, such as "Value Of Stock" or I3.
The CriteriaRange is made up of two types of information.
The first set of information is the name, or names, of the Fields(s) to be used as the basis
for selecting the records, such as the category Brand or Wattage.
The second set of information is the actual record, or records, which are to be selected, such
as Horizon as a brand name, or 100 as the wattage.
Formatting
No special formatting is needed.
Examples
The total Value Of Stock of a particular Product of a particular Brand.
Product
Bulb
Brand
sunbeam
54.50
=DSUM(B431:I447,I431,E477:F478)
This is the same calculation but using the name "Value Of Stock" instead of the cell address.
54.50
=DSUM(B431:I447,"Value Of Stock",E477:F478)
56.00
Wattage
<100
=DSUM(B431:I447,"Value Of Stock",E488:F489)
specified column.
product found.")
m a specified column.
e Of Stock" or I3.
specified column.
e Of Stock" or I3.
DB
Deprecation based upon a fixed percentage.
Purchase Price :
Life in Years :
Salvage value :
Year
1
2
3
4
5
Total Depreciation :
5,000
5
200
Deprecation
2,375.00
1,246.88
654.61
343.67
180.43
=DB($E$3,$E$5,$E$4,D8)
=DB($E$3,$E$5,$E$4,D9)
=DB($E$3,$E$5,$E$4,D10)
=DB($E$3,$E$5,$E$4,D11)
=DB($E$3,$E$5,$E$4,D12)
What Does It Do ?
This function calculates deprecation based upon a fixed percentage.
* The first year is depreciated by the fixed percentage.
** The second year uses the same percentage, but uses the original value of the item less
the first years depreciation.
*** Any subsequent years use the same percentage, using the original value of the item less
the depreciation of the previous years.
The percentage used in the depreciation is not set by the user, the function calculates
the necessary percentage, which will be vary based upon the values inputted by the user.
An additional feature of this function is the ability to take into account when the item was
originally purchased.
If the item was purchased part way through the financial year, the first years depreciation
will be based on the remaining part of the year.
Syntax
=DB(PurchasePrice,SalvageValue,Life,PeriodToCalculate,FirstYearMonth)
The FirstYearMonth is the month in which the item was purchased during the
first financial year. This is an optional value, if it not used the function will assume 12 as
the value.
Formatting
No special formatting is needed.
Example 1
This example shows the percentage used in the depreciation.
Year 1 depreciation is based upon the original Purchase Price alone.
Year 2 depreciation is based upon the original Purchase Price minus Year 1 deprecation.
Year 3 deprecation is based upon original Purchase Price minus Year 1 + Year 2 deprecation.
The % Deprc has been calculated purely to demonstrate what % is being used.
Purchase Price :
Salvage value :
Life in Years :
Year
1
5,000
1,000
5
Deprecation
1,375.00
% Deprc
27.50%
2
3
4
5
Total Depreciation :
996.88
722.73
523.98
379.89
=DB(E47,E48,E49,D56)
27.50%
27.50%
27.50%
27.50%
3,998.48
Example 2
This example is similar to the previous, with the exception of the deprecation being calculated
on a monthly basis. This has been done by multiplying the years by 12.
Purchase Price :
Life in Years :
Salvage value :
Month
56
57
58
59
60
5,000
5
100
Deprecation
8.79
8.24
7.72
7.23
6.78
=DB(E66,E68,E67*12,D75)
Example 3
This example shows how the length of the first years ownership has been taken into account.
Purchase Price :
Life in Years :
Salvage value :
First Year Ownership In Months :
Year
1
2
3
4
5
Total Depreciation :
5,000
5
1,000
6
Deprecation
687.50
1,185.94
859.80
623.36
451.93
=DB(E82,E84,E83,D92,E85)
% Deprc
13.75%
27.50%
27.50%
27.50%
27.50%
3,808.54
Example 4
This example has been created with both the Excel calculated percentage and the 'real'
percentage calculated manually.
The Excel Deprecation uses the =DB() function.
The Real Deprecation uses a manual calculation.
This is the 'real' deprecation percentage, calculated manually :
Purchase Price :
Salvage value :
Life in Years :
5,000
1,000
5
Excel
Real
Deprecation Depreciation
1,375.0000 1,376.1017
996.8750
997.3705
722.7344
722.8739
523.9824
523.9243
379.8873
379.7297
Year
1
2
3
4
5
Total Depreciation :
3,998.48
Error difference :
27.522034%
=1-((E117/E116)^(1/E118))
=1 - ((salvage / cost) ^ (1 / life)).
Excel
% Deprc
27.500%
27.500%
27.500%
27.500%
27.500%
4,000.00
1.52
SLN
Straight Line Method
Cost
Salvage
Life
Straight Line Depreciation
12,000
2,000
4
2,500 =SLN(F135,F136,F137)
20,000
8,000
6
2,000 =SLN(F141,F142,F143)
What Does It Do ?
This function calculates the Straight Line Depreciation of an item.
(Also known as Fixed Instalment method).
The Straight Line Depreciation is how much the value of an item reduced during a specific
period of time. The result is a uniform depreciation value.
An example would be if you bought a new car for 20,000, then kept it for 6 years.
At the end of your ownership you sell the car for 8,000.
The difference between the original and the trade in price is 20,000 - 8,000 which is 12,000.
Because you owned the car for 6 years, the SLN is calculated as 12,000 / 6 which is 2,000.
Syntax
=SLN(OriginalCost,SellingPrice,LengthOfOwnership)
g calculated
ost) ^ (1 / life)).
116)^(1/E118))
ge / cost) ^ (1 / life)).
Project Dates
Page 128 of 158
C
Project Dates
2
3
4
Target Delivery
Tue 27-Jan-98
Job Stage
Survey
Foundation
Walls
Roof
Electrics
Start Date
Mon 05-Jan-98
Mon 12-Jan-98
Fri 16-Jan-98
Wed 21-Jan-98
Thu 29-Jan-98
Actual Delivery
Tue 03-Feb-98
Against Target
5 days behind
Total Days
22
5
6
7
8
9
10
11
12
13
14
15
16
1
2
3
4
5
House Building
Days
Required
5
4
3
6
4
End Date
Fri 09-Jan-98
Thu 15-Jan-98
Tue 20-Jan-98
Wed 28-Jan-98
Tue 03-Feb-98
=NETWORKDAYS(C3,C12)-1
Target Budget
12,000
Daily Cost
200
1,000
800
400
300
Total
1,000
4,000
2,400
2,400
1,200
Total Cost
11,000
Budget %
92%
Filename formula
Page 129 of 158
C
Filename formula
There may be times when you need to insert the name of the current workbook
or worksheet in to a cell.
This can be done by using the CELL() function, shown below.
C:\Users\ChiritaS\Desktop\Stefan\usseful\[excel-functions-training-version.xlsx]Matrix Index
=CELL("filename")
The problem with this is that it gives the complete path including drive letter and folders.
To just pick out the workbook or worksheet name you need to use text functions.
To pick the Path.
C:\Users\ChiritaS\Desktop\Stefan\usseful\
=MID(CELL("filename"),1,FIND("[",CELL("filename"))-1)
To pick the Workbook name.
excel-functions-training-version.xlsx
=MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))-FIND("[",CELL("filename"))-1)
Age Calculation
Page 130 of 158
C
Age Calculation
You can calculate a persons age based on their birthday and todays date.
The calculation uses the DATEDIF() function.
The DATEDIF() is not documented in Excel 5, 7 or 97, but it is in 2000.
(Makes you wonder what else Microsoft forgot to tell us!)
Birth date :
1-Jan-60
Years lived :
and the months :
and the days :
56
9
13
=DATEDIF(C8,TODAY(),"y")
=DATEDIF(C8,TODAY(),"ym")
=DATEDIF(C8,TODAY(),"md")
You can put this all together in one calculation, which creates a text version.
Age is 56 Years, 9 Months and 13 Days
="Age is "&DATEDIF(C8,TODAY(),"y")&" Years, "&DATEDIF(C8,TODAY(),"ym")&" Months and "&DATEDIF(C8,TODAY(),"md")&" Days"
1-Jan-60
56.79 =(TODAY()-C23)/365.25
INT
Page 131 of 158
D
INT
Number
1.5
2.3
10.75
-1.47589
Integer
1
2
10
-2
=INT(C4)
=INT(C5)
=INT(C6)
=INT(C7)
What Does It Do ?
This function rounds a number down to the nearest whole number.
Syntax
=INT(Number)
Formatting
No special formatting is needed.
Example
The following table was used by a school to calculate the age a child when the
school year started.
A child can only be admitted to school if they are over 8 years old.
The Birth Date and the Term Start date are entered and the age calculated.
Table 1 shows the age of the child with decimal places
Table 1
Birth Date
1-Jan-80
5-Feb-81
20-Oct-79
1-Mar-81
Term Start
1-Sep-88
1-Sep-88
1-Sep-88
1-Sep-88
Age
8.6680355921 =(D27-C27)/365.25
7.5701574264
8.8678986995
7.5044490075
Table 2 shows the age of the child with the Age formatted with no decimal places.
This has the effect of increasing the child age.
Table 2
Birth Date
1-Jan-80
5-Feb-81
20-Oct-79
1-Mar-81
Term Start
1-Sep-88
1-Sep-88
1-Sep-88
1-Sep-88
Age
9
8
9
8
=(D38-C38)/365.25
Table 3 shows the age of the child with the Age calculated using the =INT() function to
remove the decimal part of the number to give the correct age.
Table 3
Birth Date
1-Jan-80
5-Feb-81
20-Oct-79
1-Mar-81
Term Start
1-Sep-88
1-Sep-88
1-Sep-88
1-Sep-88
Age
8
7
8
7
=INT((D49-C49)/365.25)
Note
The age is calculated by subtracting the Birth Date from the Term Start to find the
age of the child in days.
B
C
D
E
F
The number of days is then divided by 365.25
The reason for using 365.25 is to take account of the leap years.
INT
Page 132 of 158
G
MOD
Page 133 of 158
Number
12
20
18
9
24
Divisor
5
7
3
2
7
Remainder
2
6
0
1
3
=MOD(C4,D4)
=MOD(C5,D5)
=MOD(C6,D6)
=MOD(C7,D7)
=MOD(C8,D8)
MOD
What Does It Do ?
This function calculates the remainder after a number has been divided by another number.
Syntax
=MOD(Number,Divisor)
Formatting
No special formatting is needed.
ROMAN
Page 134 of 158
D
ROMAN
Number
Roman
1
I
2
II
3
III
5
V
10
X
1998 MCMXCVIII
1998 MCMXCVIII
1998 MLMVLIII
1998
MXMVIII
1998
MVMIII
1998
MVMIII
1998 MCMXCVIII
1998
MVMIII
=ROMAN(C4)
=ROMAN(C5)
=ROMAN(C6)
=ROMAN(C7)
=ROMAN(C8)
=ROMAN(C9)
=ROMAN(C10,0)
=ROMAN(C11,1)
=ROMAN(C12,2)
=ROMAN(C13,3)
=ROMAN(C14,4)
=ROMAN(C15,TRUE)
=ROMAN(C16,FALSE)
What Does It Do ?
This function produces a number shown as Roman numerals in various formats.
Syntax
=ROMAN(NormalNumber,RomanNumberFormat)
The RomanNumberFormat can be any of the following.
0 is Classic. This is used if no format is specified.
1 is more Concise.
2 is even more Concise.
3 is even more Concise still.
4 is Simplified.
TRUE is Classic
FALSE is Simplified
Formatting
No special formatting is needed.
Note
There is no function to do the opposite calculation of Roman to normal.
Brackets in formula
Page 135 of 158
Brackets in formula
Sometimes you will need to use brackets, (also known as 'braces'), in formula.
This is to ensure that the calculations are performed in the order that you need.
The need for brackets occurs when you mix plus or minus with divide or multiply.
Mathematically speaking the * and / are more important than + and - .
The * and / operations will be calculated before
+ and - .
CEILING
Page 136 of 158
Number
2.1
1.5
1.9
20
25
40
Raised Up
3
2
2
30
30
60
CEILING
=CEILING(C4,1)
=CEILING(C5,1)
=CEILING(C6,1)
=CEILING(C7,30)
=CEILING(C8,30)
=CEILING(C9,30)
What Does It Do ?
This function rounds a number up to the nearest multiple specified by the user.
Syntax
=CEILING(ValueToRound,MultipleToRoundUpTo)
The ValueToRound can be a cell address or a calculation.
Formatting
No special formatting is needed.
Example 1
The following table was used by a estate agent renting holiday apartments.
The properties being rented are only available on a weekly basis.
When the customer supplies the number of days required in the property the =CEILING()
function rounds it up by a multiple of 7 to calculate the number of full weeks to be billed.
Days Required
Customer 1
3
Customer 2
4
Customer 3
10
Days To
Be Billed
7
7
14
=CEILING(D28,7)
=CEILING(D29,7)
=CEILING(D30,7)
Example 2
The following table was used by a builders merchant delivering products to a construction site.
The merchant needs to hire trucks to move each product.
Each product needs a particular type of truck of a fixed capacity.
Table 1 calculates the number of trucks required by dividing the Units To Be Moved by
the Capacity of the truck.
This results of the division are not whole numbers, and the builder cannot hire just part
of a truck.
Table 1
Item
Bricks
Wood
Cement
Units To
Be Moved
1000
5000
2000
Truck
Capacity
300
600
350
Trucks
Needed
3.33
8.33
5.71
=D45/E45
=D46/E46
=D47/E47
Table 2 shows how the =CEILING() function has been used to round up the result of
the division to a whole number, and thus given the exact amount of trucks needed.
Table 2
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
C
Item
Bricks
Wood
Cement
CEILING
Page 137 of 158
D
Units To
Be Moved
1000
5000
2000
E
Truck
Capacity
300
600
350
F
Trucks
Needed
4
9
6
=CEILING(D54/E54,1)
=CEILING(D55/E55,1)
=CEILING(D56/E56,1)
Example 3
The following tables were used by a shopkeeper to calculate the selling price of an item.
The shopkeeper buys products by the box.
The cost of the item is calculated by dividing the Box Cost by the Box Quantity.
The shopkeeper always wants the price to end in 99 pence.
Table 1 shows how just a normal division results in varying Item Costs.
Table 1
Item
Plugs
Sockets
Junctions
Adapters
Box Qnty
11
7
5
16
Box Cost
20
18.25
28.10
28
=D69/C69
=D70/C70
=D71/C71
=D72/C72
Table 2 shows how the =CEILING() function has been used to raise the Item Cost to
always end in 99 pence.
Table 2
Item
Plugs
Sockets
Junctions
Adapters
In Box
11
7
5
16
Box Cost
20
18.25
28.10
28
Explanation
=INT(E83)
=MOD(E83,1)
=CEILING(MOD(E83),0.99)
COMBIN
Page 138 of 158
Pool Of Items
4
4
26
Items In A Group
2
3
2
Possible Groups
6
4
325
COMBIN
Example 1
=COMBIN(C4,D4)
=COMBIN(C5,D5)
=COMBIN(C6,D6)
What Does It Do ?
This function calculates the highest number of combinations available based upon
a fixed number of items.
The internal order of the combination does not matter, so AB is the same as BA.
Syntax
=COMBIN(HowManyItems,GroupSize)
Formatting
No special formatting is required.
Example 1
This example calculates the possible number of pairs of letters available
from the four characters ABCD.
Total Characters
4
Group Size
2
Combinations
6
The proof !
=COMBIN(C25,D25)
Example 2
A decorator is asked to design a colour scheme for a new office.
The decorator is given five colours to work with, but can only use three in any scheme.
How many colours schemes can be created ?
Available Colours Colours Per Scheme Totals Schemes
5
3
10
=COMBIN(C41,D41)
The colours
Red
Green
Blue
Yellow
Black
Scheme 1
Red
Green
Blue
Scheme 2
Red
Green
Yellow
Scheme 3
Red
Green
Black
Scheme 4
Red
Blue
Yellow
Scheme 5
Red
Blue
Black
Scheme 6
Scheme 7
Scheme 8
Scheme 9
Scheme 10
COMBIN
Page 139 of 158
C
Green
Blue
Yellow
D
Green
Blue
Black
E
Green
Yellow
Black
F
Blue
Yellow
Black
G
??????
COUNTIF
Page 140 of 158
Item
Brakes
Tyres
Brakes
Service
Service
Window
Tyres
Tyres
Clutch
Date
1-Jan-98
10-May-98
1-Feb-98
1-Mar-98
5-Jan-98
1-Jun-98
1-Apr-98
1-Mar-98
1-May-98
Cost
80
25
80
150
300
50
200
100
250
COUNTIF
2
3
5
=COUNTIF(C4:C12,"Brakes")
=COUNTIF(C4:C12,"Tyres")
=COUNTIF(E4:E12,">=100")
=COUNTIF(C4:C12,E18)
service
What Does It Do ?
This function counts the number of items which match criteria set by the user.
Syntax
=COUNTIF(RangeOfThingsToBeCounted,CriteriaToBeMatched)
The criteria can be typed in any of the following ways.
To match a specific number type the number, such as =COUNTIF(A1:A5,100)
To match a piece of text type the text in quotes, such as =COUNTIF(A1:A5,"Hello")
To match using operators surround the expression with quotes, such as =COUNTIF(A1:A5,">100")
Formatting
No special formatting is needed.
PRODUCT
Page 141 of 158
3
10
7
Product
6
50
210
6300
=PRODUCT(C4,D4)
=PRODUCT(C5:D5)
=PRODUCT(C6:D6,10)
=PRODUCT(C4:D6)
PRODUCT
Numbers
2
5
3
What Does It Do ?
This function multiples a group of numbers together.
It is the same as using 2*3*5*10*3*7, which results in 6300.
Syntax
=PRODUCT(Number1,Number2,Number3... through to Number30)
or
=PRODUCT(RangeOfNumbers)
or
=PRODUCT(Number1,Range,Number2...)
Formatting
No special formatting is needed.
SUM
Page 142 of 158
200
300
600
=SUM(C4:E4)
600
=SUM(C13,D14,E13)
SUM
Horizontal
100
Vertical
100
200
300
600
=SUM(C7:C9)
Single Cells
100
300
200
Multiple Ranges
100
200
3000
400
500
600
4800
=SUM(C17:C19,E17:E19)
400
500
600
800
=SUM(AVERAGE(C23:C25),MAX(E23:E25))
Functions
100
200
300
What Does It Do ?
This function creates a total from a list of numbers.
It can be used either horizontally or vertically.
The numbers can be in single cells, ranges are from other functions.
Syntax
=SUM(Range1,Range2,Range3... through to Range30).
Formatting
No special formatting is needed.
Note
Many people use the =SUM() function incorrectly.
This example shows how the SUM has been combined with plus + symbols.
The formula is actually doing more work than needed.
It should have been entered as either =C48+C49+C50 or =SUM(C48:C50).
100
200
300
600
=SUM(C48+C49+C50)
=SUM(C48:C50)
Wrong!
Correct
SUM
Page 143 of 158
D
E
=C48+C49+C50
G
Correct
SUM_using_names
Page 144 of 158
D
North
South
East
West
Total
Jan
45
30
35
20
=SUM(Jan)
Feb
50
25
10
50
Mar
50
35
50
5
SUM_as_Running_Total
Page 145 of 158
D
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Sales
10
50
30
20
Running
Total
10
60
90
110
110
110
110
110
110
110
110
110
=SUM($D$7:D7)
=SUM($D$7:D8)
=SUM($D$7:D9)
=SUM($D$7:D10)
=SUM($D$7:D11)
=SUM($D$7:D12)
=SUM($D$7:D13)
=SUM($D$7:D14)
=SUM($D$7:D15)
=SUM($D$7:D16)
=SUM($D$7:D17)
=SUM($D$7:D18)
Type the formula =SUM($D$7:D7) in cell E7 and then copy down the table.
It works because the first reference uses dollar symbols $ to keep $D$7 static
as the formula is copied down. Each occurrence of the =SUM() then adds all
the numbers from the first cell down.
The function can be tidied up to show 0 zero when there is no adjacent value
by using the =IF() function.
Month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Sales
10
50
30
20
Running
Total
10
60
90
110
0
0
0
0
0
0
0
0
=SUM(IF(D7,$D$7:D7,0))
=SUM(IF(D8,$D$7:D8,0))
=SUM(IF(D9,$D$7:D9,0))
=SUM(IF(D10,$D$7:D10,0))
=SUM(IF(D11,$D$7:D11,0))
=SUM(IF(D12,$D$7:D12,0))
The =SUM() only takes place when
there is data in column D.
Otherwise the value 0 zero is entered.
SUMIF
Page 146 of 158
Item
Brakes
Tyres
Brakes
Service
Service
Window
Tyres
Tyres
Clutch
Date
1-Jan-98
10-May-98
1-Feb-98
1-Mar-98
5-Jan-98
1-Jun-98
1-Apr-98
1-Mar-98
1-May-98
Cost
80
25
80
150
300
50
200
100
250
SUMIF
service
160
325
1000
=SUMIF(C4:C12,"Brakes",E4:E12)
=SUMIF(C4:C12,"Tyres",E4:E12)
=SUMIF(E4:E12,">=100")
450
=SUMIF(C4:C12,E18,E4:E12)
What Does It Do ?
This function adds the value of items which match criteria set by the user.
Syntax
=SUMIF(RangeOfThingsToBeExamined,CriteriaToBeMatched,RangeOfValuesToTotal)
=SUMIF(C4:C12,"Brakes",E4:E12) This examines the names of products in C4:C12.
It then identifies the entries for Brakes.
It then totals the respective figures in E4:E12
=SUMIF(E4:E12,">=100")
Formatting
No special formatting is needed.
SUMPRODUCT
Page 147 of 158
D
Sold
5
2
3
price
100
10
2
SUMPRODUCT
Item
Tyres
Filters
Bulbs
526
=SUMPRODUCT(D4:D6,E4:E6)
What Does It Do ?
This function uses at least two columns of values.
The values in the first column are multipled with the corresponding value in the second column.
The total of all the values is the result of the calculation.
Syntax
=SUMPRODUCT(Range1, Range, Range3 through to Range30)
Formatting
No special formatting is needed.
Example
The following table was used by a drinks merchant to keep track of stock.
The merchant needed to know the total purchase value of the stock, and the potential
value of the stock when it is sold, takinging into account the markup percentage.
The =SUMPRODUCT() function is used to multiply the Cases In Stock with the Case Price to
calculate what the merchant spent in buying the stock.
The =SUMPRODUCT() function is used to multiply the Cases In Stock with
the Bottles In Case and the Bottle Setting Price, to calculate the potential value of the
stock if it is all sold.
Product
Red Wine
White Wine
Champagne
Beer
Lager
Cases In
Stock
10
8
5
50
100
Case
Price
120
130
200
24
30
Bottles
In Case
10
10
6
12
12
Bottle
Cost
Markup
12.00
25%
13.00
25%
33.33
80%
2.00
20%
2.50
25%
=D39/E39
Bottle Selling
Price
15.00
16.25
60.00
2.40
3.13
=F39+F39*G39
7,440 =SUMPRODUCT(C35:C39,D35:D39)
9,790 =SUMPRODUCT(C35:C39,E35:E39,H35:H39)
2,350 =E44-E43
AVERAGE
Page 148 of 158
Mon
30
0
Tue
31
0
Mon
Temp 30
Rain
0
Tue
AVERAGE
Temp
Rain
Temp
Rain
Mon
Tue
Wed Thu Fri Sat Sun Average
30
No
32 29 26 28 27 28.6667 =AVERAGE(D12:J12)
0 Reading
0
4 6 3
1 2.33333 =AVERAGE(D13:J13)
What Does It Do ?
This function calculates the average from a list of numbers.
If the cell is blank or contains text, the cell will not be used in the average calculation.
If the cell contains zero 0, the cell will be included in the average calculation.
Syntax
=AVERAGE(Range1,Range2,Range3... through to Range30)
Formatting
No special formatting is needed.
Note
To calculate the average of cells which contain text or blanks use =SUM() to get the total and
then divide by the count of the entries using =COUNTA().
Temp
Rain
Mon
Tue
Wed Thu Fri Sat Sun Average
30
No
32 29 26 28 27 24.5714 =SUM(D31:J31)/COUNTA(D31:J31)
0 Reading
0
4 6 3
1
2
=SUM(D32:J32)/COUNTA(D32:J32)
Mon
Temp 30
Rain
0
Further Usage
Tue
COUNT
Page 149 of 158
D
COUNT
Entries To Be Counted
10
20
30
10
0
30
10
-20
30
10
1-Jan-88
30
10
21:30
30
10
0.918381
30
10
30
10
Hello
30
10
#DIV/0!
30
Count
3
3
3
3
3
3
2
2
2
=COUNT(C4:E4)
=COUNT(C5:E5)
=COUNT(C6:E6)
=COUNT(C7:E7)
=COUNT(C8:E8)
=COUNT(C9:E9)
=COUNT(C10:E10)
=COUNT(C11:E11)
=COUNT(C12:E12)
What Does It Do ?
This function counts the number of numeric entries in a list.
It will ignore blanks, text and errors.
Syntax
=COUNT(Range1,Range2,Range3... through to Range30)
Formatting
No special formatting is needed.
Example
The following table was used by a builders merchant to calculate the number of sales
for various products in each month.
Item
Jan
Feb
Bricks
1,000
Wood
5,000
Glass
2,000
1,000
Metal
1,000
Count
3
2
=COUNT(D29:D32)
Mar
COUNTA
Entries To Be Counted
10
20
30
10
0
30
10
-20
30
10
1-Jan-88
30
10
21:30
30
10
0.527328
30
10
30
10
Hello
30
10
#DIV/0!
30
Count
3
3
3
3
3
3
2
3
3
=COUNTA(C4:E4)
=COUNTA(C5:E5)
=COUNTA(C6:E6)
=COUNTA(C7:E7)
=COUNTA(C8:E8)
=COUNTA(C9:E9)
=COUNTA(C10:E10)
=COUNTA(C11:E11)
=COUNTA(C12:E12)
What Does It Do ?
This function counts the number of numeric or text entries in a list.
It will ignore blanks.
Syntax
=COUNTA(Range1,Range2,Range3... through to Range30)
Formatting
No special formatting is needed.
Example
The following table was used by a school to keep track of the examinations taken by each pupil.
Each exam passed was graded as 1, 2 or 3.
A failure was entered as Fail.
The school needed to known how many pupils sat each exam.
The school also needed to know how many exams were taken by each pupil.
The =COUNTA() function has been used because of its ability to count text and numeric entries.
34
35
36
37
38
39
40
41
42
43
44
COUNTA
Page 150 of 158
Maths
Alan
Bob
Carol
David
Elaine
Fail
2
Fail
1
English
1
1
3
Art
History
1
3
1
Fail
2
1
Fail
Exams Taken
By Each Pupil
2
3
3
2
4
=COUNTA(D39:G39)
ROUND
Page 151 of 158
ROUND
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Number
1.47589
1.47589
1.47589
13643.47589
13643.47589
13643.47589
Places To Rounded
Round
Number
0
1 =ROUND(C4,D4)
1
1.5 =ROUND(C5,D5)
2
1.48 =ROUND(C6,D6)
-1
13640 =ROUND(C7,D7)
-2
13600 =ROUND(C8,D8)
-3
14000 =ROUND(C9,D9)
What Does It Do ?
This function rounds a number to a specified amount od decimal places.
If 0 is used the number is rounded to the nearest whole number.
If a negative amount of rounding is used the figures to the left of the decimal point are rounded.
Syntax
=ROUND(NumberToRound,DecimalPlacesToUse)
Formatting
No special formatting is needed.
ROUNDDOWN
Page 152 of 158
D
ROUNDDOWN
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Number
1.47589
1.47589
1.47589
13643.48
13643.48
13643.48
Places To Rounded
Round
Down
0
1 =ROUNDDOWN(C4,D4)
1
1.4 =ROUNDDOWN(C5,D5)
2
1.47 =ROUNDDOWN(C6,D6)
-1
13640 =ROUNDDOWN(C7,D7)
-2
13600 =ROUNDDOWN(C8,D8)
-3
13000 =ROUNDDOWN(C9,D9)
What Does It Do ?
This function rounds a number down to a specified amount of decimal places.
If 0 is used the number is rounded down to the nearest whole number.
If a negative amount of rounding is used the figures to the left of the decimal point are rounded.
Syntax
=ROUNDDOWN(NumberToRound,DecimalPlacesToUse)
Formatting
No special formatting is needed.
ROUNDUP
Page 153 of 158
D
ROUNDUP
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Number
1.47589
1.47589
1.47589
13643.48
13643.48
13643.48
Places To Rounded
Round
Up
0
2 =ROUNDUP(C4,D4)
1
1.5 =ROUNDUP(C5,D5)
2
1.48 =ROUNDUP(C6,D6)
-1
13650 =ROUNDUP(C7,D7)
-2
13700 =ROUNDUP(C8,D8)
-3
14000 =ROUNDUP(C9,D9)
What Does It Do ?
This function rounds a number up to a specified amount of decimal places.
If 0 is used the number is rounded up to the nearest whole number.
If a negative amount of rounding is used the figures to the left of the decimal point are rounded.
Syntax
=ROUNDUPNumberToRound,DecimalPlacesToUse)
Formatting
No special formatting is needed.
MODE
Page 154 of 158
Value1
20
Value2
50
Value3
10
Value4
10
Value5
40
Mode
10
=MODE(C4:G4)
40
20
40
10
40
40
=MODE(C6:G6)
10
20
10
10
20
20
99
99
20
20
10
99
20
10
10
10
20
10
=MODE(C8:G8)
=MODE(C9:G9)
=MODE(C10:G10)
10
20
30
40
50
MODE
#VALUE! =MODE(C12:G12)
What Does It Do ?
This function displays the most frequently occurring number in a group of numbers.
For it to work correctly there must be at least two numbers which are the same.
If all the values in the group are unique the function shows the error #N/A.
When there is more than one set of duplicates, the number closest to the beginning
of the group will be used. (Which is not really an accurate answer!)
Syntax
=MODE(Range1,Range2,Range3... through to Range30)
Formatting
No special formatting is needed.
Example
The following table shows garments sold in a clothes shop.
The shopkeeper wants to keep track of the most commonly sold size.
The =MODE() function has been used to calulate this.
Order
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
Garmet
Blouse
Skirt
Shirt
Blouse
Skirt
Dress
Shirt
Blouse
Dress
Shirt
Dress
Skirt
Skirt
Shirt
Dress
Shirt
Blouse
Blouse
Dress
Skirt
Size
10
10
8
10
12
8
10
10
8
10
12
12
10
10
8
10
10
8
10
8
10
=MODE(D33:D52)
Count of size 8 :
6
=COUNTIF(D33:D52,"8")
Count of size 10 :
11
=COUNTIF(D33:D52,"10")
Count of size 12 :
3
=COUNTIF(D33:D52,"12")
MODE
Page 155 of 158
D
Note
If the =AVERAGE() function had been used the answer would have been :
9.7
This figure is of no benefit to the shopkeeper as there are no garmets of this size!
PERMUT
Page 156 of 158
C
Pool Of Items
4
4
10
26
Items In A Group
2
3
4
6
Permutations
12
24
5040
165,765,600
PERMUT
Permutation
=PERMUT(C4,D4)
=PERMUT(C5,D5)
=PERMUT(C6,D6)
=PERMUT(C7,D7)
What Does It Do ?
This function calculates the maximum number of permutations given a fixed number of items.
The internal order is significant, so AB and BA will be considered as two possible permutations.
It could be used to calculate the possible number of 4 digit passwords from the digits 0 to 9.
Syntax
=PERMUT(PoolToPickFrom,ItemsInAGroup)
Formatting
No special formatting is needed.
Example
The following table was used to calculate the total number of 8 letter passwords which can
be created by using all 26 letters of the alphabet.
Letter In Alphabet
Password Size
Permutations
26
8
62,990,928,000
In the case of a two letter password made from the letter A, B, C and D, the following
twelve permutations would be possible.
ABCD
Password 1
Password 2
Password 3
Password 4
Password 5
Password 6
AB
AC
AD
BC
BD
CD
Password 7
Password 8
Password 9
Password 10
Password 11
Password 12
BA
CA
DA
CB
DB
DC
RANK
Page 157 of 158
Values
7
4
25
8
16
Ranking Position
High to Low
4
5
1
3
2
=RANK(C4,C4:C8)
=RANK(C5,C4:C8)
=RANK(C6,C4:C8)
=RANK(C7,C4:C8)
=RANK(C8,C4:C8)
Values
7
4
25
8
16
Ranking Position
Low to High
2
1
5
3
4
=RANK(C11,C11:C15,1)
=RANK(C12,C11:C15,1)
=RANK(C13,C11:C15,1)
=RANK(C14,C11:C15,1)
=RANK(C15,C11:C15,1)
Values
10
30
20
30
40
Ranking Position
High to Low
5
2
4
2
1
=RANK(C18,C18:C22)
=RANK(C19,C18:C22)
=RANK(C20,C18:C22)
=RANK(C21,C18:C22)
=RANK(C22,C18:C22)
RANK
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
What Does It Do ?
This function calculates the position of a value in a list relative to the other values in the list.
A typical usage would be to rank the times of athletes in a race to find the winner.
The ranking can be done on an ascending (low to high) or descending (high to low) basis.
If there are duplicate values in the list, they will be assigned the same rank. Subsequent ranks
would not follow on sequentially, but would take into account the fact that there were duplicates.
If the numbers 30, 20, 20 and 10 were ranked, 30 is ranked as 1, both 20's are ranked as 2, and
the 10 would be ranked as 4.
Value
30
20
20
10
Rank
1
2
2
4
=RANK(B34,B34:B37)
=RANK(B35,B34:B37)
=RANK(B36,B34:B37)
=RANK(B37,B34:B37)
Syntax
=RANK(NumberToRank,ListOfNumbers,RankOrder)
The RankOrder can be 0 zero or 1.
Using 0 will rank larger numbers at the top. (This is optional, leaving it out has the same effect).
Using 1 will rank small numbers at the top.
Formatting
No special formatting is needed.
RANK
Page 158 of 158
B
C
D
E
F
G
H
I
Example
The following table was used to record the times for athletes competing in a race.
The =RANK() function was then used to find their race positions based upon the finishing times.
Athlete
John
Alan
David
Brian
Sue
Alex
Time
1:30
1:45
1:02
1:36
1:27
1:03
Race Position
4
6
1
5
3
2
=RANK(C53,C53:C58,1)
=RANK(C54,C53:C58,1)
=RANK(C55,C53:C58,1)
=RANK(C56,C53:C58,1)
=RANK(C57,C53:C58,1)
=RANK(C58,C53:C58,1)