SUM
Horizontal
100 200 300 600
Vertical
100
200
300
600
Single Cells
100 300 600
200
Multiple Ranges
100 400
200 500
3000 600
4800
Functions
100 400
200 500
300 600
2100
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 0
600 =SUM(C48+C49+C50) Wrong!
600 =SUM(C48:C50) Correct
600 =C48+C49+C50 Correct
SUMIF
Item Date Cost
Brakes 1-Jan-17 80
Tyres 10-May-17 25
Brakes 1-Feb-17 80
Service 1-Mar-17 150
Service 5-Jan-17 300
Window 1-Jun-17 50
Tyres 1-Apr-17 200
Tyres 1-Mar-17 100
Clutch 1-May-17 250
Total cost of all Brakes bought. 160 Err:502
Total cost of all Tyres bought. 325
Total of items costing £100 or above. 1000
Total of item typed in following cell. service 450
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") This examines the values in E4:E12.
If the value is >=100 the value is added to the total.
Formatting
No special formatting is needed.
AVERAGE
Mon Tue Wed Thu Fri Sat Sun Average
Temp 30 31 32 29 26 28 27 29
Rain 0 0 0 4 6 3 1 2
Mon Tue Wed Thu Fri Sat Sun Average
Temp 30 32 29 26 28 27 29
Rain 0 0 4 6 3 1 2
Mon Tue Wed Thu Fri Sat Sun Average
Temp 30 no 32 29 26 28 27 29
Rain 0 Reading 0 4 6 3 1 2
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().
Mon Tue Wed Thu Fri Sat Sun Average
Temp 30 No 32 29 26 28 27 7
Rain 0 Reading 0 4 6 3 1
Mon Tue Wed Thu Fri Sat Sun Average
Temp 30 32 29 26 28 27
Rain 0 0 4 6 3 1
COUNT
Entries To Be Counted Count
10 Section C 30 2
10 0 30 3
10 -20 30 3
10 1-Jan-88 30 3
10 21:30 30 3
10 0.5295783 30 3
10 30 2
10 Hello 30 2
10 #DIV/0! 30 2
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.
COUNTA
Entries To Be Counted Counta
10 ) 30 3
10 0 30 3
10 -20 30 3
10 1-Jan-88 30 3
10 21:30 30 3
10 0.3786529 30 3
10 30 2
10 Hello 30 3
10 30 2
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.
COUNTIF
Cars model
Item Date Cost Lamborghini Aventador
Brakes 1-Jan-98 80 audi A8
Tyres 10-May-98 25 BMW I8
Brakes 1-Feb-98 80 Mercedes SLS AMG
Service 1-Mar-98 150 Porchse GTR911
Service 5-Jan-98 300 McLaren P1
Window 1-Jun-98 50 BMW 412
Tyres 1-Apr-98 200 volvo FMX
Tyres 1-Mar-98 100 ford DIO
Clutch 1-May-98 250
How many Brake Shoes Have been bought. 2 How many cars cost more than 2000000 ?
How many Tyres have been bought. 3 Item count BMW
How many items cost £100 or above. 5 Car is BMW costs more than 35000000
Type the name of the item to count. service 2
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.
Cost
8000000
5800000
34000000
5900000
8000000
3000000
67000000
2000000
1000000
rs cost more than 2000000 ? 8
2
osts more than 35000000 1
ROUND
Places To Rounded
Number Round Number
1.47589 0 1
1.47589 1 1.5
1.47589 2 1.48
13643.47589 -1 13640.00
13643.47589 -2 13600.00
13643.47589 -3 14000.00
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.
ROUNDUP
Places To Rounded
Number Round Up
1.47589 0 2
1.47589 1 1.5
1.47589 2 1.48
13643.48 -1 13650
13643.48 -2 13700
13643.48 -3 14000
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.
Inventory List Highlight items to reorder? No
Reorder
Fl Inventor Name Description Unit Price
Quantity in Inventory Reorder
Time in
Quantity in
Discontinued?
y ID Stock Value Level Reorder
Days
IN0001 Item 1 Desc 1 $51.00 25 $1,275.00 29 13 50
IN0002 Item 2 Desc 2 $93.00 132 $12,276.00 231 4 50
IN0003 Item 3 Desc 3 $57.00 151 $8,607.00 114 11 150
IN0004 Item 4 Desc 4 $19.00 186 $3,534.00 158 6 50
IN0005 Item 5 Desc 5 $75.00 62 $4,650.00 39 12 50
IN0006 Item 6 Desc 6 $11.00 5 $55.00 9 13 150
IN0007 Item 7 Desc 7 $56.00 58 $3,248.00 109 7 100 yes
IN0008 Item 8 Desc 8 $38.00 101 $3,838.00 162 3 100
IN0009 Item 9 Desc 9 $59.00 122 $7,198.00 82 3 150
IN0010 Item 10 Desc 10 $50.00 175 $8,750.00 283 8 150
IN0011 Item 11 Desc 11 $59.00 176 $10,384.00 229 1 100
IN0012 Item 12 Desc 12 $18.00 22 $396.00 36 12 50
IN0013 Item 13 Desc 13 $26.00 72 $1,872.00 102 9 100
IN0014 Item 14 Desc 14 $42.00 62 $2,604.00 83 2 100
IN0015 Item 15 Desc 15 $32.00 46 $1,472.00 23 15 50
IN0016 Item 16 Desc 16 $90.00 96 $8,640.00 180 3 50
IN0017 Item 17 Desc 17 $97.00 57 $5,529.00 98 12 50 Yes
IN0018 Item 18 Desc 18 $12.00 6 $72.00 7 13 50
IN0019 Item 19 Desc 19 $82.00 143 $11,726.00 164 12 150
IN0020 Item 20 Desc 20 $16.00 124 $1,984.00 113 14 50
IN0021 Item 21 Desc 21 $19.00 112 $2,128.00 75 11 50
IN0022 Item 22 Desc 22 $24.00 182 $4,368.00 132 15 150
IN0023 Item 23 Desc 23 $29.00 106 $3,074.00 142 1 150 Yes
IN0024 Item 24 Desc 24 $75.00 173 $12,975.00 127 9 100
IN0025 Item 25 Desc 25 $14.00 28 $392.00 21 8 50
Page 14 of 19
IF
Name Sales Target Result
Alan 1000 5000 FALSE
Bob 6000 5000 TRUE
Carol 2000 4000 FALSE
What Does It Do?
This function tests a condition.
If the condition is met it is considered to be TRUE.
If the condition is not met it is considered as FALSE.
Depending upon the result, one of two actions will be carried out.
Syntax
=IF(Condition,ActionIfTrue,ActionIfFalse)
The Condition is usually a test of two cells, such as A1=A2.
The ActionIfTrue and ActionIfFalse can be numbers, text or calculations.
Formatting
No special formatting is required.
Example 1
The following table shows the Sales figures and Targets for sales reps.
Each has their own target which they must reach.
The =IF() function is used to compare the Sales with the Target.
If the Sales are greater than or equal to the Target the result of Achieved is shown.
If the Sales do not reach the target the result of Not Achieved is shown.
Note that the text used in the =IF() function needs to be placed in double quotes "Achieved".
Name Sales Target Result
Alan 1000 5000 not Achieved
Bob 6000 5000 Achieved
Carol 2000 4000 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 Sales Target Commission
Alan 1000 5000 50
Bob 6000 5000 600
Carol 2000 4000 100
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.
Special Order
Product Offer Value Discount Total
Wood Yes £ 2,000 200 £ 1,800
Glass No £ 2,000 0 £ 2,000
Cement Yes £ 500 0 £ 500
Turf Yes £ 3,000 300 £ 2,700
Method 1
names marks class
a 87 distinction
b 75 first class
c 62 second class
d 55 second class
e 27 fail
or calculations.
or sales reps.
sult of Achieved is shown.
eved is shown.
placed in double quotes "Achieved".
ommission is 10% of Sales.
cial Offer, when the Order Value
he product is on offer and that
Order Date Region Rep Item Unit Price Total
1/24/2013 East Jones Pencil 95 1.99 189.05
1/24/2013 Central Kivell Binder 50 19.99 999.5
1/24/2013 Central Jardine Pencil 36 4.99 179.64
1/24/2013 Central Gill Pen 27 19.99 539.73
1/24/2013 West Sorvino Pencil 56 2.99 167.44
1/24/2013 East Jones Binder 60 4.99 299.4
1/24/2013 Central Andrews Pencil 75 1.99 149.25
1/24/2013 Central Jardine Pencil 90 4.99 449.1
Thompso
1/24/2013 West n Pencil 32 1.99 63.68
1/24/2013 East Jones Binder 60 8.99 539.4