Download as pdf or txt
Download as pdf or txt
You are on page 1of 331

Count and Sum Functions

Count I CountIf I Countlfs I Sum I Sumif I Sumlfs

The most used functions in Excel are the functions that count and sum You can count and sum based on one
cnteraa or multJpIe crrterJa.

Count
To count the number of cells that contain numbers, use the COUNT function.


.7

10 C
" 0
:COUNT(Al:A5)

E F G H
1
2 1
3 7
4 20
5 3
6
7 5
j
Countif
To count cells based on one crrteria (for example, higher than 9), use the followlrlQ COUNTIF function

.7 =COUNTIF(Al:A5, ~>9")

1
101 C 0 E F G H

2 1
3 7
4 20
5 3
6
7 I 21

I
Countifs
To count cells based on multiple crrteria (for example, green aOO higher than 9), use the following COUNTIFS

fuoc"""

.7 t- =COUNTlFS(Al:A5, ~green" ,81:85, ">9")

1 ,.d
10
C o E F G H

2 green 1
3 'ed 7
4 reen 20
5 ,ed 3
6

;I 11

Sum
To sum a range of cells, use the SUM fuoctJon.

.7

10 8 C
" 0
=SUMjAl:A5)

E F G H
1

,2 1
7
4
5
20
,

7 1 41 1
8

Sumi!
To Sl.Wll eels based on one c",ern (for example, hIghef than 9), use the folawng SUMIF tt..'ctJOn (two gtmenls)


87

A 8 C
" 0
-:SUMIF(81:65, ">i~)

E F G H
1 10

,
2 1
7
4
5 ,
201


7 ",I
8

To s...n eels based on one cntena (lor ex~ green), use the IoIcrNJng SUMlF fooctJon (three argo.nenls. last
ar~ IS the rcroge 10 5l,1"li)
87 ~ =SUMIF(A l :A5,"green~,Bl:85)

A 8 C o E F G H
1 eed 10

,2 ree n
eed
11
7

,
4 ree n
,ed ,
20

~I
21 1

Sumifs
To sum cells based on muttlple crrteria (for example, blue and green), use the following SUMIFS fuoctJon (first
argument IS the range to sum)

C7 {z =SUMI FS( Cl:C5,Al:A5, "blue~ ,61:85, ~green"J

A 8 C 0 E F G H
1 blue 'ed 10

,
2 vello w
blue
green
,ed
1
7

,
4 blue
yellow ,ed
reen
,
20

~I
20 1

General note. In a similar way, you can use the AVERAGEIF and AVERAGEIFS function to average cells based on
one or multJpIe crrteria_
Count Text Occurrences
ThIS example teaches you how to count the number of occurrences of text in a rarge

For example, to count the number of cells that contain exactly star


A'

A B C
" 0
=COUNTI F( A l :A7, "star")

E F G H
1 star
2 moon
3 stars
4 ,
5 star
6 star
7 star12

,
B
21

IO j
2. For example, to count the number of cells that contain exactly star + 1 character A question marll (7) matches
exactly one character

A' =COUNTI F(A l :A 7, ~star ?ft)

A B C 0 E F G H
1 star

,
2 moon

4
stars
,
5 star
6 star
7 star12
B

'po
10

3 For example, to count the number of cells that contain exactly star + a series of zero or more characters An
asterisk (') matches a series of zero or more characters

A' =COUNTI F( A l :A 7, ~starft)

A B C 0 E F G H I
1 star

,2 moon

4
stars
,
5 star
6 star
7 star12

,
8
~!
10 1
4 For example, to count the number of cells that contain star In any way No matter what is before or after star, thIS
function firds all the cells that contain star in any way

A9 =COUNTI F( Al:A 7, "star"-j

A B C 0 E F G H
1 star

,
2 moon
stars
,I
,
4

, star
star
7 star12
8

'po
10

5_ For ex ample, to count the number of cells that contain text

A9 f. :COUNTIF(Al :A7, ..... J

A B C 0 E F G H
1 star
2 moon
3 stars
,
,
4

, star
star
7 star12
8
I _--,'I
' t-
10 1
Count Logical Values
learn how to count the number of cells that cootain logICal values (TRUE and FALSE ) in Excel.

For example. to count the J)lJmbef of cells that contain TRUE

A9 f. =COUNTIF(Al:A7, TRUE)

A 8 C 0 E F G H
1 5
2 TRUE
3
4 '""
FALSE
5 TRUE
6
7 moon
8
,I ,I

IOJ
2. For example, to count the number of cells that contain FALSE

A9 {z =COUNTI F( Al:A 7, FALSEj

A B C 0 E F G H
1 5

, '""
2 TRUE

4 FALSE
5 TRUE
6
7 moon

,
8
1

10 1

3. For ex ample, to count the number of cells that contain TRUE or FALSE

A9 {z =COUNTI F(Al:A 7, TRUE)+COUNT1F( Al:A 7,FALSE)

A B C 0 E F G H
1 5

, '""
2 TRUE

4 FALSE
5 TRUE
6
7 moon
8
,I ,I

10 1
Count BlankiNonblank Cells
ThIS example shows you how to count the number of blank and nonblank cells In Excel

1. The COUNTBLANK function counts the number of blank cells

A9 fz =COUNTBLANK(A l :A 7)

, C 0 , F G H
1 2
2
3 moon'""
4 TRUE

,
5
7

,7 5

, 1

10 1

2 The COUNTA functIOn counts the number of IlOIlbiank cells. COUNTA stands for count all

., fz =COUNTA(Al:A7)

, C 0 , F G H
1 2
2
3 moon'""
4 TRUE

,
5
7

,
7 5

,I ,I

10 1
Sumproduct
To calculate the sum of the products of corresponding numbers In one or more ranges , use Excers powerful
SUMPRODUCT fuoction

For example, the SUMPRODUCT fuoction below calculates the total amount spent

C7 =SUMPRODUCT(B2:8S,C2:C5)

A 8 C o E F G H
1 Product Quantity Price

,
2 Computer
Keyboard
2
4
1000
250
4 Mouse 4 100
5 Printer 2 50
6
7 Total 3500 1
8

Note the SUMPRODUCT function performs this cak:ulation_(2 ' 1000) + (4 250) + (4 ' 100) + (2' 50) = 3500

2 The raoges must have the same dimenstons or Ex cel will display the INALUE! error

COU NT1F x =-SUMPRO DUCT( 62: 65,C2:C4 ll


A B C o , , , F , G , H ,
1 Product Qu ant i!:t: Ipri ce

2 Compu ter 2 1000
3 Keybo ard 4 250
4 M ouse 4 100

5 Pr inter 21 50

6
7 Tota~ rIfVALUE! 1
8

3. The SUMPRODUCT function treats any entries that are not numeric as if they were zeros

C7 =-SUM PRO DUCT( 62: 65,C 2:(5)

A B C o , F G H
1 Product Quant ity Pri ce
2 Compu ter 2 1000
3 Keybo ard 4 hi
4 Mouse 4 t h ere
5 Print er 2 50
6
7 To ta l
8
Logical Functions
If Function I And FunctlOll I Or FunctJOll

Learn how to use Ex cel's logICal functIOns such as the IF, AND and OR functlOn_

If Function
The IF function checks whether a coodrtlOlllS met, and returns one value if TRU E and another value if FALS E

Select cell C2 and enter the followll"g function

(1 : IF(Al>10,"Correct", "Incorrect")

A B ( D E F G H
!
:I 12 31correct
The IF function returns Correct because the value in cell AI is higher than 10

And Function
The AND Function returns TRUE if all cond~ions are true and returns FALSE if any of the conditions are false

Select cell D2 and enter the following formula_


01

A B C
" =1 F( ANO(Al>10,Bl>5j, "Correct~, "Incorrect")

D E F G H
I
:J 12 3 Correct I Inco rrect

The AND function returns FALSE because the value in cell 82 is not higher than 5 As a resutt the IF function returns
Incorrect

Or Function
The OR function returns TRUE if any of the conditions are TRUE and returns FALSE if all condittons are false

Select cell E2 and enter the following formula

E1 :IF(OR(Al>10,Bl>5). "Correct". "Inco rrect~)

A B c D E F G H
12 3 Correct Inco rrect Icorrect J

The OR function returns TRUE because the value In cell AI IS higher than 10 As a resuH the IF function returns
CorrecL

General note. the AND and OR function can check up to 255 conditions
Nested If
The IF fuoction in Excel can be nested, when you have multJpIe conditions to meet The FALSE value is being
replaced by another IF functton to make a further test

Note If you have Excel1016, simply use the IFS function_

la_ If cell At equals I , the formula returns Bad_

., :IFt Al=l. "Sad~, IF(Al=2, "Good" ,IF( Al:3, "Excellent~, ~ No Va lid Score~)))

A c o E F G H
1
2
!
1b. If cell AI equals 2, the formula returns Good

81 =IF(Al=l , "Sad~,IF(A l=2, "Good" ,IF( Al=3, "Excellent", ~No Valid Score~)))

A 8 c o E F G H

:] !
Ie. If cell AI equals 3, the formula returns Excellent

81 =IF(Al=l,"Sad~,IF(A l=2, "Good",IF(Al=3, "Excellent", "No Va lid Score"))l

A 8 c o E F G H

ld If cell Al equals another value, the formula returns No ValKl Score

81 =IF(Al=1,"Sad~,IF(Al=2, "Good",IF(Al =3, "Excellent", "No Va lid Score"))l

~ I A 8
siNo Valid Score 1
c o E F G H

Here's another example

2a. If cell AI IS less or equal to 10, the formula returns 350.

81 =IF(A I <=10,3S(), IF(A I <=20, 700, IF(A I <=3(), 1400, 20(0)))

A 8 c o E F G H
1 ' LI_ -,'50",!
2
2b If cell AI IS greater than 10 and less or equal to 20, the formula returns 700

B1 c::1 F( Al <:10, 350,IF(A1<::20, 7OO,IF (AI <=30,1400, 2(00)))

A
7OO! C 0 E F G H

~I
121

., :IF(AI <::10, 350,IF(A1<::20, 7OO,IF( Al <::30,1400, 2(00)11

A
7001 C 0 E F G H

:I "I

2c If cel A 115 greater than 20 and less or ~ 10 30, the forrrUa returns '<$00

., "'IFIAI <=10,350,1 F( Al <=20. 700, IF(AI <::30,1400, 2000111

A
c o E F G H

:I
2d If cell A' IS greater than 30, the formula returns 2000

., ",I F( Al <:10,350, IF(A1 <::20, 7OO,IF(A1 <=30,1400, 2(00)11

A
00
S4I _ ",20"",!
c o E F G H

:I L

NOIe to slightly change the boundaries, you ITIQht want 10 use "<" nstead of "<="., yOU' 0'NI1 forrrula
Ifs
Use the IFS function in Excel 2016 when you have multiple conditions to meet The IFS function returns <I value
corresponding to the first TRUE conditton

Note if you don', have Excel 2016, you can nest the IF /uoction.

la_ If cell At equals " the IFS function returns Bad

81 :IFS(Al : 1, nead",Al=2, "Good~,Al :3, "Excellent",TRUE, "No Vatld score-,

A 8 c o E F G H

:1
'''81' '.d'---_!
lt1 If cell AI equals 2, the IFS function returns Good.

., :IFS{Al :l, "Bad",Al:2, "Good",Al :3, "Excellent~, TRUE, "No Va lid Score")

A c o E F G H

!
Ie. If ceU AI equals 3, the IFS functIOn returns Excellent

., =IFS(A l =l , ~Bad" ,Al=2, "Good" ,A l :3, "Excellent",TRUE, "No Valid score",

A c o E F G H

ld. If cell AI equals another value, the IFS fur.ction returns No Valid Score

., =IFS{Al =l, ~Bad" ,Al:2, "GoOd",Al :3, "Excellent",TRUE, "No Valid SCore")

A c o E F G H
siNo Va li d SCore 1
:J
Note instead of TRUE, you can also use 1=1 or something else that IS always TRUE

Here's aoother example

2a. If cell AI is less or equal to 10, the IFS function returns 350

., :IFS(A2<:10,350,A2<:-20, 7OO,A 2<:30, 1400,A2>30,2000,

A

61_--=0:.
L.
350 1
c o E F G H

:1
2b If cell AI IS greater than 10 and less or equal to 20, the IFS function returns 700

., =IFS( A2<=10,350,A2<=20, 7OO,A2<:30, 1400,A2>30, 2000)

1
A
121
7001 C 0 E F G H

., =IFS(A2<:l O,350,A2<=20, 7OO,A2<:30,l400,A2>30,2000)

A
C 0 E F G H

:I 201 700 1

2c. If cell AI is greater than 20 and less or equal to 30, the IFS function returns 1400

., =IFS( A2<=lO,350,A2<=20, 7OO,A2<=30, 1400,A2>30,2000)

1
A

27LI_ , , 400,, j
c o E F G H

2d_If cell AI IS greater than 30, the IFS functlOfl returns 2000

., =IFS(A2<:10,350,A2<=20,700,A2<=30,1400,A2>30,2000)

,.1
A c o E F G H
2(MlO I
L._ - " ' : :.

Note to slightly change the boundarIeS , you rrngh\ want to use ""," instead of""'=" in your own functlOfl_
Switch
This example teaches you how to use the SWITCH function in Excel 2016 instead of the IFS function

la_For example, the IFS function below finds the correct states

=IFS( RtGHT( A2. 21 =~ur ~Utah~. RIG HT(A2.2)="TX", "TeKaS" ,RIG HT(A2, 2) =" O H". ~OhiO~. TRUE, ~?"J

A , C D E F G H
1 Cod. State

I
2 85- UT IUtah
3 192-TX Texas
4 6-0H Ohio
5 74-'" Texas
6 18-UT Utah
7 23-0H Ohio

,
8 12S-TX
480-0H
Texas
Ohio
10 91-XR ?
11 37-TX Texas
12
Explanatton cell A2 contains the string 85-UT The RIGHT luncllon extracts the 2 rightmost characters from thIS
string (UT) As a resuH, the IFS function returns the correct state (Utah) lIthe 2 nghtmost characters are not equal
to UT, TX or OH, the IFS funcllon returns a question mark Instead 01 TRUE , you can also use 1=1 or something
else that IS always TRUE

lb The SWITCH functlOl1 below produces the exact same resuH but IS much easier to read

82 =SW1TCH( R1GHT(A2,2), ~ur, ~Utah" , "TX~ ,"T exas~, "OH", ~OhIO", ~?~)

A 8 C 0 , F G H
1 leod. State
2 85-UT IUtah I

3 192-TX Texa5
4 6-0H Ohio
5 74-TX Texa5
6 18-UT Utah
7 23-0H Ohio

,8 12S-TX
480-0H
Texa5
Ohio
10 91-XR ?
11 37-TX Texas
12

Explanallon if the first argument (RIGHT(A2,2) in this example) equals UT, the SWITCH function returns Utah II TX,
Texas. II OH, OhIO The last argument (a questlOl1 mark In thiS example) IS always the delauH value (if there's no
match)

2 Why not always use the SWITCH function in Excel? There are many ex amples where you cannot use the
SWITCH function instead of the IFS function
2 Why not always use the SWITCH functton In EJ(cel? 11lere are many e~amples where you cannot use the
SWITCH functton II'lStead of the IFS functton.

81 :1 FS( A2<:lO,350, A2<=20, 7OO,A2<=30,l400,A2> 30,2000)

o ,
:I A 8

_-"",SO!
6'LI
C F G H

EJcplana!lon because we use"<=" and">" symbols III this IFS funcbOn, we carJOOI use the SWITCH funcbOn.

4/5 Completed! Leam more about logical functions>


Back 10 Top SWIlch I Go to Next Chapter Cel References
Roll the Dice
Thts example teaches you how to slIllUlate the roll of two dice III EMCel If you are III a hurry, smply daNnioad the

Excel ~

Note the rostrucbons below do not teach you how to format the worksheet We assume that you know how to
ch!wlge IonI SIZes. font styles, nsert rows and cUm!;, add borders, change bockground colors , etc

I At the moment , each eel conlalns the letter I (as lillian) With a WIIlgIings Ion! style, these rs klok like dOO;

C3

A 8 C 0 E F G H J k L M N
1

,
4

5
~j
....

8 Roll the Oice


,
10
2 Enter the RANDBEnVEEN fimction.., cell C2

C2 ::RANDBfTWEEN( 1,6)

AB C DEFGH J K 1 M N
1

2 .1
3

4

,
6

8 Roll the Dice


,
10
3. Enter the formula shown below into the yellow cells If we roll 2, 3, 4, 5 or 6, these cells should contain a dot

e, =1 F( OR(C2=2,C2=3,C2=4,C2=5,C2=6), "t~, "~)

2 6
, ~l
4
5

6

7

8 Roll the Oice

,
10
4 Enter the formula shown below Into the red cells If we roll 4, 5 or 6, these cells should contain a dot

C5 =1 F( OR( C2=4,C2=5.C2=6). ~I". ~"J

A B
1

2 6

4

5

6

7

8 Roll the Dice

,
10
5 Enter the formula shown below Into the blue ce lls If we roll 6, these cells shoukl contain a dol

C4 =IF(C2=6, "I", ""I

A B c D E F G H J K l M N
1

2

l

4
5

8 Roll the Dice

,
1D
6. Enter the formula shown below Into the gray cell If we rollI , 3 or 5, thiS cell shoukl contain a dot

D4 =1 F( OR( C2=I ,C2=3,C2=5), ~I" , ~")

1
A
c o E F G H J K l M N

,
4

8 Roll the Dice

,
10

7 Copy the range C2; E5 and paste rt to the range G2:15_

8. Change the font color of cell C2 and cell G2 to green (so the numbers are not VISible)

9 Clic k the command button on the sheet (or press F9)

ResuH_
9 Click the command button on the sheet (or press F9)

ResuH_

ABC D E F G H J , l M N
1

4

5

6

7

, L Roll the Dice


_"J
10
Cell References
Relative Reference I Absolute Reference I MIXed Reference

Cell references In Excel are ~ery Important Understand the difference between relative, absolute and mIXed
reference, and you are on your w~ to success

Relative Reference
By defauR, Excel uses relative reference See the formula In cell D2 below Cell D2 refereoces (points to) cell 82 and
cell C2. 80th references are relatIVe

COUNT1F )( ./ f. =B2-C2

A
1 Product

Quantity . Price
C
IAmount
0 E F G H


2 bread 1

21

1.51=82 - C2

I

3 butter 1 1.2

,
4 cheese
h.m
l
3 1.8
2

6
Select cell 02, chck on the lower nght corner of cell 02 and drag rt down to cell 05

COUNTIF

A
c o E F G H
1 Product Quantity Price Amount
,
,
2 bread
buner
2

,
1
1.5
1.2 .. 2
4 cheese
5 hom
1 ,I
2
.
1.81=85'"(5
I


Cel 03 references eel B3 and eel C3 Gel 04 references eel 84 and eel C4 Cel 05 references eel B5 and eel
C5 In ()(her words each eel references lis two neqlbofs on the left

Absolute Reference
See the fOffTlk 11 eel E3 below

1 To create an absolute reference to cell H3. place a S symbol JJ) front of the colorm letter and rf10N nurrber of cell H3
(SHSJ) ,n the formula of cell E3

COUNTIF

1
A
c o E F G H

,
2 . length Icml !Width (em)
1

11

10
ton h Inch Width Inch
"S3'" SHS3 I
Conversion rate
0.3937008 I
I
4 5 10
5 4 8

7
2 10
2 Now we can quickly drag thIS formula to the other cells_

COUNTIF x :(6*SHS3

1
A
c o E f G H

2 l'" h <m Width (cm length linchl lWidth linch) Conve rsion rate
3 1 10 0.3937008 3.937008

! 0.3937008 !
4 5 10 1.968504 3.937008
5
6
4
21

10 1
1.5748032 3.1496064
0.78740161=C6*SHS3 I

7

The reference to cell H3 is fIXed (when we drag the fonnula down and across) As a resuR. the correct lengths and
wdths In inches are calculated

Mi xed Reference
Sometimes we need a comblnallon of relallve and absolute reference (mIXed reference)

I. See the formula In cell F2 below

COUNTIF X =82*(1-86)

I
A C o E f G H
1 !product Price Prices I Mo nth Ja n f, b

BO I
I
2 Jeans Jeans =82*(1-86)

3 Shirts I 30 Shirts
4
5 Month IJa n Feb Mar

6 Reduction l

20% 1 40% 80%
7

2 We want to copy thiS formula to the other cells quickly Drag cell F2 across one cell, and look at the: fonrMJla In cell
02

COUNT1F

A B
" '"
C
"0 E f o H
1 Product Price Prices/ Mo nth Jan Feb Mar
2 Jeans BOI 1 Jeans
3 Shirts

Shirts
5 '"
Month f,b
Jo"
IM"

7
Reduction 20%1 -
""
Do you see what happens? The referenr::e to the pfice should be a IW:!l refefenr::e to colufm a. SoIuIlon place a S
symbol III front 01 the: colufm letter 01 eel 82 ($82) III the fOfIDlAa of eel F2 In a smlar w<Soj when we drag eel F2
doNT!. the refefenr::e to the: reduclJon should be a fiM:l;I referenr::e to row 6 Solution place a S symbol III front of the
row ffiI/TIbef 01 eel 86 (856) III the fOfTTllJla of eel F2

Resun


COUN T1F

A B
" '"
C
"0
=$82-(1-8$6)

E F 0 H
jprice F,b
1 !product
2 Jea ns
1

BOI

Prices / Mo nth
Jeans ""
=$82 -(1-B$6)
M"

3 Shirts I '" Shirts


Mo nth
5

7

Reductlon l
lJan



'0% 1
-
F,b M"

""
Note we 000" place a S symbol WI fronl of the row ruroer of 82 (this w<Soj we aIow the feferenr::e to ch;vJge from 82
(Jeans) to 83 (Stwts) when we drag !he fomUa down). In a smlar w<Soj. we 0011" place a S symbol WI fren: of the

ccum letter 01 B6 (INs W<PI we aIow!he referenr::e 10 change from B6 (Jan) to C6 (Feb) iYld D6 (M<w) when we
drag the formula across)
3 Now we can qUICkly drag thIS formula to the other cells

x
COUNTIF

A B c
~

"
0
=583-, 1-0$6)

E F G H
1 Product
2 Jeans
Price
BO
Prices I Month
Jeans
'00 64
F,b
48
M"
16
3 !Shirts 1_--==
301 Shirts 24 181" S83-(1- 056)J

~ ~Month Jan Feb Mar
~'-1~R~'~du~ct~;~,-"F'-,-2"'
C"C:"=:~4=.
O% 'I '~~~....
~~c.;.l

The references to column B and row 6 are fIXed


Copy Exact Formula
When you copy a formula, Excel automatically adjusts the cell references for each new cell the formula is copied 10

For example, cell A3 below contains a formula which adds the value of cell A2 to the value of cell At


'3

C
" 0
:A1+A2

E F G H

,
:j
4

,I

4 I
When you copy this formula to cell 83 (select cell A3, press CTRL + c , select cell 83, press CTRL + v ), the formula
will automaltcally reference the values in column 8

f,. "'61+6~
OATE X
"
A
41
1
C 0 E F G H

:1
51

I
I
:1 91",61+62

If you don't want thIS but Instead want to copy the exact formula (without changWIQ the cell references), execute the
following easy steps

1 Click in the formula bar and select the formula

f,. l +A2: I
oAIT X
"
1
A
41
C 0 E F G H

2 I
51

3 ["'A1+A2 I
4j

2 Press CTRL + c , and press Enter

3 Select cell 83 and click in the formula bar again.

4 Press CTRL + v, and press Enter

Resu~:
ResuH_


8'

A 8 C
" 0
=Al+A2

E F G H
1
2 ,
4

,I ,I
!I

Both cell A3 and cell B3 contain the exact same formula now
3D-reference
A 3Dreference III Excel refers to the same cell or range on multiple worksheets FII'St. we'llook at the a/lematJve

On the Company sheet, select cel82 and type an equal sgn::

X /z
COUNTIF
'"
~

A B C 0 E F G H
1 Quarterl Quarter2 Quarter 3 Quarter4

,
2 Coffee
Te.
13 !
4 Milk
5
No,," .,,' So"", t.ompany
2. Go to the North sheet, select cell 82 arod type a +

3. Repeat step 2 for the Mjd arod South sheet

ResuK_


8'

1 ,
A 8 C 0
'" =North!B2+Mld!B2+South!B2

E F G H

, Coffee
Quarterl QUdrter2 QUdrter 3 Quarter4
$6.6241

3 T..
4 M ilk
5
North Mid 50"," Company e
4 This is qu~e a lot of woo Instead of doing this , use the following 3D -reference North-South!B2 as the argument
for the SUM function_

82 f,. -=SUM (North:South !82)

A 8 C 0 E F G H
1 Q uarter 1 Q uarter 2 Q u arter 3 Q u arter4

, T..
2 Co ffee $6.6241

4 M ilk
5
North Mid
""'" Company e
5. If you add worksheets between North and South, thIS worksheet IS automatically Included In the formula In cell B2_

82 f,. -=SUM( North:South !82)

A 8 C 0 E F G H
1 Q uarter 1 Q u arter 2 Q u arter 3 Q u arter4

, T..
2 Coffee $8,7521

4 M ilk
5
North North (2) Mid South Company e
External References
Create External Reference I Alert I Edrt links

An external reference In Excelts a reference to a cell or range of cells In another wor1o;book Below you can fwd the
wor1o;books of three divisions (North, Mid and South)

..!1 North Exed - 0 X


-
82 . Ix 2128
A 8 C 0 E F G H I
1 I Quarter 1 QUilrter 2 Quarter 3 Quarter 4
2 ICoffee
3 T..
I 52,1281 53.486
$4,939
$2,148
.904
$3,918
$9,400
55,921
4 M ilk $1,423 54. 234 $5,336 $1,535
5
I 5h ..., I

I~ I I El
Ell Mid Exc!1 - 0 X

.2 . Ix 2016


~
A C 0 E F G H I
1 Quarter ! Quarter2 Quarter3 Quarter4
2 Coffee I 52,0161

$3,546 $7,019 $8,761
3 T" $1,398 $5,209 56.738 $1,816
4 Mil k $8,528 $3,837 $9,605 $2,559
5
I Sheetl , 141 I l'l

Ell South Excel - 0 X

.2 Ix 2480

1 !
A
C 0
Quarter! Quarter2 Quarter3 Quarter4
E F G H I

~
2 ICOffee I 52,4801

$4,478 $7,156 $9,037

3~ ~.OO2
$9,787 $1,230 $6,529
: Mil k 58.674 $1,707 52.505 $7,144

Sheetl , I~ I I l'l
Create Externa l Reference
To create an external reference, execute the following steps

1 Open all woobooks

2. In the Company workbook , select cell 82 and type the equal sign =
Company - Ex(~ o x
COUNTlf x =

1 I
2 Coffee
A B c o
Quarter 1 Quarter 2 Quarter 3 Quarter 4
I~ !
E F G H I

;~ Sheetl , I
3 On the V'eN tab, in the Window group, click Swrtch Windows

~
LJ
El ~ ::5,,"
Hid"
rf'lViP 'S~byS~
[Synchronous Scrolling
N~ Arran9" fr~"
Window All Pan~ ~ D Unhid" 0i?J R~t Window Poslloon Windows ~
Window

4 Click North

~ 1 Company

,N,,"
1 Mid
4 South
5 10 the North workOOok , selec;t cellBL

t: A


X
'"
C 0
North m el

Ix

E
=[Nort h .xlSII] Sheet 1!SBS2

F G H
0 X



1 Quarter 1 Quarter2 Quarter] Quarter4

,2 Coffee
T
fQgji~
S4, ~3~
53,486
$2,148
55.'"
53,~18
S~ ,400
55,921

,
4 Milk $1,423 $4,234 55, 3]6 51, 535

Sheetl I HI )
STypea+

7 Repeat steps 3 to S for the IWd WOfkOOok

8 Repeat steps 3 to 5 for the South worldxXJk

9 Remove the S symbols III the formula of cellB2

Resu~

Company Ex,t'l o X

B2 =1 North.lIlsx] Shee tl !Bh{Mid. )(lslI] Sheetll B2+{South.)( Is)(] SheeU tB2 .,

ABC 0 E F G H
l tl---CC---Cac"-.'nC.-'~1-ao"-.Cnc.-,C2~a-"-."n-.,-,~ao"-.CnC.-,C4"--c---<--~--<--"c-----C"r11
2 Icoffee I $6,6241
3 Tea

,4 Milk

Sheetl
10 Copy the forfrIJa to the oIher eels
Alert
Close aU workbooks Change a number III the workbook of a d""slOIl Close all workbooks again Open the
Company workbook

A To update a.llnks tlK::k Enable Content

B To no! update the lriks , click the x _

III Company - bed


o~
SECURITY WARNING AutomatIC update of links hu been diwbled En.blt! Contmt [:} X

.2 f. Coffee

C ,
D
1 Quarterl Quarter2 Quarter] Quarter4

, r ..
2 Co ffee $6,624
$12,339
$11,510
$17,144
$20,079
$11,886
$27,198
$14,266
4 Mil k $18,625 $9. ns $17,446 $11,238
S
I Sh ...' f IG
Note ~ you see another alert, click Update or 000'\ Update

Edit links
On the Data tab, 111 the Connections group. click Ed~ links to launch the Edrt lxIks dialog box

fIr't.. ~ ConnWlOns
ilL" ~ p
Rdresh
All. Edit Lmb
Connt(tJons ~
1 If you dldr!'t update the links, you ca n still update the links here Select a workbook and cock Update values to
update the hnks to thIS worllbook Note how the Status changes to OK

Edit Links ? x
Souret Tw' Update Stalul
M.d I1n WorhlUPI:... Ol
North.lU Wo.l(shtd A Unknown
South.ldsl( Worl:shtet
Unknown Qptn SOU"t

I Ilul: Unl:
, -----.J . . -,,,-,.-,-,-,c,-,,-.-,-'
LOCllIon: C:\lut
Itfm:
Updllt: Autom.tic Manual

I i tlrt up Pl'ompt..,

2 If ~ou don't want to display the alert and update the links automatICally, Click Startup Prompt, sele<:t the third
optlOll, and cock OK

Edrt Lrn~'

SOU"t Tw' Updalt Status


Mld.xllX Wortlhed A 0' Chioge SOUltt.. ,
North . llin Wortshtet A Unknown
South,xlsl Worluhtd A Unknown Qptn SOUI(f

Iruk Link
, , thtck StltUI
loe"'on: C:\lfli
Ittm:
Updatt: Autom"ic Manual Startup Prompt ? x
Whtn this wOll:bool: is opfnfd, befi Uln Ilk whdhtl 01 not to
__--1 updatt lint.1 to othfrwortboot.I,
auto",";c linkl
2 If you don't want to dISplay the alert and update the links automatICally, ClICk Startup Prompt, select the third
opIlOI'I, and clICk OK

I~-----
I

r;::;: Typf Updllte Status yP4ale VlIlun

0'
, Works httl A ChiI!!!!f Source ..,
,
North.lds.
South.ldu
Workshfet
Wo,kshttt
Unknown
Unknown Qpen Source

, .!:.heck Sialul
locltlon: C:\l fft
lIem:
Up4alr. automati( Stllrtup Prompt I x
1 1t.rtuP Prompl .., I When this worli;b ook is opfned, ucel (In .sk whelher or nollo
updale linlts 10 olhu workbooks,
o Ltl users (hoose 10 display Ihe lIlert or not
o Qon't dis pla1 1he alert .nd don I update .utomatlc Ilnkl
~Iallhf .Ifrt and Up4alf Ilnlts l

o. i;J Clnul
Hyperlinks
EXISting File or Web Page I Place III This Document

To create a hyperlink in Excel, execute the following steps

On the Insert tab, in the Unks group, click Hyperlink

Slicer Timeline Hyperlmk


~ tJ
Text Header WordArt Signature ObjKI
B~ & footer line
Links T,.
The 'Insert Hyperlink' dialog box appears
Existing File or Web Page
To create a link to an exrsllng file or web page, execute the followll'lQ steps

t a_To create a link to an exrsllng Excel file, select a file (use the look In drop-down list, if necessary )

, x
Link 10: Itid 10 display. C:\ttsl\ (ounl_loglcal_valuts ,itls.

~ look in: lui El


,
~ili ing Fil e
orWtb Page ci~ 3d-reference " 8,!1.okmarl(. ..
CWll fnl
Fol dt, ~ co py-t:l!~ct-fo rmula
g ~ co unlblank.-nonblank.-cells
PiAu In This
DOCUmfl'l1 Arow!!d
Pages ~ coul'IlltxI-occurrenct5
Q3) dynamic-named-range
[l Itl nt5led-if
Crutt tifW Resent
Document FilfS Q5 parte-oplio ns
ereent -chan e
@ ,G.,ddr{u: C:\lt s!\eount.loglcal_valuts,llsl H
E-mail
,G.,ddrru
Cancrl
lb To create a link to a web page. type the Text to display. the Address. and click OK

Insert Hyperlink I X

Unk 10; lext 10 dilpt'Y- ~ ...... uCtl_nsy.com Scrttnn.ll....


l!l
f&Jrtll'lO File
~ook In: Itsl 3;j ~.

orWeO Pig,
("rlent
folder
co.. 3d-referenc,
copy-euctforrnul.
8.Qobn.rk. ..

CI C>" counl -bl.nk-nonbl.nk-celis


I'll" in This a'" count-Iogic.l-v.lues
Document .rowud
P.gu C"L
a"l..
counl -Iext-occurrences
dynamic-namtd-rang,
L
0
Cuale Uew
a>" nl!5ttd-if
Rt1ent
Documenl Fitts a"l.. paste-options
Iii., Ptlunt-chanQe
I:il
E-m. 11
AddrIn: hIlP://WWW.ucft.f'5Y.CO~ ~
"ddulS
o~
(.Inut

Resu~

AI www.excel-easy.com

A B , C , 0 E F G H
1 Iwww(5cel-eilsy.com 1
2
3
j http://www.exce~iSY.eOfTV' - Odt once to
(olow. Odt ifld hold to select thIS eel
4

NOIe If yeo want \0 change the text thaI appears when yeo haver over the Ink. click ScreenTIp
Place in Th is Document
To create a link to a place In thIS document, execute the following steps

1 Click 'Place in This Documenf under link to

2 Type the Text to display, the cell reference, and click OK.

Edit Hype:rtink I X

Link to: Ie:ld to disPlay. ]Go to (~ II 0 9 S(re~nn2 ..

[J!I Type the c!lIrdefence:


E!ist lng file
Of Web P~gt "
Of select a pllI~~ in this document:

g
P\f.{e In This
jC
f:lmriir e

Document Ddlne:d Names

U
Create Hew
Document

81
E-mail
B~mo w ~ Unk

Addrus
I 0. l)J C~nul

ResuH:
ResuH_

0'

A B c o , F G H
1 www.exce!-easy.com
2 Gotijll09
3 Bookl - Sheetll09 - Ockonce to fOIoW'1
4 lOck and hold to select thIS eel .

L--_,j

Note Jfyou want to change the text that appears when you hover over the link, click ScreenTip_
Date & Time Functions
YeafMooth.Oay I DateFl.nCboo I CUlTeoi Date & Tme I Hoor.MlnuteSecood I TmeFlMlClJOn

To enter a cIiIte III Excel. lISe the or ex "-" characters To enter a tnle_ lISe the (colon) You can also eflIer a date
and a lime If! one eel

A1 6/23/2016

A B C o E
~ \6/ 23/2016 1 6:00 6/ 23/ 20166:00

NOIe Dales are 11 US Format Months first, Days se(:ond Ttvs type 01 format depends on yoor WIIldows regonal
settJOgS learn roore about Dale and Tme formats
Year, Month, Day
To get the year of a date, use the YEAR function

., :YEAR(Al)

A c o E

,1 6/ 23/2016,------,'"0",16,,,

Note use the MONTH and DAY function to get the month and day of a date

Date Function
1 To add a number of days to a date, use the following simple formula_

., "Al+5

A c o E

2 To add a number of years, months ardlor days, use the DATE fuoction

., =OATE(YEAR(Al)+4,MONTH(Al)+2,OAY(Al)+9)

,
9/1/20201
c o E F G H

Note. the DATE fuoctton accepts three arguments year month and day Excel knows that 6 + 2 = B = August has
31 days and rolls over to the next month (23 August + 9 days = 1 September)
Current Date & Time
To get the current date and tnne, use the NOW funcbon

Al =NOW()

A B c o E
1 1 2/23/ 201710:43J
2 J
Note use the TODAY function to get the current date only Use NOW(}-TODAYO to get the current tune only (and
apply a Time format)

Hour, Minute , Second


To return the hour, use the HOUR function.


Bl

A B C
" =HOUR(A l )

0 E
,I
:I 6:45:171

Note. use the MINUTE and SECOND functlOll to return the rrunute and second.

Time Function
To add a number of hours, rrunutes ardlor secoods, use the TIME function.


Bl

A B C
" "'TIME(HOUR(Alj+2,MINUTE(A l )+10,SECOND(Al)+70)

o E F G H

:I 6:45:171 8:56:271

Note Excel adds 2 hours, 10 + 1 = 11 minutes and 70 - 60 = 10 secoods
DateDif
To get the number of days, weeks or yea rs between two dates in Excel, use the DATEDIF function The DATEDIF
function has three arguments

Fill in"d" for the third argument to get the number of days between two dates

A4 f :DATEDIF(Al ,A2, ~d"l

A B C D E F
1 4/ 18/ 2009
2 6/ 23/2016
3
4 2623
5

Note =A2-Al produces the exact same resuR!

2. Fill In "m" for the third argument to get the number of months between two dates

A4 f. =DATEDtF{A l ,A2, ~m")

1 ~
A
4/ 18/ 2009
c D E F

~ i 6/ 23/ 2016

:p
3_ Fill In "y" for the third argument to get the number of years between two dates

A4 {. =DATEDIF(A l ,A2., "yO)

1
A
4/ 18/ 2009
C D E F

,
2 6/ 23/2016

4 7
5

4 Fill in"yl!' for the third argument to ignore years and get the number of days between two dates

A4 =DATEDIF{Al ,A2, ~yd")

1 ~
A
4/ 18/ 2009
c D E F

~ i 6/ 23/ 2016

41 66!
5 I
5 Fill In "md" for the third argument to Ignore months and get the number of days between two dates

A' I- =DA TEDlf!A1,A2, -md")

A C 0 , F
1 4/ 18/2009

,2 6/ 23/ 2016

, 1I ,I

A'

A
C 0 , F
1 4/ 18/2009

,
2 6/23/2016

:P
hnportam note the DATEDIF function returns the number of complete days, months or years ThIS may give
une.pected resutts when the day/month number of the second date IS lower than the day/month number of the first

date See the example below

A' I- =DA TEDI F(A1,A2, .y.)

A C 0 , F
1 4/ 18/ 2009

,
2 4/ 17/ 2016

, 1 .1

The drffefence IS 6 years Amost 7 yearsl Use the foloww'lg fClfl'lUa 10 fetwl 7 years
I roe Cllnerence IS ti years Almost f years l Use the t ollowlroQ tonnula 10 retum f years

A4 =YEAR!A2)- YEAR(A1)

A
c o , F
1 ~ 4/ 18/ 2009
: 1 4/ 17/ 2016

4I 7!
,I
Weekdays
Weekday Function I Networkdays functton I Workday function

learn how to get the day of the week of a date in Excel and how to get the number of weekdays/working days
between two dates

Weekday Function
1 The WE EKDAY function In Excel returns a number from 1 (Sunday) to 7 (Saturday) representing the day of the
week of a date Apparently, 1211812017 falls on a Monday

81 =WEEKOAY(A l )

A 8 c o E , G H
1 I12/ 18/ 2017IL __--"~I
,j
2 You can also use the TEXT function to display the day of the week

81 =TEXT(A l ,~dddd~)

A 8 C o E F G H
~ 1 12/lS/201~MOnday 1
3. Create a custom date format (dddd) to display the day of the week

Al 12/1S/2017

A 8 C o E F G H
1 1
\- ---",M",O"",d!!laVl
2 I
Networkdays Function
1 The NE1WORKDAYS functlOll returns the number ofweekdays (weekends excluded) between two dates

C1 =NETWORI(OA YS(Al, Bl)

A , B C 0 E F G H
~ 112/1S/ 2017 12/29/201~L_ _,,,,01

2_ If you supply a list of holidays, the NE1WORKDAYS function returns the number of workdays (weekends and
holidays excluded) between two dates

Cl ::.NETWORI(OAYS(Al,Bl,El;E2)

AB C 0 E F G H
1 12/1S/ 2017 12/29/ 201' L _ _28:. 12/25/2017

,
2 12/26/2017

The calendar below helps you understand the NE1WORKDAYS functlOll


The calendar below helps you understand the NElWORKDAYS function_

Oecembef 2011
SU "0 TV WE
'" " SA

,,
26 21 28 29 30
S , 7
,
2

to t I t2 n 15 16
n
"
@ 23
,,
, , 30,
" 2 S

3 Dates are stored as numbers In Excel and count the number of days since January 0, 1900 Instead of SUpplying
a list, supply an array constant of the numbers that represent these dates To achieve thIS, select El:E2 In the
formula and press F9

C1 :NETWORKOAYS(A1,B1,(43094;4309S})

A I B C o E F G H
~ 112/18/2017 12/29/201~,---_---,,8,J

Workday Function
The WORKDAY functlOll is (almost) the opposrte of the NElWORKDAYS function It returns the date before or after
a specified number ofweekdays (weekends excluded)

Cl :WORKOAY(A1,B1)

A B C o E F G H
1 12/18/2017 101 1/1/2018J
2

Note the WORKDAY funcllon returns the serial number of the date Apply a Date format to display the date

The calendar below helps you understand the WORKDAY funcllon


-,
Note the WORKDAY functJon returns the serial number of the date. Apply a Date format to display the date

The calendar below helps you understand the WORKDAY function

Oembef 2011
SU MO TV WE TH fR SA
,
"3 ", " ", " 9
5 T

" 18 @@
11 12 13
" Z3 15 16

" @@@@@ "


" CD ' ,
" 3 5

Again, d you supply a list of holidays, the WORKDAY function returns the date before or after a specified number of
woodays (weekends and holidays excluded).
Days until Birthday
To calculate the number of days until yoor btrthday In Excel, execute the following steps

I. Select a cell and enter your date of btrth

2. Select the cell next to rt and enter the TODAY fuoctJon to return today's date

8' =TODAY{)

A 8 C 0 E , G

,
1 Dilte of Birth Todil
4/ 21/ 1980 5/ 30/2017

3
3 The most diflicuH part in order to get the number of days until your birthday is to fwd your next birthday The
formula below does the trick

C2 =DA TE(YEAR( A2) +OA TED IF(A2,B2, "y")+I ,MONTH ( A2), DA Y(A2))

I A , B
1 Date of Birt h Tod ay
C
Next Blrthda
o E F G

~ J 4/ 21/ 1980 5/30/2017 4/ 21/2018.

Explanation: The DATE functlOll accepts three arguments year, month and day We used the DATEDIF function to
find the number of complete years ("vi between Date of Birth and Today DATEDIF(A2,B2,"y") equals 37 If 37
complete years have passed sJOCe your date of birth (in other words , you have already celebrated your 37st
birthday), your next birthday will be 37 + 1 = 38 years after your date of birth_

4 Next, we use the DATEDIF function to find the number of days ("d") between Today and Next Birthday

02 =DATEDIF(B2,C2, ~d"l

I A , B
1 Date of Birth Tod ay
C
Next Birthday Days
o
until Birthday
E F G

2 I 4/ 21/ 1980 5/30/2017 4/ 21/ 20181 3261

'J

4/9 Completed! Learn more about date & time functions>


Back to Top Days until Birthday I Go to Next Chapter- Text FunctlOflS
Time Sheet
This example teaches you how to create a Simple tnnesheet calculator In Excel Cells that contain formulas are
colored light yellow If you are in a huny, simply download the Excel file

1 To automatically calculate the next 4 days and dates when you enter a start date, use the formulas below

019

A
C 0 E F G H I I J , l
1

,
2 Start Date 111/21/ 20161

4 Time In TIme Out TIme In Time Out Hours


5 Monda 11 21/ 2016 8:00 12:30 13:00 16:30 8:00
6 ::TEXT(C6,"dddd") ~., 7:00 11:00 12:00 17:00 9:00
7 WednesO'ay u ,.23/2016 9:00 10:30 11 :30 17:00 7:00

,
8 Thursday
Friday
11/24/2016
11/25/2016
8:00
8:00
13:00
12:00
14:00
13:00
17:00
18:00
8:00
9:00
10
11
12 Total Hours 41:00:00
Regular Hours
"
14
40:00:00
Overtime Hours 1:00:00
15
2. Select the cells contalnll"og the tnnes

K5 =(F5-E5)+(15-H5)

A
c o E , G H J , l
1
2 Start Date 111/ 21/ 20161
3

,
4
Monday 11/ 21/ 2016
Time In Time Out
8:00 12:30
Time In Time Out
13:00 16:30
Hours
8,
6 Tue5day 11/ 22/2016 7:00 11:00 12:00 17:00 9:00
7 Wedne5day 11/ 23/ 2016 9:00 10:30 11:30 17:00 7:00

,8 Thur5day
Friday
11/ 24/ 2016
11/ 25/ 2016
8:00
8:00
13:00
12:00
14:00
13:00
17:00
18:00
8:00
.n. 9:00
10
11
12 Total Hour5 41:00:00
13 Regular Hour5 40:00:00
14 Overtime Hours 1:00:00
15

3. Right click , clic k Format Cells , and select the right Time format Use the circled format for cell K12, K13, K14

FormatCtll$ 1 x
f}iUi!ibEJ Alignment Font Border f iJI Protection

s;"tego ry.
Gener.1 S.mple
Number
CUJren cy
. 00
Attounting
Date

Percentage
Fraction
Scientific
".
Spe d .1
Custom

En li sh (U nited StaIn
TImt fo.malS dll pl~ dill and timl urlal numbul as date nlun. TImt formalS 11'111 btg ln with
an alltlilk r) 'llpond 10 (hangls In .tgio n,1 date and t,mt ultlngs thalalt Ipuilltd ' or tht
Optrallng s~ttm. Fo rmals without an IsltriSk arf not ,lItdtd b~ OptUt!ng lYlttm stttingl.

01( On(tl

4 To!ll.ltOlTlatJCaly cak:lJale the hooJs worked each day. the total hooJs and the OIIertme hooJs. use the IomUas

""""
019
, c [ , F ,, H ,J
, l
1

,
2 Start Date 111/ 21/20161

5 Monday 11/21/2016
Time In Time Out TIme In Time Out Hours
8:00 12:30 13:00 16:30 =(FSE5)+!ISHS)
6 Tuesday 11/22/2016 7:00 11:00 12:00 17:00 9:00

,,
7 Wednesday
Thursday
11/23/2016
11/24/2016
9:00
8:00
10:30
13:00
11:30
14:00
17:00
17:00
7:00
8:00
Frida 11/25/2016 8:00 12:00 13:00 18:00 9:00
10
11
12 Total
13

"1.5
Last Day of the Month
To get the date of the last day of the month In Excel, use the EOMONTH (End of Month) function

For example, get the date of the last day of the current month_

., ::OMONTH(Al ,O)

A c E F H
1 16/23/2016LI-""/3"O"
/ 2,, O, ,16! G

2j
Note the EOMONTH fuoction returns the serial number of the date Apply a Date format to display the date

2 For ex ample, get the date of the last day of the next month

., =EOMONTH(Al ,l )

c D E , G H
~ 16123120161 -,71"'col"/ ,,,Oloo6!
L

3. For example, get the date of the last day of the current month - 8 months = 6 8 = -2 = October (-2+12=10), 2015!

., =EOMONTH{Al ,-8)

C D E , G H

6/9 Completed! Learn more about date & time functions>


Back to Top last Day of the Month I Go to Next Chapter Text Fuocllons
Holidays
ThIS example teaches you how to get the date of a holiday for any year (2017, 2018, etc). If you are in a hurry.
simply download the Excel file

Be/ore you start the CHOO SE function returns a value from a Jist of values , based on a posrtlOll number For
example, =CHOOSE(3,"Car","Train","Boat","Plane") returns Boat The WEEKDAY function returns a number from 1
(Sunday) to 7 (Saturday) representing the day of the week of a date

1 ThIS IS what the spreadsheet looks like If you enter a year Into cell C2, Excel returns all the holidays for that year
Of course, New Years Day, Independence Day, Veteran's Day and Christmas Day are easy
1 This is what the spreadsheet looks like If you enter a year into cell C2, Excel returns all the holidays for that year
Of course, New Yea~s Day, Independence Day, Veteran's Day and Chnstmas Day are easy

C5 f,. =DATE(C2,1,1)

A B C D E
1

,2 Year 2020

4 Holiday Whe n Date


5 New Ye ar's Day January 1 I 1/1/ 2020 1

6 Martin lut her King Jr. Day The 3rd Monday In January 1/20/2020
7 Presiden t's OilY The 3rd Monday in February 2/17/2020

,
B Memorial Day
Independence Day
The last Monday in May
Ju ly4
5/25/2020
7/ 4/2020
1D labor Day The 1st Monday in September 9/7/2020
11 Columbus Day The 2nd Monday in October 10/12/2020
12 Veteran's Day November 11 11/11/2020
13 Thanksgiving Day The 4th Thursday in November 11/26/2020
14 Chris1mas Day December 25 12/25/ 2020
15

2. All other holidays can be described In a similar way the xth day In a month (except Memonal day whICh IS slightly
different). let's take a look at Thanksgiving Day If you understand ThanksgIVing Day, you understand all holidays
Thanksgiving is celebrated the 4th Thursday in November
2. All other holidays can be described In a similar way the xth day in a month (except Memorial day which IS slightly
different) Let's take a look at Thanksgiving Day If you understand ThanksgIVing Day, you understand all holidays

ThanksgIVing IS celebrated the 4th Thursday In November

Cl3 =DA TEl C2, 11,1)+21 +CHOOSE(WEEKDA VIDA TEl C2.11,1)).4, 3,2,1.0,6,5)

A B c o E
1
2 Year 2020
3
4 Holiday When Date
13 Thanksgiving Day The 4th Thursday in November rlt"'''I!'26~/"2~O~20~!
15

The calendar below helps you understand ThanksgIVing Day 2020

November 2020
W,
SU '-40 TU
25 26 27
'" " SA

" " , "7 30

, , " " "


2

"
1 5
..
" " " 2S" 2027 " 19

" 2
"
22 21

" 30 1 5

ExplanatIOn DATE(C2,1' ,I) reduces to 111112020. WEEKDAY(DATE(C2,l1 ,l reduces to 1 (Sunday), Nov; the
formula reduces to 111112020 + 21 + CHOOSE(I,4,3,2,I,O,6,5) = 111112020 + 21 + 4 = 11I26l2020 We needed the 4
extra days because ~ takes 4 days until the first Thursday In November From there, ~ takes another 21 days (3
weeks) until the 4rd Thursday in November It doesn't matter on which day November 1 falls, the CHOOSE function
correctly adds the number of days until the first Thursday In November (notICe the pattern In the list of v alues), From

there, ~ always takes another 21 days until the 4rd Thursday in November Therefore, this formula works for every

y~'
3 Let's take a look at Martin luther Kwg Jr Day ThIS formula IS almost the same Marlin luther Kwg Jr Day IS
celebrated the 3rd Monday in January The fIrSt DATE function reduces to the first of January this IJme The base

->
posllJOri (0) 10 the list of values for the CHOOSE func:tIon IS located at the secood spot now (we are IookIOQ for a

(6 =DATE(C2.1,l}+14+<:HOOSE(WEEKDAY(DATE(C2.I.1,l,O,6,5,4,3,2)

1
A
( o E

,
2 Year 202<>

4 H o lid ay When Date


~ lMartin luther King Jr. Day The 3rd Monday in January I 1/20/2020!

The calendar below helps you understand Marlin luther KIOQ Jr Day 2020

J.,UMY lOlO
50 MO TU WE
'", " SA,
"5 "7 1

, " 11
30


"19
" 21" """"
""""
", 27 " "5 "7 30
1
Explaflabon DATE(C2.1 , 1) redlces to 1/112020 WEEKOAY(DATE(C2. t , 1)) fedlces to " (We<tJesdoly) Now the
fomUa re<kJces to 1/112020 .. 1" .. CHOOSE(" 1,0,6 5" 3,2) = 11112020 + 1" + 5 = 1l20l2020 We needed the 5
exlfll doIys because II. takes 5 doIys Ifii the first Monday 10 JiV1O<WY
Quarter
An easy formula that returns the quarter for a given date There's no buiH-in function In Excel that c a n do this

1 Enter the formula shown below

81 =ROUNDUP(MONTH(Al )/3.0)

A 8 c o E F G H
~ !S/ 29/2016L1_---'2J

Explanation ROUNDUP(x,O) always rounds x up to the nearest Integer The MONTH function returns the month

number of a date In thIS example, the formula reduces to =ROUNDUP(513,O), =ROUNDUP(I.666667,O), 2 May is

In Quarter 2
E~planatlOll ROUNDUP(~,O) always rounds ~ up to the nearest Integer The MONTH functlOll returns the month
number of a date In thIS e~ ample, the formula reduces to ::ROUNDUP(513,O), ::ROUNDUP(1 666667,0), 2 May IS
III Quaner 2

2 Let's see If this formJla works for all months

B1 f =Al/3

1
A

110 .333333j
C 0 E F G H

2 2 0.666667
3 3 1
4 4 1.333333
S S 1.666667
6 6 2
7 7 2.333333

,8
,
8 2.666667
3
10 10 3.333333
11 11 3.666667
12 12 4
13

E~planaIIOIl now ~'s not dlfficuH to see that the first three values (months) III colurm B are rounded up to 1 (Quarter
1), the next three values (months) in colurm B are rounded up to 2 (Quaner 2), etc

8/9 Completed! Learn more about date & time functions>


Back 10 Top QI.e'Ier I Go to Next Chapter: Text FIH:IIons
Day of the Year
An easy formu~ that returns the day of the year for a gIVen date There's no buin-in fuoction In Excel that can do this

1 Enter the formula shown below

81 =AI-OATE(YEAR(Al ), l , l j+1

A 8 c o E F G H
1 16/ 23/ 2016,,--1____ -"'"",!
:j
Explanatlon. Dates and tunes are stored as numbers In Excel and count the number of days since January 0, 1900_

June 23, 2016 is the same as 42544 The DATE function accepts three arguments year, month and day
DATE(YEAR(Al), 1,1) or 1-jan-2016 IS the s ame as 42370 Subtracting these numbers (42544 - 42370 = 174) and
adding 1 gIVes the day of the year
Text Functions
JOin Strings I left I RighI I Mid I Len I Find I Substrtute

Excel has many functions to offer when rt comes to manipulating text strings

Join Strings
To join strings, use the & operator

01

A B C 0 E F G H
Tim
Note to insert a space, use"

Left
To extract the leftmost characters from a string, use the LEFT fuoctJon

01 =LEFT(Al,4)

A , B c o , F G H
~ !examPle text lexam J

Right
To extract the rightmost characters from a string, use the RIGHT fuoctJon.

01 =RIGHT(Al,2)

A B c o , F G H
~ lexamp,e text Ixt J

Mid
To extract a substring, starling In the rruddle of a string, use the MID fuoctJon

01 =M1D(Al, 5, 3)

A , B c , F G H
~ !examPle text

Note started at position 5 (p) with length 3


Len
To get the length of a string, use the LEN function

01 =LEN(AIJ

A , B c E F G H
~ lexamp,e text

Note space (position 8) iocluded!

Find
To fwld the position of a substring In a string, use the FIND function_

01

A B c o E F G H
~ lexamp,e text ,I
L - _-',.

Note string "am" found at position 3

Substitute
To replace exISting text wJth new text In a string, use the SUBSTITUTE functIOn

01 =SUBSTITUTE(Al, "TIm". "John")

B c o E F G H
IHiJohn J
Separate Strings
ThIS ex ample teaches you how to separate strings in Excel

.2

A
1 !full Name
c
First Name La st Name
o E F G H

2 ISmith, Mike
3 Johnson, Matthew
I !
,
4 Williams, Janet
Brown, Sandra
6 Jones, Usa
7 Mi11ar, Peter
8

The problem we are dealing with IS that we need to tell Excel where we want to separate the string In case of Smith,
Mike the comma is at poslhon 6 while in case of Williams , Janet the comma IS at position 9
To get the first name, use the formula below

.2 f. =RIGHT(A2,LEN(A21-FJND(~," ,A21- 1)

1 full Name
A

first Name Last Name
( o E F G H

2 Smit h, Mike IMike 1


3 JohMon, Matthe w
4 Williams, Janet
5 Brown, Sandra
6 Jones, Usa
7 Millar, Peter
8

Explanatlon_to find the posllJon of the comma, use the FIND function (posllJon 6) To get the lergth of a stnng, use
the LEN function (tt characters) =RIGHT(A2.lEN (A2}- FIND (",",A2}-t) reduces to =RIGHT(A2,tt-6-t)
=RIGHT(A2,4) extracts the 4 rightmost characters and gIVes the desired resuH (Mike)

2 . To get the last name, use the following formula.

(2 I- =lEFT( A2, FIND(~ ", A21-1)

A 8 ( o E F G H
1 full Name first Name Last Name
2 Smit h, Mike Mike ISml th !
3 Johnson, Matthe w
4 Williams, Ja net
5 Brown, Sandra
6 Jones, Lisa
7 Millar, Peter
8

Explanation to fwd the position of the comma use the FIND funcllon (position 6) =lEFT(A2,FIND(",". A2}-t)
reduces to =lEFT(A2,6- t) =lEFT(A2,5) extracts the 5 leftmost characters and gIVes the desired resuR (Srrnth)
3. Select the range 82 C2 and drag rt down

.2 =RIG HT(A2,LEN(A2)- FI NO( ~, ",A2)- ! )

1 !full Name
A
c
first Name Last Name
o E F G H

2 Smit h, Mike Mike Smith


3 Jo hMon, Matt hew Matthew Johnson
4 Williams, Ja net Janet Williams
5 Brown, Sa ndra sandra Brown
6 Jones, Usa Usa Jones
7 Millar, Peter Peter Millar
+~
,
8
Number of Instances
This ex ample describes how to count the number of instances of text (or a number) In a cell.

Use the LEN fuocton to get the length of the strirog (25 characters , Including spaces)

C1 ::tEN(Al )

A , D E F G
1 dog, cat, dog dog cat dog dog
2

2 The SUBSTITUTE fuoction replaces exiSting text with new text in a stnng LEN(SUBSTITUTE(Al ,81 ,- equals
13 (the length of the string without the words dog) If we subtract thIS number from 25, we get the length of the dog
Instances (25-13= 12)
2. The SUBSTITUTE function replaces existing text with new text in a string lEN(SUBSTITUTE(Al ,Bl ,- equals
13 (the length of the string without the words dog) If we subtract thIS number from 25, we get the length of the dog
Instances (25--13= 12).

C1 =( LEN(A I j-LEN(SUBSTITUTE( AI , Bl, Uj))

~
A
IdOg. cal, dog dog cat dog do,
c
121
D E F G

'----~,.

3 Dividing this number by the length of the word dog (3), gives us the dog instances (Im=4)

C1 =( LEN (A l j-lEN(SU8STITUTE(A l , 81, un )!LEN( 8 1J


A c D E F G
1 Idog. cal, dog dog cat dog dog 41
'-------',.
2 j
Number of Words
ThIS example describes how to count the number ofwords In a cell_

la_ The TRIM function returns a string with e:o:tra spaces , starting spaces and ending spaces removed_

81 {. =TRIM(Al}

A 8 C 0 E F G H
1 how are you? Ihow are you?!
2

1b. To get the length of the string wJth IlOfmal spaces , we combine the LEN and TRIM function

81 =lEN(TRIM(Al))

A 8 c o E F G H
how are you? LI_ _ _,,,,2,!
:1
lb_ To get the length of the string wJ\h r.ormal spaces , we comblJ)e the LEN and TRIM funclJon_

81 =4.EN(TR1M(Al })

A 8 c o E F G H
1 how are you? ll_ _ _ _,' ,2!
2

2a The SUBSTITUTE funclJon replaces exlsllng text wJ\h new text In a text string We use the SUBSTITUTE
function to get the string without spaces

81 =-SUBSTITUTE(A l , ., ""I

A 8 c o E F G H
how are you? Ihoware you? !
2b. To gel the length of the string wJ!houl spaces, we combine the LEN and SUBSTITUTE function_

81 {. =LEN(SUBST1TUTE(Al ." ",Un


A 8 C 0 E F G H
I
:I how are you? 101

3_ Now comes the simple trICk To get the number of words , we subtract the length of the string wllhout spaces (10)
from the length of the string wJ\h normal spaces (12) and add 1

81 =LENtTR1M( Al))-LENtSUBSTITUTE( Al," ", U))-n

A 8 c o E F G H

21 how are I 31
you? L -____~.
Text to Columns
To separate the contents of one Excel cell into separate columns , you can use the 'Convert Text to Columns
WIZard. For example, when you want to separate a list of full names into last and first names

1 Select the rarge with full names

l OR x I e Brady, Tom

A B c o E F G H
1 Bra dv. Tom
2 Manning. Peyton
3 Peterson, Adrian
4 lewis, Ray
5 Reed, Ed
6 Polamalu, Troy
7 Johnson, Andre
8 ReviS, Darrelle
9 Brees, Drew
10 Peppers, Julius O.
11
2 On the Dilla tab, in the Data Tools group, clic k Text to Columns

~'" ~ e.~
Text to~
FIHh RmIOYe Con$Olid~le R
Columns Fill Duplicates Vlrid~tlOn
D~la Tools

3 Choose DeWmed and click Nexl

Convtrt Teet 10 Columns WlZlrd - Step 1 of 3 7 x


The Tut Wiard has detemllned th.t JOu, GoI, Is Delimited,
11 this II (ofTect, thoole Next. or thoose the dall type thll belt duulbel J OUI dltl,
Origmal d~ta type
Choose the lite type th~t belt desuibel JOUI dala:
@!D.elimitedl (harl cWs IUCh IS comm,! or I,b s separate nch lield.
a Fixed width _ fields Ife aligned In columns With I pl cel betwun each ' ield,

Pfeviewof seleded dati:

r.di'. Te",
t:-nnin; . ".~en
.~.r.on. Adri.n

~Wi" ~y
d, Ed

... > c:;J finis h

4 Clear aI the check boxes lnler ~ excepC lor the Corrma and Space check bo~
Convert Tut 10 Column~ Wizard Slep 2 of 3 1 x
ThiS wnn Ids ~ou nt the de limiters your d~ta conlains. You can see how ~ou' text Is affected
in the prmew be low.

Delimiters
Drab
D Semicolo n E2I Treat consecvtlve delimiters as one
E21-'omma
E21~
Text Jjuolifier. I El
o Qtller.

.ann1:111" ~ ~:~C:l

..,
.~.r.c:l

~"h
F rian
,"

Canul II flnl5~

Note This example has commas and spaces as delimrters. You may have other de~mrters rn your data_ Experiment
by checklllg and unchecklllg the different check boxes You get a live prevrew of how your data will be separated

ResuH_
Note ThIS e~ample has COlT"fTlilS and spaces as dellmrters You may have other delimiters In your data E~ pemnent
by checking and unchecklng the different chec k bo~es You get a live prevIeW of hoW your data Will be separated

RM'"

Al f. Brady

A B C 0 E F G H
1 Brady Tom

, .........
2 Manni". Peyton
Adrian
4
....,
, lew" R. y

6 .......,. Ed
Troy

.....
7 Johnson

, .....
8
Andre
Darrelle

10 .......
11 1
Dre w
Julius
Lower/Upper Case
This example teaches you how to convert a text stnng to lower, upper or proper case In Excel

Use the LOWER functlon to convert all letters In a text string to lowercase

.,

A
'" :lOWER1Al )

C 0 , F
I
1 Hi THERE, how ilre You? hi there, how are you?

I
2

2. Use the UPPER function to convert all letters in a text string to uppercase

., =UPPER(A l )

A c o , ,
~ JHi THERE, how are You? IHITHERE, HOW ARE YOU? J

3 Use the PROPER function to convert a text string to proper case That is , the first letter in each word in
upperca se, arod a ll other letters In lowerca se

., :PROPER(Al )

A c o , F
~ !HI THERE,how are You? IHi There, HOWAreYOu? J
Remove Unwanted Characters
The TRIM function returns a string with extra spaces , startJrlQ spaces and ending spaces removed The CLEAN
functIOn removes noopnntabie characters from a string

1 For example, cell At below contains the string" Excel Easy"

81 =TRIM(Al)

A 8 c o E F G H
1 Excel Easy Excel Easy
2

Note the TRIM function returns the string ~Excel Easy'


2. FOf example, cell At below contalllS a nonpnntable character

81 =ClEAN(Al)

A 8 c o E F G H
~ JIJEXCe l Easy IExce l Easy 1

Note the CLEAN funcllon removes this nonpnntable character Text Imported from other applicallons may contain
nonpnntabie characters

7/11 Completed! Learn more about text functions>


Back to Top Remove Unwanted Characters I Go to Next Chapter: Lookup 8. Reference FunctlOOS
Compare Text
ThIS example shows two ways to compare text in Excel Ore is case-sensrtive aOO one is case-lnsensJlJve

Use the EXACT function (case-sensrtrve)


C1

A
'"
B
=EXACT(A l ,B l )

C 0 E F G
1 Pie Chart Pie chart FALSE I

2 Ga ntt Chart Gantt Chart TRUE
3 Pareto Chart Parto Chart FALSE
4 Thermometer Chart Thermometer Chart TRUE
5 Trend line Trendline TRUE
6 Sparklines Sparklines TRUE
7

2 Use the formula =A 1=81 (case-insensitive).


'"
C1 :Al=81

A B C 0 E F G
1 Ipie Chart Pie chart TRUE I

2 Gantt Chart Gantt Chart TRUE
3 Pareto Chart Parto Chart FALSE
4 Thermometer Chart Thermometer Chart TRUE
5 Trend line Trendline TRUE
6 Sparklines Sparklines TRUE
7
Find vs Search
The FIND fuoction and the SEARCH function are very similar to each other This example shows the difference

To find the position of a substring In a string. use the FIND function_FIND is case-sensitive

., :FIND("eKce l ~,A l 1

A
c o E F G H

,
1 M icroso ft Excel 2016 INALUE!

2 To find the pos~ion of a substring In a string, use the SEARCH function SEARCH is case-insensitive

., :SEARCH( "excel~ ,A 1)

A
~ lMicrosott Exce l 2016 L I_ _
,,,lJ c o E F G H

Note string "excer found at posJhon II. Even though ~'s actually the string "Exeer
2 To find the posltlon of a substring In a string, use the SEARCH functlOl'l SEARCH IS caselnsens~lVe

81 /z =SEARCH(" excel" ,A 1) [
A 8 C 0 E F G H
1 Microsoft Excel 2016 1 111
2

NOIe stmg "elICer' found at poslbon 11 Even though Il's actualy the stmg "'EJccer' F
3 The SEARCH Iun:::IIon IS more versatje You can use WJkIcard characters when you use this function
I
81 /z =SEARCH("soft"2016" ,Al)

A 8 C 0 E F G H
~ IMlcroSOft Excel 2016 1 ,I

81 /z =SEA RCH("soft2016",A1)

A 8 C 0 E F G H
1 Microsoft Word 2016 1 ,I
2

N~. A ques1lOll mark (7) matches exactly one character An astensk C') matches a senes of zero or more
characters

4 One other nteresung pont to menllon about the FiND and the SEARCH funcllon IS that they have a 3rd oplIonaI
argunent You can use this argunent to indICate the poslbOrl, counung from the lett, at which you want to start
searctwJg

B1 =FINO("o",A1)

A 8 c o E F G H
1 -, Microsoft Excel 2016 LI_ _-,5l
2
Note A question marll (7) matches exactly one character An asterisk (') matches a series of zero or more
characters

4 One other Interesting point to menllorl about the FIND and the SEARCH functlDn IS that they have a 3rd opborlal
argument You can use this argument to indicate the position, counllng from the left, at which you want to start
searching

., f. =FIND(~o",A l l

~ lMicrosott
A
Excel 2016 I
,I
C 0 E F G H

Note. string "0" found at posrtlDn 5

., f. :FIND("o",Al,6)

~ lMiCTosoh
A
Excel 2016 I
71
C 0 E F G H

Note siring "0" found at posllton 7 (started searching at posllton 6)


Substitute vs Replace
ThIS example shows the difference between the SUBSTITUTE fUllCtlOll and the REPLACE functIOn

la If you know the text to be replaced, use the SUBSTfTUTE fuoction_

81 -:SUBSTITUTE(A l :201r, "2016~1

A 8 c o E F
1 Excel 2013 a nd Word 2013 IExce12016and Word 2016 j
2

lb. The SUBSTITUTE function has a 4th optional ingumenl. You can use this argument to Indicate whICh
occurrence VOU want to substItute
lb. The SUBSTITUTE function has a 4th optional argument You can use this argument to indicate which
occurrence you want to subslIlute

., =-SUBSTITUTE(A1, "2013". "2016-,2 )

A ( o E F
~ jExcel2013 a nd Word 2013 IEICce I2013 and Wo rd 2016 j

2. If you know the posmon of the text to be replaced, use the REPLACE functIOn.

., =REPLACE(A l , l ,3, "C)

A
1 Ql)(56() 1C56()
I
( 0 E F G H

2 LHR214 (214
3 EBM905 (905
4 KPN1l7 C117
5 WXA450 C450
6

Note started at posmon I with length 3


Concatenate Strings
ThIS example Illustrates four different ways to corx:<ltenate (join) strings In Excel

Simply use the & operatOf to JOIn strlllgs

E2 :A2 & ft" &82& ft "&C2& ft" &02

AB C 0 E F G H
1 h itle ' First Name ' Middle Naml! ' Last Name Full Name
~ jor. Tom F. Brady lor.Tom F. Brady 1
Note to insert a space, use
2 The CONCATENATE function prodoces the exact same resuR.

E2 =CONCATENATE(A2," ", B2," ",C2," ",02)

A . C o E F G H
1 ITitle ' First Name Middle Name Last Name Full Name
2 lor.
1 j
Tom F. Brady l or. Tom F. Brady
!
3<1_ The CONCAT function In Excel 2016 prodoces the exact same resuR_

E2 ::CONCAT(A2," ",B2:" ,C2," ",02}

I A I B I C I D E F G H
1 TItle First Name Middle Name Last Name Full Name
2 Dr. Tom F. Brady l or, Tom F. Brady 1
1

3b. The CONCAT funcllon can also JOin a range of stm19s If you don't need a delimrter (space, COOVllil, dash. etc_)
this can be useful

Fl ::CONCAT(A1:E1}

1
C
415
o
648
E
57031L.
F

_--,,===e,.
+14156485703 1
G H

4a_ The CONCAT function cannot ignore empty cells Take a look at all the extra spaces In column E below d you
drag the funcllon In cell E2 down to cell El1_
4a The CONCAT fuoction cannot ignore empty cells Take a look at all the extra spaces In column E below if you
drag the fuoctJon In cell E2 down to cell E".

=CONCAT(A2: ~,B2,~ ~,C2: ~,0 2}


"
l A, B , C , 0 E F G H
1 Title First NCime Middle Name i.CIst NCime Full NCime
I
,2lo<, Tom F. Brady I Dr.TomF.Brady

, Peyton
AdriCin O.
Manning
Peterson
Peyton Manning
Adrian D. Peterson
5 M<. R.y Lewis Mr. RClY l ewis
6 Ed Reed Ed Reed
7 Troy E. PolamCilu Troy E. PolClmCllu

,8 Andre
DClrre lle
Johnson
Revis
Andre Johnson
Darrelle Revis
10 0,. Drew a. Brees Dr. Dre w Q. Bree s
11 Julius Peppers Julius Peppers
12
4b The beauty of the TEXTJOIN function in Excel 2016 is that rt can ignore empty cells (if the second argument is
set to TRUE)


"
=TEXTJOIN(~ ft,TRUE,A2:D2)
" ,
A B C 0 F G H
1 Title First Name Middl e Name last Name Full Nilme
IDr. To m F. Brady I
,2 0,. To m
Peyton
F. Brady
Manning Peyton Manning

,.
4 Adrian O. Peterson Adri an D. Peterson
5 M, R.y Lewis Mr . Ray Lewis
6 Reed Ed Reed
7 Troy ,. Polamalu Troy E. Polamillu

,
8 Andre
Darrelle
Johnson
Rev is
Andre Johnson
Darrelle Revis
10 0 , . Drew a. Brees Dr. Drew Q. Brees
11 Julius Peppers Julius Peppers
12

Note the TEXT JOIN function JOIns a range of strings USing a delimrter (first argument)
Lookup & Reference Functions
VLookup I Hlookup I Match I Index I Choose

learn all about Excers lookup & reference functions such as the VLOOKUP, HLOOKUP, MATCH, INDEX and
CHOOSE fuocbon

VLookup
The VLOOKUP (VertK:allookup) function looks for a value In the leftmost column of a table, and then returns a value
In the same r{JoN from another column you specify

1 Insert the VLOOKUP fuoction shown below

.2 :VLOOKUP(A2,$E$4:$G$7,3,F ALSE)

A , C
E F G H
1 lID Product

,
2 104 Printer
10'
!
I. Brand Product
4 104 101 Dell Computer
5 101 102 logitech Keyboard
6 102 10' logitech Mouse
7 10' 104 HP Printer

,
S 101
104
10 101
11 102
12
Explanation the VLOOKUP functKlll looks for the ID (104) In the leftmost ColUIlVl of the range $E$4 $G$7 and
returns the value in the same rem from the third column (third argument is set to 3) The fourth argument is set to
FALSE to return an exact match or a #N/A error If not found.

2 Drag the VLOOKUP function In cell B2 down to cell Bll

.2 :VlOOKUP(A2.$E$4:$G$7,3.FALSE)

1 lID
A

Product
c , o , E , F , G , H ,
2 104 Printer
3 103 Mouse 10 Br.md Product
4 104 Printer 101 Dell Computer
5 101 Computer 102 logitech Keyboard
6 102 Keyboard 103 logitech Mouse
7 103 Mouse 104 HP Printer

,
8 101
104
Computer
Printer
10 101 Computer
11 102 Keyboard +
12 ~
13

Note when we drag the VLOOKUP funclKln down, the absolute reference ($E$4 $G$7) stays the same, while the
relallve reference (Al) changes to A3, A4, A5, etc.
HLookup
In a similar way, you can use the HlOOKUP (Horizontal lookup) function

82 ~ : HLOOKUP(A2,$E$4:$H$6,3,FALSE)

A 8 C o E F G H
1 10 Product

,.3 Mouse !
2 104 Printer
3
4
5 ,.,
104 Printer
Computer
10
Brand Dell
101 102
l ORitech La itech
103
HP
104

6 ,.2 Keyboard Product Computer Keyboard Mouse Printer


,.3 Mouse
7

,
8 ,., Computer

I. ,.,
104 Printer
Computer
11 ,.2 Keyboard
12

Match
The MATCH function returns the position of <I v alue in a given range

82 I- =MATC H(A2,E4:E7,O)

A 8 C o E F G H
1
2 Yellow 31
3

4 Green
5 Blue
6 Yellow
7 White
8

Explanation. Yellow found at position 3 in the range E4E7 The third argument is optional. Set this argument to 0 to
return the position of the value that is exactly equal to lookup_value (A2) or a #N/A error if IlOI found
Index
The INDEX function below returns a specific value in a two-dimensional range

C2 :0.1 NOEX( E4:F7.A2,82)

A B C 0 E F G H
1
2 3 21 92 1
3

4 43 n
5 n 35
6
7
"
21 "
54
8

Explanation 92 found at the Intersection of r(JoN 3 and column 2 in the range E4 F7

The INDEX function below returns a specific value in a one-<limensional range

C2 ~ :o.INDEX(E4:E7,A2)

A B C o E F G H
1
2 3
3
4 43
5 n
6 '7
7 21
8

Explanation 97 found at position 3 in the range E4 E7


Choose
The CHOOSE funcllon returns a value from a list of values, based on a POS~1OIl number

82 =CHOOSE(A2/Car". "Train~. ~lkIat~. MPlane"j

l y--"A,-~~~8===; __"CC-____'D~____CEC-___ F G H

,2 3180at !
Tax Rates
Sometmes you are not IookIOQ for an exact match when you lISe me VLOOKUP funclJOo 111 Excel For exarfllle.
when you want 10 calctAate the talC on an InCome

The foIowlng tax rates apply to ifdviWals who are resdenls 01 Australlil:

Taxable Kame Tax OIl !his lIlCome

0- $18,200 Nj

$18,201 537,000 191: for each $1 over 518,200

$37,001 - $87,000 $3,572 plus 32,5c for each $1 over $37,000

$87,001 - $180,000 $19,822 plus 37c for each $1 over $87,000

$180,001 and over $54,232 plus 45c for each $1 over $180,000

EKampie If JOCOITle IS 39000, tax equals 3572 + 0 325' (39CXXl- 37000) = 3572 + 650:: $4222

A B c o E F G
1 Taxable Income Tax on this Income
I
,
2 $39,000 $4,222 J
To automatK:ally cak:ulate the tax on an Income, execute the followll"lQ steps

On the second sheet, create the following range and name rt Rates

Rates t- O

A 8 C D E F G H
1 O~ 0 0
2 18200 0 0,19
3 37000 35n 0.325
4 87000 19822 0.37
5 180000 54232 0.45
6

7
Sheet! I Sheet2 e
2. We already know how the VLOOKUP function can return an exacl match or a #NIA error if not found, by setting
the fourth argument 10 FALSE However, when you set thIS argument to TRUE , rt returns an exact match or if not
found, rt returns the largest value smaller than lookup_value (A2). That's exactly what we want!

B2 =VLOOKUP(A2,Rates,2. TRUE)

A 8 C D E F G
1 ITaxable Income Tax on this income
I I
2 $39,000 $3,5n
3 I
Explanation Excel cannot find 39000 in the first column of Rates. However, rt can find 37000 (the largest value
smaller than 39000). As a resun, rt returns 3572 (coljndex_num, the third argument, is set to 2)

3. Now, what's left IS the remainder of the equation, + 0 325' (39000 - 37000) This is easy We can return 0 325 by

setung col_lndex_num to 3 and return 37000 by setung col_lndex_num to I. The complete formula below does the
mek
E~planatJOn E~cel cannot find 39000 In the first column of Rilles However, rt can find 37000 (the largest value
smaller than 39000) As a resutt, rt returns 3572 (col_lf'dex_num, the third argument, IS set to 2)

3 Now, what's IefllS the remall'lder of the equatlOfl, + 0,325' (3900037000) ThIS IS easv We can return 0 32511'J
setting coClOdelUlum 10 3 and return 37000 II'J setllng coUndex_1lUll to 1 The complete formula below does the
tr<k

=VlOOI(UP(A2.Rates,2,TRUE)+VlOOI(UP(A2,Rates,3,TRUE)-(A2.VLOOKUP(A2.Rates,l,TRUE))

A 8 C 0 E F G
1 Taxable Income Tax on this income
2 $39.000 I $4,222 I

3

Note wtlen VOU set the ku1tl argument 01 the VlOOKUP funcllon to TRUE, the first colulm 01 the table fTlI.ISl be
sorted 10 asceodlng order

x
Offset
The OFFSET functlon In Excel returns a cell or range of cells that IS a specified number of rows and columns from a
cell or range of cells

1 The OFFSET function below returns the cell that is 3 rows below and 2 columns to the right of cell A2 The
OFFSET function returns a cell because the height and width are both set to I.

X f. :QFFSET{A2.3,2,l,1
COUNTlF
'"
1
A
Sa les
C D E F G H


2 Month lEast West

3 Jan 510 1010
4 F.b 605 1467
5 M" ...1 10341
6 A,. m 1030
7 M,V 691 5..
I=OFFSET(~2.3,2,1.~
, I"
I"
861
379
694
1219
, OfFSET(.rierence, rows, cols, (nelghtL [width))
10 A,. 317 610 - -- - - -

11 5., 92. 1159


12 Oct 340 746
13 No, 443 1213
14 D" '34 1209
15
ResuR:


E8

" :()FF SET(A2.3, 2, 1, 1)

, A C D E F G H

, Sales

, Month
1"
Eilst
510
West
1010

'"
5 M"
605
...1
'46'
10341
,
6 Ap' 155 1030

,,,
M,V 691 588

,
8
1"
861
",
694
1219
1034 1

10 A,.
,,,
317 610

..,,., 115'
11 5.p
12 Oct 340 "6

,.
13 No,
D"
1213
1209
15
2 The OFFSET function below returns the 1 x 2 range that IS 8 rows below and 1 column to the right of cell A2. The
SUM funclton calculates the sum of this range

COUNTIF =SUM( OFFSET( A2,8, l ,1,2

1
A

Sales
c o E F G H


2 Mo nth lEast West

3
""
510 1010
Fob 605 1467

,
5 M"
Ap'
648
155
1034
1030
7 M,y 691 588

, Joo
J,I
861

'"
6,.
1219 I =S UM(OFFSETIA2,8,I, I,~
10 A, S 317 6101
OF F SfT(referen c ~ rows. col~ [heightL [wid thll
-- -- -- -
11 5.p 92' 1159
12 Oct 340 7"
13 No, 443 1213
I. 0" '34 1209
15

Resu~:
R~""

/z =SUM( OFFSETI A2,8.1.1. 2))


" ,
1
A
Sales
C D F G H

,
2 Mo nth East West
1010
4 ""
Feb
510
60S 1467
5 M" 648 1034

Ap' 155 1030


7 Mo,

, '""
8
691
861 ...
S88

1219 9271
Jul
10 Aug '"
317 6101

11 Sep ." 115.
746
"13 No,
Oct 340
44' 1213
14 Deo .34 "09
15

Note to return a range (without calculaung the sum), select 11 range at the same sIZe before you Insert the OFFSET
fuoctJOn If you want to return a cell or range of cells that IS "specJtied number of rows above or colurms to the left,
enter a negatIVe number
Left Lookup
A drawback of the VLOOKUP function IS that rt c an only look up values In the leftmost column of a table. However,
sometunes you need to look up a value in i!!IY. column and return the corresponding value to the!!ctl_To achieve thIS ,
simply use the INDEX and the MATCH function

The MATCH function returns the posrtion of a value In a gIVen range

.2 =MATCH(A2,$G$4:$GS7,O)

1 lID
A

Product
C 0 E F G H

2 104 4]

3 103 Product Brand 10
4 104 Computer Dell 101
5 101 Keyboard logitech 102
6 102 Mouse logitech 10.
7 103 Printer HP 104

,8 101
104
10 101
11 102
12
E~planatlOO 104 found at position 4 In the range SG$4 SGS7

2 Use this resu~ and the INDEX function to return the 4th value III the range SE$4 SES7

B2 :fNDEX(SES4:SE$7.MATCH(A2.SGS4:SG$7,O))

A B C 0 E F G H
1 ho Product
2 104 Printer !
3 103 Product Brand i.o
,
4 104
101
Computer Dell
Keyboard Logitech
101
102
7
102
103
Mouse
Pri nter
Logitech
H'
103
104

,
8 101
104
10 101
11 102
12

3 Drag the formula In cell B2 down to cell Bll

B2 =INDEX($ES4:$E$7.MATCH(A2.SGS4:SG$7.0))

A B c o E F G H
1 I,D Product
104 Printer
2
3 103 Mouse Product Brand ,0,---=
,
4 104 Printer
101 Computer
Computer DeU
Keyboard l ogitech
101
102

7
102 Keyboird
103 Mou se
Mouse
Printer
Logitech
H'
103
104

,
8 101 Computer
104 Printer
10 101 Computer
11 102 K ey~rd
12 ~
Note. when we drag this formula down, the absolute references ($E$4 $E$7 and $G$4.$G$7) stay the same, while
the relative reference (A2) changes to A3, A4, A5, etc

4/7 Completed! Learn more about lookup & reference>


Bock to Top lefllookup I Go to Next Chapter: Financial Funcllons
Two-way Lookup
This example teaches you how to lookup a value In a two-dImensional range We use the MATCH and INDEX
func:tlOll

Below you c an fwod the sales of different ICe cream flavors In each month

To find the posrtlOll of Feb In the range A2:AI3, use the MATCH function_The resuH IS 2.

SUMIF x =MATCH(G2,A2:A13,O

A B c D E F G H
1 Ch()(olate Straw berry Vanilla
r~ 189 Month iO
"~b:---i"MATCH(G2,A2;A13,q
2
3 fob
544
217 '"
719
'"

Flavour Chocolate

4 M" 81D 178 810 MATCH Oookup_value, lookup_array, [millch_typeD -
-
5
6
Ap,
M.,
5"
745
'26
230
,'"
364
Sales
- -

7 luo 298 820 947

,
8 lui
Au,
457
495
522
500
832
239
10 5., 871 391 5'"
11 Oct 585 225 791
12 No, 478 262 540
13 Do< 741 883 809
14 J
2. To find the posmon of Chocolate In the range 81:Dl , use the MATCH functIOn The resu~ IS 1

SUM1F X ~ I- =MATCH(G3,Bl:Dl,O

1
A
C 0
. Chocolate Strawberry Vanilla
E F G H


2
3 Feb''" S44
217
639
71!l
189

'"810
Month
. .
F,b
Flavour IChocolate I:MATCH( G3.Bl:Dl.

2
~

4 M"
, A,. 810 178 MATCH(lookup_Yolue, lookup_~rr'Y, [fTWIl<::h_typel)
56' Sales
6 M., '" '"364
, '"" '4'
".
230
820 94'
, '"'A".
8 457
495
"2
'00
832
239
10 Se,
11 Oct
871
58'
391
225 '"
791
12 No. 478 "2 540
13 0" '41 883 809
14

3. Use these resutts and the INDEX function to find the sales of Chocolate in February

G' I- =1 NDEX( B2:D13,H2,H3)

1
A
C 0
Chocolate Strawberry Vanilla
E F G H

2 189 Month Feb 2


3 Feb"" 544
217 '"
71!l
'"810 Flavour Chocolate 1

, M"
4 810 178
Sales 2171
A,.
6 M., '" '" '"
, '"" '4'
298
230
820
364
94'
, '"'A".
8 45'
495
522
'00
832
239
10 Se, 871
11 Oct '85
391
225
'"791
EXpianatKlO 217 found at the IntersectKlO of rfloN 2 and colurm 1 In the range 82:013

4 Put rt all together

G5 :INOEX(B2:013,MATCH(G2.A2:A13,O),MATCH(G3,81:01,O))

1
A C 0
Chocolate Strawberry Vanilla
E F G H

2 IS' Month Feb


3 ''"
Fob
544
217 '"
719 679 flavour Chocolate
4 M" 810 178 810
5 Ap' 567 '26 "9 sale!> 2171
6 M., 745 230 3..

7 'u" 298 820 947

,
8 'ul
Au,
457
495
522
500
832
239
10 Sep
11 Oct
871
S85
391
225
'"
791
12 No. 478 262 540
13 De< 741 ..3 8O<J
14
Locate Maximum Value
Thts example leaches you how to find the eel address of the rl\alIJfl1Url1 ~atue If! a colurm

1 FIrSt. we use the MAX function to find the maXllOOITI value 11 cokJrm A

(1 f" =MAX(A:A)

A 8 ( 0 , F G H
1 12!
,
2

,
6

,
4

,
1
6
7 12
,
8 8
2 Second. we use the MATCH function 10 find lhe rCIW number oflhe ma~omum value

(1 b =MATCH(MAX(A:A),A:A,O)

A B ( o , F G H

,,
1

4 ,
6

5 1
6 5
7 12

,8 8

E~plar.a\lOll the MATCH fLnCtIon reduces 10 =MATCH(12,AA,O). 7 The MATCH fLnCtIon ret~ns the posrlJon of the
maximum value In colurm A Set the thll'd argument to 0 to retum an exact match

3 Finally, we use the ADDRESS function to retum the cell address

C1 f- =ADDRESS(MATCH(MAX(A:A), A:A,O), l )

A B ( 0 , F G H

,,
1 ISAS7 I

4 ,
6

5 1
6 5
7 12

,
8 8

E~pIana\Jon the ADDRESS function reduces to c=ADDRESS(7,1), SAS7 The fw'sl argtmenl specifies the rr:Nf

rurbef The second argument specifies the ColUlm numbef


Indirect
The INDIRECT functton In Excel returns the reference specified by a text string

For example, the INDIRECT fuoction below reduces to =INDIRECTrc2"). =C2, 5

{. =INDJRECT(Bl )
" , ,
I 5b
C D F G H
1
,
:j
Do we really need the INDIRECT furx::tton for this? Yes Below you can find the resuR wJthoulusJOg the INDIRECT
function


"
, C
'" D
=Bl

, F G H
1C2 b
1
,
:j
Indirect
The INDIRECT function In Excel retums the reference specified by a text string

For ex ample, the INDIRECT function bekm reduces to =INDIRECT("C2"), =C2, 5

Al f. =INOIRECT(Bl)

I
A
5b C 0 E F G H
1
,
:j
Do we really need the INDIRECT function for thIS? Yes Below you can find the resuR wrthoul USing the INDIRECT
function

Al f. =61

In
A
In
C 0 E F G H
1
,
:j
2 For example, the function below reduces to =SUM(INDIRECT("E3E6", =SUM(E3.E6), 27

A3 =SUM( INOI RECT(~E" &Al&":E~ &A2l 1

A
c 0 E , G H
2
:j : 6
3 t==El
,
4

6
7


0
Note the & operator IS used to JOOl stnngs Border for illustratton only

3 For example, the functlOO below reduces to =AVERAGE(S<:ores ), 9

Al :AVERAGE(INDIRECT( Bll 1

A c o E , G H

,
10

Note the named range Scores refers to the range C2.C4


Statistical Functions
Average I A~erageif I Median I Mode I Standard DevaatlOll I Min I Max I large I Small

This chapter gIVes an OVervIeW of some very useful statistical functlons in Excel.

Average
To cak:ulate the average of a range of cells , use the AVERAGE fuoction

'3 :AVERAGE(Al:01)

B C 0 E F G H JKLMNOP
1
2
0 7 B 6 5
8 7 480 3 568

3@
41
Averageif
To lIIIerage cells based on one cnleraa, use the AVERAGElf functIOn for example to calculate the average
exCluding zeros

A3 /z =A VERAGElf( Al:Ol , ~OOM)

0 , , , ,, ,, 0 , p
B C 0
, F
, G H J K L M , N
8
:j 7 8 5 8 7 4 8 0 5

: \6,46!
Note <> me<VlS not eq.Q/ 10 The AVERAGEIF fiR:bon IS smiar 10 the SUMIF luncbon

Median
To find the median (or IT'I(lk JUrber), use the MEDIAN fiR:bOn

., /z =MEDIAN(Al:Ol)

0 , , , ,, ,, ,
B C 0
, F
, G H I J K
0
L M ,
5
N
8
p

:j 7 8 5 8 7 4 8

:p
C""'.
,,
I
B , C
,, 0 , E , F , G H I , J , L , M N ,
,
0 , P
1 0 0 4 5 5 ,U 7 7 8 8 8 8
Mode
To find the most frequently occurring number, use the MODE function


A3
" :MODE(Al :01)

, a
1
A
0
B
7
C
B
0
6
E
5
F
, G
8
H
7 4
J
8 0
l
, M
5
N
6 8
p

' D.
4 1

Standard Deviation
To cak:ulate the standard devaanon, use the STEDV functlOn_


A'
" :STDEV(Al:01)

, ,
A B C 0 E F
, G H J l M N 0 P

:~
7 8 6 5 8 7 4 8 0 5 6 8

4 1

Min
To find the minimum value, use the MIN function


A3
" :MIN(Al:Ol)

, a
A B C 0 E F
, G H J l
, M N p

:f~
7 8 6 5 8 7 4 8 0 5 6 8

, 0
4 1

Max
To find the maximum value, use the MAX function


A3
" ::MAX(Al:Ol)

,
,
A B C 0 E f
, G H J L M N 0 p

:1 0 7 8 6 5 8 7 4 8 0 5 6 8

:p
Large
To frld the Itwd Igesl nu-Mer. use the IoIow1ng lARGE IuncbOn


A3
" =lARGEtAl:0UJ
,
, p
A B C 0 E f
, G H J L M N 0

:1 0 7 8 6 5 8 7 4 8 0 5 6 8

:p
c'""
o , ,
1 I
A ,
0
B
0
C
, 4
E
5
f
5
G
6
H
6 7
J
7 8
L
8U
M N
8
0
, P ,

Small
To fnI the second smallest runber, use the fobHlng SMALl funcbOn


A3
" =SMALl.{Al:Ql.2j

,
,
1
A
0
B
7
C
8
0
6
E
5
F
, G
8
H
7 4
J
8 0
L M
5
N
6
0
8
P

' 0.
4
Small
To find the second smallest number, use the following SMAll function

'3 f. =SMAll(A l :01,2)

, , a
B C 0
, ,
F G H J l M
, N p

:j 0 7 8 6 8 7 4 B 0 3 6 8

I0.
3
4

C"'k

o c 0 ,, , F G H I J , l , M N a
, p
1 I U 0 3 4 6 6 7 7 B 8 B 8

T,p Excel can generate most of these resutts with the click of a button Our DescnptJlle StatrstlCs example shows
yoo how
Negative Numbers to Zero
A clever Excel trick to change negative numbers to zero but leave positive numbers uochanged

Below you can fwd two columns with numbers To subtract the numbers in column B from the numbers in column A,
execute the following steps

1 Select cell C 1

2. Enter the formula =Al -Bl

3. Click the lower right corner of cell Cl and drag the formula down


C1

A
C
" 0
=A l -B l

, ,
1
2
20
15
12
12

3 18 7

,
4 17
15

6 11 1l
7 11 15

,
8 11
14
8
10
10 19 6
11 1l 15
12 12 1l
1l 15
14
+
Result.

C1 f. "'AI-BI

A 8 C 0 E f

,
1 20 12
,8

, 15 12

4
18
17 8 ,
11

5 15 7 8
6 11 13 -,
7

,
8
11
11
15
8 ,
-4

,. 14
19
10
6
4
13
-,
11 13 15
12 12 13 -1
13 15 8
14 'I-~l
15

4 To change the roegaWe ol-mbers to zero bulleave the posllNe flllrTlbefs urx:hanged, InStead of "'Al-Bl. use
= MAX{O,A 1-8 1) and drag the fin:bon down

Result.
4 To change the negative numbers to zero but leave the posrtive numbers unchanged, Instead of =Al-Bl , use
=MAX(O,Al -Bl) and drag the function dawn

ResuH:

e, 0
f. =MAX(O,A6-86)

A
e 0 E F
1
2
20
15
12
12
3
3 18


7
,
11

,
4 17
15 7

,I 11
"l 01

7 11
" 0

,8 11 8 3
14
,
10 4
Il
10
11 "
Il 15 0
12 12 13 0
13 15 7 8
14 ~
15

Explanation the MAX function returns the maximum of two values If the resuH of the formula is negative, the
function returns 0
Random Numbers
Rand I Randbetween

Excel has two useful func:tlOllS when rt comes to geoeratlllg random numbers The RAND and RANDBElWEEN
function

Rand
The RAND function generates a random decimal number between 0 and 1

1 Select cell AI

2. Type RANDO and press Enter The RAND function takes no arguments


A1

A , C
'" 0
=RANOO

E F G H
1 I 0 .63404 1

2 I
3 To generate a list of random numbers, select cell AI , click OIl the lower nght comer of cell A I and drag rt down

.,

C
" D
:RANDO

E F G H
1 0.895814

,2 0.025902
0.97'9004
4 0.328873
S 0.074517


7
0.821652
0.989476

, ~l

Note that eel AI has changed That IS because random numbers change every tme a eel on the sheet IS
calculated

4 If you don't want thIS, simply copy the random numbers and paste them as ~alues

C
" D E F G H

1 lTo.89Sii41 0.895814
2 0.025902: 0.025902
3 0.979004:
, 0.979004

-~ - - - -
4 0.328873 , 0.32887: P.steOptions:
I
5 0.074517: 0.07451' ....
0.82165:" D Ix &" )' ~
6 I 0.821652:
7 _~!~Z~ 0.989476 VIJuHM

,
I.
11
5. Select ce ll Cl and look at the formula bar This cell OOIds a v alue now and not the RAND function


C1

A
I C
" 0
0.895813858170649

E F G H
1 0.619427 0.8958141

,
2 0.159024
0.431186
0.025902
0.979004

,
4 0.960913
0.n3529
0.328873
0,074517
6 0.149059 0.821652
7 0.012517 0.989476


Randbetween
The RANDBETWEEN function generates a random whole number between two boundanes

1 Select cell AI.

2. Type RANDBE1WEEN(50,75) and press Enter


Al
" =RANOBETWEEN(50,75j

1 I
A
59 1
C 0 E F G H

2 I

3. If you want to generate random decimal numbers between 50 and 75, modify the RAND function as follows


Al

A C
" 0
=5O+25RANO(j

E F G H
1 I 6u715 1

2 I
Rank
The RANK functlOll returns the rank of a number 1Il a list of numbers

If the third argument IS DmIIIed (or 0), Excel ranks the largest number first, second largest number second, etc

81 f. =RANK(Al,$AS1:$A$9)

A 8 C 0 E F G H
,I
1 14551
,
,2 1534
,
1108
,
,
4 2109
,
, 2109
2917 1
7 1427 7

,
8 1220
2298
8
2
10
Note when we drag the RANK function down, the absolute reference ($A$1 $A$9) stays the same, while the relative
reference (AI ) changes to A2, A3, A4, etc

2 If the third argument is I , Excel ranks the smallest number first, second smallest number second, etc.

.,

A
C
" D
:RANK(A1,SA$1:$A$9,1)

, F G H
1 14551 41

2 1534 5
3 1108 1
4 2109 6
5
6
2109
2917 ,
6

7 1427 3

, 1220
2298
2
8
10

3 Use the RANK.AVG functIOn to return the average rank If more than one number has the same rank

.,
" :RANK.AVG(A1,$A$1:$A$9,1)

A
C D , F G H
1 1455 4
2 1534 5

3 1108 1
4 2109 6.5
5
6
2109
2917 ,
6.5

7 1427
,
3

,
8 1220
2298 8
10
Percentiles and Quartiles
ThIS example teaches you how to use the PERCENTILE and QUARTILE function In Excel Below VOU can find a list
of scores (green fill for illustration only)

1 Use the PERCENTILE function shown below to calculate the 30th percentile Excel retums the value 127 This
means that 30% (6 out of 20) of the scores are lower or equal to 12.7

01 f. =PERCENT1LE(Al:A20,O.3)

A B , C 0 E F G H
I
1
2
3
l ,
24

12
perce ntile 12.71

4 24
5
6
"68
7 61

,
B 4
21
10 1l
11 51
12 29
1l 15
14 B
15 6
16 1
17 47
1B 2B

"
20
23
25
21
Note The second argument of the PERCENTILE function must be a decimal number between 0 and 1 Excel uses a
slightly different algorithm to calculate percentiles and quartiles than you find In most statistics books If you're
Interested, download the Excel file

2. Use the PERCENTILE funcllDn shown below to calculate the 90th percentile Excel returns the value 61 7 ThIS
means that 90% (18 out of 20) of the scores are lower or equal to 61.7

01 f. :.PERCENnlEjA1:A20,O.9)

A B C 0 E , G H
1 241 percentile I 61,7 1

,2

12

,
4 24

"68
6
7 61
8 4

21
10
"
11
12 "
29

"
14
15
8
15 6
16 1
17 47
18 28

""
19
20
21
3. Use the QUARTlLE funcllon shown below to calculate the 1st quartile. Excel returns the value 11 25. ThIS means
that 25% (5 out of 20) of the scores are lower or equal to 11 25


01

A B C
" 0
=QUARTllf(Al :A20,1)

E F G H
11 24 quartile 11.251

,
2

12

,
4 24
56
6 6B
7 61
8 4

10
21
13
11
12 "
29
13
14 "8

"
16
6
1
17 47
18 28
19 23
20 25
21

Note: The second argument of the QUARnLE functlOl'l must be a number between 0 and 4
PERCENTILE(Al .A20,O.25) gives the exact same resuH. It's up to you which function you woukl like to use for
quartiles Below you can find an overvIeW

Minimum Value PERCENTlLE(A 1A20,O) QUARTILE(A1A20,O) MIN(Al .A20)

1st Quarter PERCENTlLE(A1A20,O 25) QUARTILE(Al .A20,I)

PFRr.FN IFI1A:xlO<;O\ IIARTII FIA1 MFnlA I 1 A ,


15
,. 1
17 47
18 28
19 23
20 25
21

Noce The second ~ of the QUARTILE funcbon ITJ.ISt be a runber between 0 and 4
PERCENTlLE(Al A20,Q 25) !jIVes the exact same resuk. It's up to you which fooclKW1 you wookl Wte 10 use for
quartiIes Below you can find an fNervteW

"'"""'" v_ PERCENTlLE(A lA20,O) QUARTlLE{A1A20.0) MlN(Al A20)

1st QuaI1er PERCENTlL(A lA20,O 25) QUARTlLE{Al.A20,l)

MEDIAN(A 1 AlO)
""""" PERCENTILE{A lA2Q,O SO) QUARTlLE(A lA20,2)

3fd Quarter PERCENTILE(A lA20,Q 75) QUARTllE(A I_AW,3)

Maximum Value PERCENTILE(A 1 A20,l) QUARTlLE(A 1_A20,4) MA.X(A 1 AlG)


Forecast and Trend
When you add" trendhne to an Excel chart, Excel can display the equation in a chart (see below) You can use thIS
equation to calculate future sales The FORECAST arod TREND function gIVe the exact same resuK.

Trendline

""
120 y . 77S1Sll 18.267
R O_9~ _

100
.
OJ ... '

~
'" .. -
'"
,

'",
, 1234567891011121314
Period
Explanation. Excel uses the method of least squares to fird a lioe that best frts the points The R-squared value
equals 09295, whICh IS a good frt. The closer to " the beller the lioe fits the data

Use the equabon to calculate future sales

'" :7.7515*A12"18.267
COUNTIF )<

1 Period
A

5ales
C 0 E F G H

2 1 20
3 2 32

5
3
"
'3
6 5 62
7 6 63

, 7 82

10 , 75

"89 E uat io n
11 10 Forecast Tre nd
12 111 :7.7515"A}2"18 .26~

13 12 111.29
13 119.04
"
15
2 Use the FORECAST functIOn to calculate future sales

x I-

e
'" 0
=FORECAST(A12.SBS2:SBS11.SAS2:SASll)

E F G H

2D
32
51
43

"
63
82
75

1__~~! ___"
~'?jEquat i on
8 Forecast Trend
103.531 :FORECA~TIAl2.SBS2:SBSll.SAS2:SASl1)1
111.29 111.28
119.04 119.04

Note when we drag the FORECAST funcbon down, the absolute references (SBSl SBStt and SASl SASl1) stay
the same, whlJe the relative reference (At2) changes to At3 and At4
3. If you prefer to use an array formula, use the TREND funclton to calculate future sales

El2 f.r {=TREND(B2:B11,A2:A11,A12:A14}}

A B C 0 E , G H
1 Period Sales
2 1 20
3 2 32

3
"
5
6
5
43
62
7 6 63

,
8

,
7
8
82
75
10 92
11 10 89 Equat ion Fo recast Tre nd
12 11 103.S3 103.S3 103.S3
13 12 111.29 111.28 111.28
I. 13 119.04 119.04 119.04
15

Note first, select the range E12:E14 Next, type =TREND(82Bll ,A2:All,AI2:AI 4) FinISh by presSing CTRl +
SHIFT + ENTER The formula bar indicates that this is an array formula by enclosing rt in curly braces 0 To delete
thIS array formula, select the range E12 E14 and press Delete
Maxlfs and Minlfs
Use the MAXIFS and MINIFS function III Ex cel 2016 to find the m3XlITlUITI and ITlIOIIllUm value based on one crrteria
or multiple cntena

For elC~ the MAXIFS foocbon below Inds the highest female score

F2 f. :MAX IFS( 0 2:012, 82: B12, wFema l e~l

A , C 0 E F G H
1 Name Gender Country ,'"
,
2 Richard
Jenni fer
Male Umted States
Female United Kingdom ~
74
"I
,,
4 Ja mes Male United States
"
[]
U.. Female Canada
Sharon Female Austra lia
7 Elizabeth Female Canada 91
8
, Carol
Mark
Female
Ma le
United States
Un ited States 58
"
10 John Male Ca nada 67
11 Susan fema le United Ki ngdom ~
12 Oavld Ma le United States 83
13
Note the first argument (D2:DI2 In thIS example) is always the range In which the maximum or minimum will be
determined ThIS MAXIFS funclton has 1 range/criteria pair (B2.BI21Female)

2. The MINIFS funclton below finds the lowest female score

F2 f. =MINIFS(D2:DU ,B2:Bl 2, "Female")

A B C 0 E F G H
1 !Nam e Gender Country .kore
2 Richard Male Uniled States 74 ",I
3 Je nnifer Female United Kingdom ~

,
4 James Male United States 55

[]"
Usa Female Canada
6 Sharon Female Australia 50
7 Elizabeth Female Canada

,
8 Carol
Mark
Female United States
Male United States
"
10 Joh n Male Canada "
67
11 Susan Female United Kingdom I 541
12 David Male United States 83
13
3. For example, the MAXIFS function below finds the highest female score in Canada


F2

A B C
" 0
=MAXIFS( 0 2:0 12,82:812, ~Female~ ,C2:C12, "Canada~}

E F G H
1 !Name Gender Country SCore
2 Richard Male Un ited States 74 91 1

1 Je nnifer Female Un ited Kingdom 92
4 James Male Un ited States 55
5 lisa Female Canada c::B
6 Sharon Female Austra lia 50
7 Elizabeth Female Canada 911

,
B Carol
Mark
Female
Male
United States
Un ited States 58 "
10 John Male Canada 67
11 Susan Female Un ited Kingdom 54
12 David Male Un ited States B3
13

Note thIS MAXIFS function has 2 range/cnterJa pairs (B2:Bt2!Female and C2Ct2lCanada) The MAXIFS and
MINIFS function can handle up to t26 range/crderJa pairs
4 The MAXIFS function below finds the highest score below 60

F2 f,. =MAXIFS(D 2:D12,D2:Dl 2. "<60")

A B C 0 E , G H
1 Name Gender Country xore
2 Riehilrd Male United States 74 581

3 Jen nifer Female United Kingdom 92
4 James Male United Stiltes 55

,
5 Usa
Sharon
Female Canada
Female Austfaliil
B2
L::iI
7 Elizabeth Female Cana da
"
, M,,"
B Carol Female United States
Male United States "581
10 Joh n Male Canada 67
11 Susan Female Unit ed Kingdom ~
12 David Male United States B3
13

Note thiS MAXIFS funcllon only uses the range D2D12


Round
Round I RoundUp I RoundD<mn

ThIS chapter illustrates three functtons to round numbers In Excel The ROUND , ROUNDUP and ROUNDDOWN
fuoc",,"

Before your start If you round a number, you lose preclSlOIl If you don't want this , show fewer decimal places
wllhout ChanglflQ the number dself

Ro und
1 Round a number to two decimal places

81 :ROUNO(Al,2)

A 8 c o E F G H
1 114.72611 114.73 1
2

Note 1, 2, 3, and 4 get rounded down_ 5, 6, 7, B, and 9 get rounded up In thIS example, 1147211 , 114.7221 ,
11 4 7231 and 11 4 7211 get rounded down to 11472 and 11472.(11 , 11 4 7261 , 11 4 7211 , 11 4 72.81 and 11 4 721l.1 get
rounded up to 11 4.73

2 Round a number to one decimal place

81 {. "'ROUNO(Al,1)

A 8 C 0 E F G H
1 114,72611 114,71
2

3. Round a number to the nearest Integer

81 {. -::ROUNO(Al,O)

A 8 C 0 E F G H
1 114,72611 115 1
2

4 Round a number to the nea rest 10

81 {. "'ROUNO(Al,-1)

A 8 C 0 E F G H
1 I 114,72611 1101

2 J
5. Round a number to the nearest 100

81 {. =ROUNO(Al,-2)

A 8 C 0 E F G H

:I 114,72611 1001

RoundUp
The ROUNDUP function always rounds a number up (iJWay from zero) For e~ample round a number up to one
decimal place

B1
'" :ROUNOUP(AU)

A
C 0 E F G H

:I 114.72611 l14.8 1


B1
'" =ROUNOUP(Al.l)

A
~ 1-114.72611
!
0114.
C 0 E F G H

RoundDown
The ROUNDDOWN func:1Jon always rounds a numbef daYin (toward zero) For example. round a numbef doYin to
the nearest lIl\egef


B1
'" =ROUNDDOWN(Al,O)

~
A

1114.72611
1141 C 0 E F G H


B1
'" =ROUNDOOWN(Al ,O)

~
A

\-114.72611
-1141 C 0 E f G H


Chop off Decimals
In! I Trunc

This example illustrates two functions to chop off declJTlals in Excel_ The INT and the TRUNC function_

Int
The INT (Integer) function rounds a number down to the nearest integer

.,

A
1141 C
" 0
:INT(Al)

E F G H

:I 114.72611

.,
" :INT(A l )

~
A
1-114.72611
-1151 C 0 E F G H


ConcluslOll the INT functlOll only chops off decllTlals from posrtlVe nurnber5

Trunc
The TRUNC (Truncate) function always chops off decrnals

B1 I- ::TRUNqAl,Oj

A B C 0 E F G H

:I 114.72611 1141

B1 I- =TRUNQAl,Oj

A B C 0 E F G H
~ 1-114.72611 . 1141

The TRUNC function can keep any number of decrnals and chop off the rest

B1 I- ::TRUNQAl,2j

A B C 0 E F G H

:I 114.72611 114.721

B1 I- =TRUNQAl.3)

A B C 0 E F G H
1 114.72611 114.726 1

2

Nearest Multiple
Mround I Ceiling I Floor

ThIS example illustrates three fuocbons to round numbers to a multiple of x In Excel The MROUND, CEIUNG and
the FLOOR function

Mround
For example, round a number to the nearest multiple of 10

81 "MROUNO(Al,l O)

A 8 C o E F G H
~J 114.7261L I_---.O''''
10,!
2 For example, round a number to the nearest multiple of 5

81 f.- =MROUNO(A l ,5)

A 8 C 0 E F G H
114.72611 115 1
:J

Ceiling
The same as MROUNO but rounds up_

81 f.- =CEIUNG(Al, 10)

A 8 C 0 E F G H
1 114.72611 1201
2

Floor
The same as MROUNO but rounds down

81 f.- =FlOOR(Al,5)

A 8 C 0 E F G H
1101
:I 114.72611

Even and Odd
Even I Odd I Even or Odd?

ThIS example illustrates the EVEN and the ODD functIOn In Excel_ It also shows you how to determine d a number IS

even or odd

Even
Rounds a pos~ive number up to the nearest even integer

81 ::VEN(Al)

A 8 c o E F G H
1 1161
114.72611L._--"00,.
2
2 Rounds a negative number down to the nearest even integer

.,

A
C
" 0
=EVEN(Al)

E F G H
1 1 -114.72611 -1161
2 J

Odd
Rounds a positive number up to the nearest odd Integer

.,
A
C
" 0
=ODD(A l )

E F G H

:I 114.72611 115 1

2. Rounds a negatIVe number down to the nearest odd Integer

.,
" =OOO(Al )

~
A
1-114<72611
-115 1
C 0 E F G H


Even or Odd?
One w~ 10 determine if a number is even or odd is to use the MOD functIOn The MOD functlOll gIVes the remainder
01 11 dN1S1OIl

1 Even I'IUIl1bers dIVided by 2 always gIVe a remauxler of 0 For e~ampIe, 28 IS dIVided by 2 (exattly 14 times) to
gllle a remainder d 0 As 11 result, the IF function returns Even

B1

I__~A~:~~B,--.__~C____-,DC-__-,E"-___ F G H
1 2s!Ev@n 1
2

2 Odd fUT'ber5 divided by 2 aIwwofs give a retTaflder of 1 Fcx ex3fl1Jle 29 IS ch'ded by 2 (14 \me5) 10 !lIVe a
remanler of 1 As a result, the IF luncbon returns Odd

B1
Formula Errors
##### error I #NAME? error I #VALUEI error I #DIV/OI error I #REF! error

This chapter teaches you how to deal with some common formula errors in Excel

##### error
When your cell contains this error code, the column isn't wide enough to display the v alue

'2 l5000000

, c o , F
1 17,500,000
2 I lflffflflflflflf J
!t 500,000
Click on the nght border of the column A header and Increase the column width

A2 ~.
1500000O
Width : 10S7 (79 pix~~) I

1
A +
7,500,000
B C D E F

2 15,000,000
3 5OO,OOOj
4

Tip: double click the right border of the column A header to automatically frt the widest cell in column A.

#NAME? error
The #NAME? error occurs when Excel does not recognIZe text in a formula

A4 =SU(Al :A3)

A B c D E f

:j :
~ r"NAME? J~

1 Simply correct SU to SUM.


A4

A B C
" D
=SUM(Al:A3)

E F
1 4
2 S
3 3
4 121

s
#VALUE t error
E.eel dISplays the #VALUEI error when a formula has the wrong type of argument


A4

A
C
" 0
=AHA2-+A3

, F

:t ,
4

4 [ IfVAlUE!} '
,I
la Ctlange the v;V.Je 01 eel AJto a rurtler
lb Use a fI.nc\Joflto gnore eels Ihat conIafn led


A4
" -:SUM(Al:A3)

, ,
A
C D

#D IV/O! error
E.cel displays the #OIV/OI error when a formula tries to divide a number b)' 0 or an empty eel

A3 =Al/A2

A
c o , ..F~

1 4
2 0
3 [ /lDIV/O! } ,
4
la Change the v alue of cell A2 to a v alue that IS 001 equal to 0
lb Prevent the error from being displayed by USing the logICal functIOn IF

A3 f. : IF(A2=O, _. ,At/A2)

1
A
4
C D E F

,2 0
I

4

ExpianallOrl' celA2 equals 0, an empty stmg n IS lisplayed. II noI.. the result of the formula AllA2 IS displayed.

#REF! error
Excel displays the //REFI error when a fOffT"da refers to a cellhat IS not vaIKI

1 Cel C 1 references cel Aland cel B 1

C1 =A1+S1

A
6'LI_ C

---"'10,1
D E F

:I 4
1
A

B '"i
C'"
- ,
2. Delete column 8 To ac hieve this, right click the column 8 header and click Delete

E F

2 "~ ,"opy

3 Paste Options:

5 I ." ~

A
, P~st~ Spe(l~1...

7 !n~m

,
B Jl<l~.

Our Contents
~
10
11
..
IB format Cells ...

12 Column Width ...

13
14
15 ..; 1:1
!:::!Id~

Ilnhlde ~
3. Select cell 81 The reference to cell 81 IS not v alid anymore


81

A B C
" 0
=AIHlREF !

E F
@.I'
:I #RE F! I

4 To fIX this error, you can either delete +#R EF! in the formula of cell 81 or you can undo your action by pressing
CTRl + z
ThIS example illustrates the IFERROR funclton In Excel

For ex ample. Excel displavs the #DIV/o! error when a formula tries to divide a number by 0


C2
" =A2/B2

1
A
C 0 E F G H

2 ,,,
829 2 414.5
01 "DlV/ O! I
3 946 4 236.5
4 604 4 151
5 576 1 192
6 554 5 110.8
7 637 0 "DIV/ O!

,
8 560
672
2
4
280
168
10 728 10 72.8
11

2. Use the IFERROR functIOn If a cell contains an error. an empty string (- ) IS displayed


C2
" =IFERROR(A2/B2, "~I

1
A

", C 0 E F G H

2 ,,, 2
01
414.5

I
3 946 4 236.5
4 604 4 151
5 576 3 192
6 554 5 110.8
7 617 0
,
8 560
672
2
4
280
168
10 728 10 72.8
11
IsError
Thrs e~ampIe liustrates the ISERROR fooclJon ~ Excel

1 for ex~_ Excel displays the IIDIV/O! error when a fomUa tnes to cWde a I'olMTIbef by 0

C2 f. :A2/B2

A 8 C 0 E F G H
82. 2 414.5

'" OI IfOIV/O! !
4
'"
004 4
236.5
151
57.
5,. 5
3
'"
110.8

'"
5"
0 IfOIV/O!
2 280
072 4 168
728 10 72.8

The ISERROR fur.ctJOn checks whether a value is an error and returns TRUE or FALSE

2 Use the IF and the ISERROR funclJon. If a cell contains an error, the value 5 IS returned If not, the value 100 IS
,~-

C2 f. :IF(ISERROR(A2/82).S,lOO)

A 8 C 0 E F G H
1 82. 2 100
2
'" 01 5!
3 100
4 '"
004
4
4 100
5 57. 3 100

7
5,. 5
0
100
5
'"
5" 2 100
Aggregate
Excel /UnctlOOS such as SUM, COUNT, LARGE and MAX don', work if a range Includes errors However, you can
easily use the AGGREGATE function to fix thIS

For example, Excel returns an error If you use the SUM function to sum a range wJth errors


A9

A
C
" 0
=SUM(Al:A7)

E F G H
1 IffiEF !
2 5
3 4
4 IIDI V/O!
5 If NAME?
6 1
7 3

, r IfREF l
m
10 1
2. Use the AGGREGATE function to sum a range with errors

.,
" =AGGREGA TE(9,6,Al:A 7)

,
1
A
/fREF !
C 0 F G H

2 5
3 4
4 IfOIV/O!
5 /fNAME?
6 1
7 3

, 13

10 1
ExpianatlOll: the first argument (9) tells Excel that you want to use the SUM functlOll The second argument (6) tells
Excel that you want to ignore error v alues

3. Irs not easy to remember whICh argument belongs to whICh function Fortunately, the AutoCompiete feature In
Excel helps you with thIS
3 Irs not easy to remember whICh argument belongs to whICh functIOn Fortunately, the AutoCompiete feature in
Excel helps you with thIS

COUNn F X ./ ,. =AGGREGATEd

A BCD AGGREGATE(function_num optJons, arri')', [kD ""~---'_ _


AGGREGATE( )
,,
1 lfREF!
S 19 2 COUfll
0 3. COUlllA
4
g 4 . MAX
4 ROlv/ O! g SMlN
S lfNAME? (] 6 PRODUCT
6
7 ,
1 D7 5TDEV.5
[J II. 5TDEV.P

,
8
"AGGREGATE!
(] 9 SUM
[J 10 VAR.S
[ ] 11 VAR.P
10 9 12 . MEOI4.N
11 D 13 MODf.SNGL
12 D 14 . lARGE
13 g IS . SMAll
9 16 . PERCENTlLE.IIl(
14
D 17 QUARTlLE.1NC
15 D ill PERCENTIlE.EXC
16 [ ) 19 . QUARTlLE.EXC
17

4 The AGGREGATE function below fmds the second 10 largesl number II'! a range with errors

A' ,. =A GG REGATE( 14,6,Al :A7, 2)

A B c o E f G H

,,
1 lfREF!
S
4
4 ROlv/ O!
S lfNAME?
6
7 ,1

8
Explanatton the first argument (14) tells Excel that you want to use the LARGE function The second argument (6)
tells Excel that you want to Ignore error values_ The fourth argument (2) tells Excel that you want to find the second

to largest number

5. The AGGREGATE function below finds the maximum value ignoring error values and hidden rows

A9 {z =AGGREGATE(4, 7,Al:A 7)

A , C D , F G H
1 "REF !
3 4

,
4 " OIV/O!
"NAME?
6 1
7 3

,
8
4

10 1
Explanatton the first argument (4) tells Excel that you want to use the I\IlAX function The second argument (7) tells
Excel that you want to ignore error values and hidden rows In thIS example, rrm 2 is hidden
Circular Reference
A formula In a cell that directly or Indirectly refers to rts own cell is called a circular reference This is 00\ possible

1 For example, the formula in cell A3 below directly refers to rts own cell ThIS is not possible

COUNTIF x =A1+A2+A3

A
c o , F G H
1 Ii
2 1 ,i
! f=Al+A2+~~
Note: Excel returns a 0 Jfyou accept thIS clrcul<ir reference

2<1 For example, the formul<iln cell C2 below refers to cell Ct .


C<

A B (
'" 0
=Cl*2

E F G H
1 1 2
2 3 41
3
4
0

16
5

2b The formula In cell C3 refers to cell C2

=cr2
'"
(3

A B ( 0 E F G H
1 1 2
2 3 4
3 0 .1
4 16

5

2c. The formul<i in cell C4 refers to cell C3.


C4

A
(
'" 0
=<:3*2

E F G H
1 1 2
2 3 4
3
4
0

16 1
5

2d So far, everything's OK. Now change the value In cell Cl to the formula =C4 Cell Cl refers to cell C4, cell C4
refers to cell C3, cell C3 refers to cell C2, and cell C2 refers to cell Cl In other words , the formula In cell Cl
indirectly refers to rts own cell This is not possible

COUNTIF X ~ f. ~

1
A
1
C
.CA(
D E F G H

2 3 4
3 0 8
4

1

161
5

Note Excel returns a 0 d you accept thIS circular reference

3. To find your circular references , on the Formulas tab, In the Formula Audrung group, click the down arrow next to
Error Checking

t" Trac<! PrK<!d<!nu Ial Show Formulas U


"'-t Tract! O"pend"ntl; ~!
-
Error ChINking Cd
~ Watch
1.
1').; R"mov" Arrows @ Evaluat"Formula Window
Formula Auditing

4 Click Circular References

....1 Error ChINking ..,

Trac"Irror

,ircu", ReffleflCes ~ SC Sl

1CS4
scn
SCS2
Formula Auditing
Trace Precedents I Remove Arrows I Trace Dependents I Show Formulas I Error Checking I Evaluate Formula

Formula auditing in Excel allows you to display the relationship between formulas and cells The example below
helps you master Formula Auditing quic k ly and easily

C13 : ROU NOUP(C I O/ C12,O)

1
A
c o E

2
Day out Boat trip
3
4 De Kription Am ount
5 Boat rent 5 400.00
6 Boat fuel S 33.00
7 ute vests S 20.00

, Picn ic
Dinner
S 68.00
S 240.00
10 Total cost S 761.00
11
12 Group size .1
Cost per person S 96.00
13J
14

Trace Precedents
You have to pay $96.00 To show arrows that indicate whICh cells are used to cak:ulate thiS value. execute the
following steps

1 Select cell C 13.

2 On the Formulas tab, in the Formula Aud~ing group. click Trace Precedents

1:" TriKe PrecKienu ta1 Show Formul a~


"~ TriKe~pendenu .;', Error Checking W
Watch
1$. Remove Arr0W5 @ Eval uateFormull Window
Formula Auditing

ResuH:

C13 :ROUNOUP(C10/C12,OJ

A B c o E
1
2
Day out Boat trip
3
4 DeKTiption Amount
5 Boat re nt 5 400.00
6 Boat fuel S 33.00
7 Ufe vests S 2<).00

,8 Picnic
Dinner
S
S
68.00
240.00
10 Total cost 761.00
11
12 Group size 8

"I
14
Cost per person S 96.00

As expected. Total cost and Group size are used to cak:ulate the Cost per person
3 Chck Trace Precedents again

C13 =ROU NDUP(C10/C12,Oj

A , c o ,
1
2
, Day out - Boat trip

,,
4 Descriptio n
Boat re nt
Amount
400.00
Boat fu e l 33.00
7 Ufe ve st s 20.00
8
, Picnic
Dinner
68.00
240.00
10 Tota l cost 761.00
11
12 Group size 8
13 Cos t per person ".00

14

As e~ pected, the different costs are used to cak:ulate the Total cost

Remove Arrows
To remove the arrows, execute the following steps

1 On the Formulas lab, 11 the Formula Auditing group, click Remove Arrows

1> T,.ce P,ec:edenu IS. Show Formulas


....J TfiKe [).r,pendenu ....! Error Checklfl9 -
n
En'>
Walch
r.;. RetnO\IeArrows ' I MIU~eFQfJTlula V<..-
~ fOlmu~ ....udrllng
Trace Dependents
To show arrows that indICate whICh cells depend on a selet:ted cell, e~ecute the followtng steps

1 Select cell C 12

2 On the Formulas tab, 11 the Formula Auditing group click Trace Dependents

i::" TrKe Prec:edenb QI Show Formulas ~


t T'~denIS " . Error Checking
lo J
Walch
~R Arrows @ Evalu;ne Formula Window
formula Audrtlng

cu

A B c o E
1
2
Day out Boat trip
1
4 De scription Am o unt
5 Boat rent S 400.00
6 Boat fuel S 33.00
7 Ufe vests S 20.00

, Picn ic
Dinner
S 68.00
S 240.00
10 Total cost S 761.00
11
12
13
Group size
Cost per person
!
S 96.00

14

As expected the Cost per person depends on the Group sIZe


Show Formulas
By defauH, Excel shows the results of formulas To show the formulas instead of their results , execute the following

""'"
1 On the Formulas tab, In the Formula Auditing group, click Show Formulas

i~~ Trace: PfK~f:nts "Show~rmulas


~J Trace: Df:p"nd~nts ...., Error Klcing W
Watch
~ Rf:movf:Arr0W5 @ Evaluat~ Formula Window
Formula Auditing

ResuH_

F24
,. A B c o
1
2
Day out - Boat trip
3

,
4 Description
Boat rent
Amo unt
400
6 BOilt fuel 33
7 U fe vest5 20

,
8 Picnic
Dinner
68
24<)
10 Total cost -=5UM(C5:C9)
11
12 Group size 8
13 Cost per person =ROUNDUP(C10/Cl2.0
14

Note instead of clicking Show Formulas, you can also press CTRl + C) You can find thIS key above the tab key
Error Checking
To check for common errors that occur III formulas, execute the followlng steps

Enter the value 0 11110 eel GI2

C13 =ROUNOUP(ClO/C12.0j

1
A
c o E

,
2
Day out - Boat trip
4 DeK riptio n Amount
5 80at rent S 400.00


7
80at fue l
Life vests
S 33.00
S 20.00

, Ph;nic
Dinner
S ".00
S 240.00
10 Total cost S 761.00
11
12 Group slzl! o
13 Cost per person ~, !fDlv/o! 1
14

2 On the Formulas tab, 11 the Formula Auditing group, click Error Check.ng

&:"TIK~ Precedetlts Qi Show Formulas W


"~ TrKt~ts ..I , ErrCK!;lChKl<lng
Watch
1'>. R _ AAOW$ @Evalu f: fDmlula Window
fo/mull Auditing

Resull E)(cel fnis iW1 error 11 eel C13 The forrTUa Ines to drvlde a runber by 0
Resutt. Excel finds an error in cell C13 The formula tries to divide a number by 0

Error ChKking 7 x
Error In <ell e 13
- RQUtmUp(C1 01el2,0I
I: I1!!.e on this error I
Divide by Zero ErrOl Show .calculalion StepI ...

The formula or function uled II dividing by


lerO or empty <elli. !gnore f rror

Edit in Eormula Bar

Qptionl .. frmoul

Evaluate Formula
To debug a formula by evaluatrng each part of the formula rndivldually, execute the following steps

1 Select cell C 13

2. On the Formulas tab. rn the Formula Atxlitrng group, click Evaluate Formula.

o. TriKt PrK~tnts
;t;"
'<t Tract Otptndl!nts
""
'rM Show FOl1Tlulal
....t Error ChKk.ing W
Watch
l'X RemoveAff0W5 mEvaluatt~ormula Window
Formula AUdrlinr'
3 Chck Evaluate four tunes

Ev.luate Formula I X
! d erenu: f!llu. lion:
ShHt1!SCSIl ~ [R0UtmUP(QWCI2.OI
I
Evalu.te Formul. I X
!derence: E! . luatJon:
ShHtt !SO 11 - [R0UNOUP{76IIQZ.OI
I
Ev.luate Formul. I X

.
To !dtrenct:
ShHtt !SOI3
E!.luaIJon:
- IROUtlOUPlliUl.CI

Ev.luate Formul. I X
- To ,
!derence:
5hfti:t !SCSIl

- To I I

L-
To Ihowthe result of the underlined e~prtulon, dick E'i'llu.tf. The mOII/Hent /esult
.ppurl italicized.

....IUlt~ ~Iole
Excel shows the formula fesutt.

1 x
BdfUntf: fIaluallon:
SheetI !SCS13


To showlhf ffSUIl 01 thf underlined eJq)feuiol\ did: EY.luate. The most fUfnt ffSUIl
appears illJidzed.

I RciiO
Floating Point Errors
Excel stores and cak::ulates /loatlllg point numbers Sometimes , the resutt of a formula is a very close approximation

For example, take a look at the formulas below At first glance, everything looks alrghL

C8 {z =A8-B8

A B C 0 E F G H
1 1.' 1.7 0.2
2
3 ..,
1.3 1.2
5.7
0.1

..,
3.2
4 '.5 I.'
5 7.' 5.5 2.1
4.1 2.5 I..
7 3.7 3.1

, 1.2 1.11 0.11



2 However, if we show 16 decimal places , we can see that one resuR is a very close approximation.


C8

A B C
'" =A8-B8

0 E f G H
1 1.' 1.7 0 ,2000000000000000
2
3
4
..,
1.3

' .5
1.2 0, 1000000000000000
5.7 3,2000000000000000
I.. ' .900000000000000
5 7.' 5.5 2,1000000000000000
7 4.1 2.5 1.600000000000000
3.7 3,1000000000000000
1.110, 09999999999999991
,
B 1.2

You don't have to worry about fIoallng point errors They are rare

3. Even if your worksheet Contains a fIoallng point error, in most cases . this causes no problems However, if you
compare the value In cell C8 wllh another value. the follclWlng problem can occur


DB
'"
=IF(C8>:::(I.1, ~yes~, ~no" )

A B C 0 E f G H
1 1.' 1.7 0 .2 yes
2
3
4
..,
1.3

' .5
1.2
5.7
I..
0.1 yes
3.2 yes
6.9 yes
5 7.' 5.5 2.1 yes

7 4.1 2.5 1.6 yes

3. 7 3.1 :tes
I
:1 1.2 1.1 o.l lna

4 Use the ROUND funcllon to fIX thIS

08 f,- :1 F( ROU ND(CS, l =O.l, "yes","noK)

A 8 C 0 , , G H
1 1.' 1.7 0.2 yes

,
2 1.3
8.'
1.2
5.7
0.1 yes
3.2 yes
4 8.5 1.6 6.9 yes
5 7.6 5.5 2.1 yes
6 4.1 2.5 1.6 yes
7 6.8 ' .7 3.1 ~es
81
, 1.2 1.1 o.l lyes
I
Array Formulas
Without Array Formula I With Array Formula I F9 Key

This chapter helps you uroderstand anay formulas in Excel Single cell array formulas perform multJpIe cak:ulations in
ooecell_

Without Array Formula


Without using an array formula, we woukl execute the foilowlrlQ steps to fJlld the greatest progress

I . First, we woukl cak:ulate the progress of each student

02 f. :(2-82

1 Student
A
TestA
C
Test B
0
prollress
E F G H

2 Jaso n
" ,.1 19 1

3 lisa 34 67 33
4 Rya n 30 93 63
5 Richard 35 83 48
82
6 Anna
7
" 13
2 Next. we would use the MAX function to find the greatest progres s r:.1
07 f. =MAX(02:06)

A
C 0 , F G H
1 Student TestA Test 8 Progress

, Uu
2 Jason
" 78 19

,.
.
"
34 67
Rya n
4
" "
,5 Richard
Anna " "
7 " 82
I
13
,,!
8

With Array Formula


We dofl', need to store the range ifl coUm D Excel coo store It1Is range Jl!lS mefl'lOfY A range stored Jl Excel's

mefl'lOfY IS called 00 array conslarlt

, We . .eactv know that we can find the progress 01 the fIrSt stuclefll by uslOQ the formula below

E1 f. =C2-8 2

A
C 0 , F G H
1 Student TestA Test 8 191

,2 Jaso n
" 78
Lisa
4 Ryan ,.
34 67

"
,5 Richard
Anna " "
7 " 82
2 To find the greatest progress (don't be overwhelmed), we add the MAX functIOn, replace C2 wrth C2C6 and 82
woth 82 B6

X f. "'MAX(C2;C6- B2;86~
COUNTIF

A B
'"
C 0 E F G H
1 Stud ent Test A Test 8 ::MAXI C2 :~6-B2: B6 )

2 Jason
3 U,. "
34
78
67

,
4 Ryan
Rich ard
30
"
Anna " B3

7
" 82

3 Fnsh by pressng CTRl" SHIFT " ENTER

E1 f. {:MAX(C2;C6-B2:B6) t

A B C 0 E F G H
1 Stud ent Tes tA Test B 63 1
2 Jason

3 U" "
34
78
67

,
4 Rya n
Ri chard
30
"
""
B3


7
Anna 82

Note The fornUa bar Ifldicales that this IS an i1ffW<I iomUa by enclosng " If\ cUf~ braces 0 Do not type these
yOUf'SeW They WlI disappear when you edit the fornUa

8cplao:\abon The range (array constant) is stored If\ Excel's memory not If\ a range The array constant looks as
,-..
(19,33,63,48,I3)

ThIS array constant IS used as an argument for the MAX fooctJon, grvng a result 0163
F9 Key
When Working wJ!h array formulas, you can have a look at these array constants yourself

Select C2 C6-82 B6 III the formula

COUNTlF X ." f :MAX( C2:C6- B2:B61

A
C 0 , f G H
loMAXlc,,,
,1 Student
Jason

TestA

"
Test B
78

3 U,. 34 67
Ryan
4
'" "
, Anna
5 Richard 35

"
83
82

7

2 Press F9

COUNlIF X ." f,. :MAXU19;33;63;48;Un

A
C 0 , f G H

, Jason I
1 Student TestA Test B 11;48;13})

3 Usa "
34
78
67
Ryan
4 30
"83
, Anna
5 Richard 35

" 82
7

That looks good Elements III a vertJC.aI array constant are separated by sen.:oIons Elements III a horizontal array
constant. are separated by corrmas
Count Errors
ThIS example show's you how to create an array formula that counts the number of errors in a range

1 We use the IF function and the ISERROR function to check for an error

05 f- =IF(ISERROR(A l ),l , "~)

, A
If REF!
C
2 IfDlV/O!
0 E F G H

2 4 7 2
3 5 3 " IfNAME?
4
,I
~1 '-------',.
Explanation: the IF functlon returns " if an error IS found If not, rt returns an empty string

2 To count the errors (don't be overwhelmed). we add the COUNT funcllon and replace AI wrth A1C3

SUMIF x =COUNT( IF( ISERROR(AI :(3),1, "~ ) )I

oC~"F~!-"--cB~-o
, " ,.. , ,"
=OIO~O/O~!Cf--co<------,E--____"F__-"__cG~~__cH
, -____-"___

', 1 45 73 " IfNAME?2



51 I =COUNT(IF (ISERROR( A1:C3),1,M"))
6J

3 Finish by presSing CTRL + SHIFT + ENTER

05 /z (=COUNT(IF(ISERROR(A1:C3),1, U)))

o
, A B
, C E F G H

, IfREF !

5 ,
IfDIV/O!

, 7
3 " IfNAME?

5 1 ,I
'-------'.
6j

Note The formula bar Indicates that thIS IS an array formula by enclosing rt In curly braces 0 Do not type these
yourself They will disappear when you edit the formula

Explanation The range (array constant) created by the IF function is stored In Excers memory, not in a range The
array constant looks as follows

{1,-, 1,-,-,-;-,-, 1)

ThIS array constant IS used as an argument for the COUNT functlon, gIVIng a resutt of 3

4 To count specifIC errors, use the COUNTIF functlon For example, to count the number of cells that contain the
4 To count specifIC errors , use the COUNTIF function For example, to count the number of cells that contain the
#DIV/o! error

=COUNTI F( Al:C3, ~#DIV /01 ")


05

A B C
'" 0 E F G H
1 If REF! 2 #D IV/O!
2
l ,
4 7

l IfNAME?
2

:I
Count Unique Values
Thts 6ampie shows you how to create an array formula that counts UOIqIJe values

1 We use the COUNTl F function. For example. to clUll the number of Ss, use the folowlng function


C3
'" =COUNTlF(Al:A6.S)

, A
7
C 0 E F G H

,2 ,un
moon ,I

4 5
5 7
6 7
7
2 To count the unIQue values (don't be overwhelmed), we add the SUM function, I I, and replace 5 with Al:A6

COUNTIF x =SUMjl/COUNTIF jAl:A6, Al:A6))1 F


A

, C o E F G H
1 7
2 sun

!~moon 5
I",S UMjl/COUNTIF (Al:A6,Al:A6 ))

5 7
6 7

71
3 Finish by pressing CTRl + SHIFT + ENTER

C3 f,. {=SUM( l/COUNTIF{ A1:A6,Al :A6))1

A , C 0 E F G H
1 7
2
3
'""
moon 41
4 5

5 7
6 7
7

Note The formula bar Indicates that thIS IS an array formula by enclosing rt In curly braces {} Do not type these
yourself They will disappear when you edrt the formula_

Explanation The range (array constant) created by the COUNTIF function IS stored in Excers memory, not in a
range The array constant looks as follows

{3;1 ,U ;3;3} - (three Ts , one sun, one moon, one 5, three Ts , three Ts)

ThIS reduces to
{1/3,1/1 ,1/1 ,1/1 ,1/3,1/3}

ThIS array constant IS used as an ar umentfor the SUM funcllon, glVl a resuH of 1/3+ 1+ 1+ 1+ 1/3+ 1/3 = 4
Count with Or Criteria
Counting with Or crrteria In Excel can be tricky This article shows several easy to follow examples

1 We start simple For example, we want to count the number of cells that contain Google or Facebook (one
column)

A10 =COUNTIF( ALAS, ~Google"l+couNTIF( Al :A8, ~F acebook~1

A B c o E F G H
1 Go()sle
2 Facebook
3 Twitter

,
4 Facebook

, Goo Ie
Twitter
7 Goo Ie

,
B Twitter

10 If - _----",!
nl
2a However, If we w ant to count the number of rows that contain Google:2( Stanford (two columns), we cannot
simply use the COUNTlF function twice (see the picture below) Rows that contain Google and Stanford are counted
twice, but they should only be counted once 4 IS the answer we are looiling for

.,0
A ,,

1 GoolI:le IStanford
=COUNTJF( Al :A8, ~Googl e")+COUNTJF(91:98, "Stanford ft )

C 0 , F G H

2 Facebook Harvard
3 Twitter IStanford
4 Facebook Columbia

,
5 GooRle
Twitter
Harvard
Harvard
7 Goo Ie Stanford

,
8 Twitter Harvard

10
11
I ,I

2b What we need IS an array formula_We use the IF funcllon to check If Google:2( Stanford occurs

.,0 =JF((A l =~Google"J+( Bl ="Stan ford"l, l ,OI

A 8 C 0 , F G H
1 Google Stanford
2 Facebook Harvard
3 Twitter Stanf ord
4 Facebook Columbia

,
5 Google
Twitter
Harvard
Harvard
7 Google Stanford

,
8 Twitter Harvard

10
11
I 11

ExplanatlOll TRUE =I , FALSE =0 For rfloN " the IF func::tlOll evaluates to IF(TRUE+TRUE, 1,0), IF(2,I ,O), 1 So the
first rfloN will be counted For rfloN 2, the IF furx:1Ion evaluates to IF(FALSE+FALSE ,I,O), IF(O,I,O), 0 So the second
rfloN will not be counted For rfloN 3, the IF furx:1Ion ev aluates to IF(FALSE+TRUE . l,O), IF(I, 1 ,0), 1 So the third rrm
WII be counted, etc

2c AI we reed IS a SUM foocllon that counts these I's To achieve this (donl be overwhelmed), we add the SUM
foocllon and replace AI wlthAl.A8 and Bl wrth Bl B8

COUNTIF

1 Google
A
Stanford
c D E F G H

2 Facebook Harvard
3 Twitter Stanford
4 Facebook Columbia
5 Google Harvard
6 Twitter Harvard
7 Google Stanford
Harvard
: j TWltter
10 I=SUM( IF( (~1:A8="GoogleM )+( 81: B8=MStanford" ),l ,O))
11

2d FInISh by pressng CTRL + SHIFT + ENTER


810 {=SUM(IFA l :AS=~Google~)+iBl:.88=~Stanford" l , l .OIJ.

A 8 C 0 E F G H
1 Goo~le Stanford I
,
2 Facebook Harvard
Twitt er Stanford
4 facebook Columb ia
5 Gool{l e Harvard I
6 Twitter Harvard
7 Goo Ie Stanford

,
8 Twitter Harvard

10 41

11 1

Note The formula bar Indicates that thIS IS an array formula by encioslrlQ rt in curly braces {} Do IlOI type these
yourself They will disappear when you ed~ the formula

Explanation. The rarge (array constant) created by the IF functlOll IS stored In Excefs memory. not In a rarge The
array constant looks as follows

{I ,O; 1,0,1,0; t ,O}

ThIS array constant IS used as an argument for the SUM funclJon, gIVing a result of 4

3. We can go one step further For example, we want to count the number of rows that contain (Google and Stanford)
Q[ Columbia

ClO' {=SUM{IF(IA l :A8=Google ") (B l : 88="Stanford~I +(8 1 :B8="COIumbla "J,l, O)}1

A 8 C 0 E F G H
1 Google Stanford I
2 Facebook Harvilrd
3 Twitter Stanford
4 Facebook Co lumbia
5 Googl e Harvard
6 Twitter Harvard
7 Goo I. Stanford
Sum Every nth Row
This example shows you how to create an array formula that sums every nth ffloN In Excel We will show rt for n = 3,
but you can do this for any number

1. The ROW function returns the rem number of a cell

., ,. =ROW(A l )

1
A
701
11
C D E F G H


,
2 74
5 ,
2

4 4 4
5
6
"66 5
6
7 88 7

,
8 52
21 ,
8

10
2 The MOD fur.c:tlOn gIVes the remalrder of a dIVISIOn For example, for the first ruw, MOO(I ,3) equals " 1 IS divided
by 3 (0 tunes) to gIVe a remairxlef of 1 For the third ruw, MOO(3,3) equals 0 3 IS dIVided by 3 (eKoctJy 1 tune) to gIVe
a remalrxlef of 0 As a result. the formula returns 0 for every 3th ruw

81 f. :MOD(ROW(AI).3}

A 8 C 0 E F G H
1 701 1!

,2 74
5
2


5 1

7
..
"
sa
2


1
8
" 2

,. 21

Note change the 3 to 4 to sum every 4th ruw, to 5 to sum every 5th ruw, etc

3 SllQhtly change the formula as shown below

81 f. "'MOD( ROW( AI}.3}:()

A 8 C 0 E F G H
1 701 FALSE

I
,
2 7.
5
FALSE
TRUE
5
."
FALSE
FALSE


7 sa
TRUE
FALSE
8 FALSE
"
,. 21 TRUE
4 To get the sum of the product of these two ranges (FAlS E=O, TRUE= I), use the SUM /uoction and finish by
presSing CTRl + SHIFT + ENTER

All (=SUM(A l :A9*(MOO(ROW(Al :A9),3)=O)))

A , c o , F G H
1 70
2 7.
3 ,

,
"66
6
7 88
,,
"
21

1O f---::1
11 L_-,'~2~.
121
Note. The formula bar indicates that this is an array formula by eoclosing ~ in curly braces 0 Do not type these
yourseH They will disappear when you ed~ the formula.

Explanation. The product of these two ranges (array constant) IS stored in Excel's memory, not in a range The array
constant looks as follows

{O:O:5:0:0:66;O:O:21}

ThIS array constant is used as an argument for the SUM fuoclK>n, gIVing a resuH of92.
Sum Largest Numbers
ThIS example shows you how to create an array formula that sums the largest numbers In a range

We use the LARGE functIOn For example, to find the second to largest number, use the followlrog functIOn


C1

A B C
'" 0
=lARGE(Al:All,2)

E F G H
1 s 101

2 1
3 6
4 4
S 2
6 3
7 10

,
8 8
22
10 3
11 S
12
2. To sum the 4 largest numbers (don't be overwhelmed), add the SUM function and replace 2 wllh {I ,2,3,4}

SUM1F -=SUM( LARGE(Al ;A11,{l,2,3,4}) 1

1
A
S
C D E
I-=S UM(LAf\.GE(Al;Al1,{l,2, 3,4}))
F G H

2 1
3 6
4 4
S 2
6 3
7 10

,
8 8
22
10 3
11 5

12

3. Finish by presSing CTRl + SHIFT + ENTER

C1 I- I -=SUM( LARGE(A l ;A11,{l,2,3,4))) I

1
A
s
C
46 1
D E F G H


2 1
3 6
4 4
5 2
6 3
7 10

,
8 8
22
10 3
11 S
12
Note The formula bar IndICates that thIS IS an array formula by enclosu'lg ~ In curly braces 0 Do not type these
yourseH They Will dISappear when you ed~ the formula

ExplanatIOn The range (array constant) created by the LARGE functlOrllS stored II'! Excefs memory, not II'! a range
The array constant looks as follows

(22.10,8,6)

ThIs array constant IS used as an argunent for the SUM fI.n::bon, QlYI'IQ a result of 46
Sum Range with Errors
Thts exa~ shows you how to create an array formula thai SI.lfT1S a range wlltl errors Yoo can also use the
(
AGGREGATE funcbOn to sum a range wllh errors

1 We use the IFERROR funcbon to check lor a \ error

., Is :IFERROR(Al,O)

1
A
IfREF I
c o E F G H

,
2 5
4
4 "OIV/O!

,
5 "NAME?

7 ,
1

' pI
10
Explanatton the IFERROR fuoction returns 0, if an error IS found_ If not, ~ returns the value of the cell

2 To sum the range with errors (don't be overwhelmed), we add the SUM fuoction and replace AI wrth Al:A7

SUMIF x ~UM(IFERROR ( Al:A 7,0) ~

1{
A
IfREF !
c D E F G H

~ 1. !
4 "OIV/ O!
51'"NAME?
'j 1
7 3

: f=SUM(IFE~ROR(Al:A7.0))
IO j
3_ FinISh by presSing CTRL + SHIFT + ENTER

{=SUM{ IFERROR(Al :A7,0) II


A9

A
C
" D E F G H
1
2
"REF !
,
3 4

,
4 "OIV/ O!

, "NAME?
1
7 3

, I nl
IO j
Note The formula bar Indicates that thIS IS an array formula by eocioslng ~ in curly braces {} Do not type these
yourself They wiH disappear when you edrt the formula
Note The formula bar IOOlCates that thIS IS an array formula by enclosng n III CUlly braces 0 Do not type these
yourself They will disappear when you edit the formula

Explanation The I"aI)ge (array constant) created by the IFERROR funcbon IS stored III Excel's memory. not III a
range The 00<11 constant 100II5 as follows

(O.5,4.0.0.1.3)

TtMs M"'f ConstanllS used as iIIl ~ for the SUM fmcbon. IJlllrog a result 0113

7/11 Completed! Learn much more about array formulas>


Back to Top St.m Range WIth EIlOfS I Go to Next Chapter Sort
Sum with Or Criteria
Sumrmrog with Or crrteria In Excel c an be tricky This article shows several easy to follow examples

1 We start Simple. For ex ample, we want to sum the cells that meet the following crrteria_ Google Q( Facebook (one
crrten1l range).

.,0 =5UMIF(A l :A8, ~Google ,81:B8)+SUMIF(Al :A8, "F acebook~, Bl:B8)

A r c 0 E F G H I
1 Goo Ie
2 Facebook ,3

3 Twitter
,2

,
4 Facebook
Goo Ie 4
6 Twiner 3
7 Goo Ie 1

,8 Tw itter 1

~~J
2a. However, if we wan! to sum the cells that meet the following criteria Google Q( Stanford (two crrteria ranges), we
cannot simply use the SUMIF function twice (see the picture below) Cells that meet the crrteriil Google and Stanford
are added twICe, but they shoukl only be added once 10 IS the answer we are Iool<lng for

Cl. =-SUM IF( A1:A8, ~Google" ,C1:C8)+SUMIF( 61:68, ~Stanford~ ,C1:C8)

1
A
Goo Ie
B
Stanford
C
, 0
6
E F G H

2 Facebook Harvard 5
3 Tw itter IStanford 2 2
4 Facebook Columbia 5
5
6
Goo Ie
Twitter
Harvard
Harvard ,
4 4

7 Goo Ie Stanford 1 2

,
B Twitter Harvard 1
Ii
I. 141
II

2b. We need an array formula We use the IF function to check if Google Q( Stanford occurs

Cl . =IF((A1=-"Google")+{61="Stanford"),1,O)C1

1 Google
A B
Stanford
C
, 0 E F G H

2 Facebook Harvard 5
3 Twitter Stanford 2
4 Facebook Columbia 5
5
6
Google
Twitter
Harvard
Harvard ,
4

7 Google Stanford 1

,
B Tw itter Harvard 1

I. ,I
11

Explanation TRUE = " FALSE = For r(JoN I , the IF functlOll ev aluates to IF(TRUE+TRUE ,I ,O)'3, IF(2,I ,O)'3, 3.
So the value 3 will be added. For r(JoN 2, the IF function ev aluates to IF(FALSE +FALSE, 1,0),5, IF(O,I ,0)'5, So the
value 5 will not be added For r(JoN 3, the IF function evaluates to IF(FALSE +TRUE ,I,0)'2, IF(I ,I ,0)'2, 2 So the
value 2 will be added, etc

2c. All we need IS a SUM functlOll that sums these v alues. To achieve thiS (don't be overwhelmed), we add the SUM
function and replace AI with A I .A8, Bl wrth Bl.B8 and Cl with Cl.C8

COUNnF =SUM(IF ( ( Al :A8:"GOogle~ ) +( 61:S8=MStanford" J , 1,OJ Cl :C8 )1

A B c o E F G H
1 Google Stanford 3
2 Facebook Harvard 5
3 Twitter Stanfo rd 2
4 Facebook Columbia 5
5 Google Harvard 4
6 Tw itter Harvard 3
7 Google Stanford 1
B Twitter Harvard 1

:o(
11
.
I=SUM(IF(( Al:A8= " Google )+( 61:88=. Stanford " ),1,0)C1:C8j

2d Finish by pressing CTRL + SHIFT + ENTER


CI0

A B C 0 E F G H
1 Goo Ie Stanford 3
2 Facebook Harvard 5
3 Twitter Stanford 21
4 Facebook Columbia 5
5 Goo Ie Harvard 4
6 Twitter Harvard 3
7 Goo Ie Stanford 11

,
B Twitter Harvard 1

10 101

11

Note The formula bar indicates that this is an array formula by enclosing d in curly braces 0 Do not type these
yourself They will dis appear when you edd the formula.

Explanation The range (array constant) created by the IF fuoction is stored In Excers memory. not in a range The
array constant looks as follows

{I ;0:1;0:1;0:1;0)

mU~lplied by CI.CS thIS yields

{3;O;2;O;4;O;I:0}

ThIS latter array constant is used as an argument for the SUM function, givlrog a resutt of 10

3 We c an go one step further For example, we want to sum the cells that meet the foilowll"IQ criteria. (Google iIDd
Stanford) Q[ Columbia.
CI0 ... I =SUM! I F( (A l:A8=~Google"j( Bl:IJ8="Stanford ft j+(81:B8="Columbia"), 1,0) .C1:C8j}

A B C 0 E F G H
1 Goo Ie Stanford 3
2 Facebook Harvard 5
3 Tw itter Stanford 2
4 Facebook Columbia 5
5 Google Harvard 4
6 Tw itter Harvard 3
7 Goo Ie Stanford 1

,
B Tw itter Harvard 1

10 ,I
11

Two-column Lookup
ThIS example teaches you how to perform a two-column lookup In Excel See the example below 'We want to look
up the s alary of James Clarll , not James Smith, oot James Anderson

1 To join strings , use the & operator

F4 f,. =F2 &F3

A

1 First Name Last Name Salary
C D E F G H

2 James Smith 564.901 First Name James


3 James Anderson $70,855 last Nilme Clark
4 Jam es Clark $188,657 Salary IJamesC la rk I

5 John Lew i s $97,566
6 John Wa lker $58,339
7 Mark Reed $125,180

,Richard Lopez $91,632


2 The MATCH function returns the poslllon of a value In a gIVen range Insert the MATCH functIOn shown below

3 FinISh by presSing CTRL + SHIFT + ENTER

'4 {=MATCH{F2&F3,A2:A8&B2:88,O).

A B c o E , G H
1 FIrst Name Last Name Salary

,2 James
James
Smit h
Ande~on
564,901
$70,&55
F i~t Name James
Last Name rCel~''''
~_---:1
4 James Cl ark $188,657 salary LI_ _ _ - '3!
5 John Le wis $97,566
6 John Walker 558, 339
7 Mark Reed $125,180

,
8 Richard l o pez $91,632

NOIe The fomJ.JIa bar indicates that tIvs IS an array fomua by eocloslOQ A In curly braces 0 Do I'IO! type these
yourself They wil disappear when you edit the formula

E~planauon The range (array constant) A2AS&B2 BS IS stored In E~cel's memory, I'IO! In a range The array
constant looks as follows

r JamesSITHIh" "J amesAndersoo";"JamesClark";"JohnlewlS" JohnWalker" "MarkReed","RichardLopez1


This array constant IS used as an argument for the MATCH functlOrl, QlVII"IQ a result r:A 3 (JamesClark found at
posItIOn 3)

4 Use thts resutt and the INDEX foocbon to retOOl the 3rd value In the range C2 C8
4 Use thIS resuH and the INDEX function to return the 3rd value In the range C2:C8

F4 I- {=INDEX(C2:CS,MATCH(F2&F3,A2:A8&S2:B8,O}}}

1
A

first Name Last Name salary
C 0 E F G H

2 James Smith $64,901 First Name James


3 James Ande rson $70,855 Last Name Cl ark
4 James Clar k $188,657 salary I 5188,6571

5 John Lewis $97,566
6 John Walker $58,339
7 Mark Reed $125,180

, Richard Lopez $91,632


Most Frequently Occurring Word
This example teaches you how to fwod the most frequently occurring word in Excel

You c an use the MODE function to find the most frequently occurring number However, the MODE function only
worlls with numbers

C3 ~ :c.MOD(Al:A7)

A B C o , F G H
1 12
2 16
3 16
4 16
5 11
6 11
7 16
8
You can use the COUNTIF function to count the number of occurrences of each word However, we are Iooklrg for
F
a Single formula that returns the most frequently OCCUrring word (circle in our e xample)

02 :COUNTIF(SA$1:SA$7,C2) I
A B ( o E F G H
1 !triangle
2 circl e triangle
3 circl e circl e
4 circl e square
5 square
6 square
7 circl e
8

To find the most frequently occumng word, execute the following steps

The MATCH function returns the position of a ~alue in a gIVen range

(3 ~ :MATC H(A7,A l :A7,O)

A B ( o E F G H
1 ~triangle
2 circl e
3 circl e ,I
4 circl e

5 square
6 square
7 circl e
8

Ex planation circle (Al) found at position 2 In the range AI.Al. Set the third argument to 0 to return an e xact match
2. To find the posruon of the most frequently occurnng word (don't be ovelWhelmed), we add the MODE functlOll and
replace A7 with A t .A 7

3 FNlISh by presstng CTRl + SHIFT + ENTER

C3 '" {=MODE(MATCH (A l:A7.A l:A7.0))}

A
C o E F G H

,,
1 triangle
circle
circl e ,!
4 circle

,
5 square
square
7 d rd e
8

N01e The forTllllla bar ndicates that this IS an arrWf fonnula by encbstng A 11"1 ctJrfy braces 0 Do not type these
yourself They will dISappear when you edit the formula

EKplanatlOll The range (array constant) created by the MATCH furx:tIOIl IS stored III EKcers memory, not III a range
The array constant looks as follows'

{1 ,2,2,2,5,5,2) _ (tnangle found at position 1, circle found at posAIOIl 2, circle found at posItIOn 2, etc )

Thrs array constant IS used as an argument for the MODE functIOn, glVtng a result of 2 (the posttlOl1 of the most
frequently occurmg word)

4 Use this result and the INDEX functIOn to return the 2nd word 11 the range At A7, the most frequently occurmg
_d
4 Use thIS resutt aOO the INDEX functton to return the 200 word In the range AlA7, the most frequently occurnng
word_

C3 /z 1=INDEX(Al:A7,MODE(MATCH(Al:A7,Al:A7,OJ))}

A B c o E F G H
1 1trianSIe
2 circl e
3 circl e !circl e 1
4 circl e
5 square
6 square
7 circl e
8
System of Linear Equations
ThIs e ...mpIe shows you how to solve a system of ineilr equatJOOS III Excel For e.ilmpIe, we have the folowmg
system of linear equa\1OIlS

5. .. ly .. 8z = 46
4x-2y =12
ax+7y+4z=50

In matrIX notation. this can be wntten as AX = B

If A-I (the InVerse of A) eXISts we can multiply both sides by A-I to obtain X = A-'S To solve ttvs system of !rear
equatIOnS III Excel. exec::l)I:e the folowng steps
1 Use the MINVERSE fuoction to return the inverse matnx of A. First. select the range 86:08 Next. insert the
MINVERSE fuoctlOll shown below. Finish by presSing CTRL + SHIFT + ENTER

., I- {=MI NVERSE( 82:04) I

1
A
C 0 E F G H J

,
2 5 1 8


46

4
A
,
4 2
7
0
4
12
50

,5
-0.0303 0.197 0.0606
7 A" 0.0606 .0.1061 0.1212

,
8 0.1515 -0.1098 -0.053

Note the formula bar Indicates that the cells contain an array formula. Therefore. you cannot delete a Single resuR.
To delete the results . select the range 86.08 and press Delete

2. Use the MMULT fuoctlOll to return the product of matnx A-I and 8 First. select the range G6G8 Next. Insert the
MMULT fuoction shown below Finish by pressing CTRL + SHIFT + ENTER

G' I- {=MMULT(86:D8,G2:G4)}

1
A
C 0 E F G H J

,
2 5 1 8


46

4
A
,
4 2
7
0
4
12
50

,5

EB
-0.0303 0.197 0.0606
7 A" -0.0606 -0. 1061 0.1212 X

,
8 0 .1515 -0. 1098 -0 .053
3. Put rt all together First, select the range G6-GB Next, Insert the formula shown below Finish by presSing CTRL +
SHIFT + ENTER

G' f. {:MMUlTfMINVERSEfB1:04),G1:G4)}

A B C 0 E f G H J
1

,
2 5 1 B 46

4
A
,
4 -2
7
0
4
B 12
50

,
5

,
B
Sort
Ooe Column I MuIhpIe CoIoovts

You can son your Excel data on one column or multiple columns You can sort II'! 3SCenoXig or descending order

One Column
To sort on one colurm. execute the fot:wmg steps

1 Click any celr! the coUm you want 10 sort

A
1 Ulst Name sales
C 0
Country Quarter
E

2 Smith $16,753.00 UK Qtr3


3 Johnson $14,808.00 USA Otr4
5 Jones
WllHams $10,644.00 UK Qtr2

, Brown
$1,390.00 USA
$4,865.00 USA
Qtr3
Otr4
7 Williams $12.438.00 UK Qtr 1

,
8 Johnson
Smith
$9,339.00 UK
$18,919.00 USA
Qtr2
Qtr3
10 Jones $9, 213.00 USA Otr4
11 Jones $7,433.00 UK Otr1
12 Brown $3,255.00 USA Qtr 2
13 WIlliams $14,867.00 USA Qtr 3
Williams $19,302.00 UK Otr4
"
15 Smith $9.698.00 USA Qtr 1
16
2 To sort in ascending order. on the Data tab, in the Sort 8. Finer group. click AL

!l1mJ T ""::Cleal
~~Reapp'"
Ul:;i Sort Filter
,.,. Advanced
Sort & Flttfl

Resun:

A
0 C ,
t lu st Name Sale s Country Quarter
2 Brown $4,865.00 USA Qtr4
Brown
$3, 255.00 USA Qtrl
3
Johnson $14,808.00 USA Qtr4

,5 Johnson
Jones
$9, 339.00 UK Qtrl
$1, 390.00 USA Qtr 3
7 Jones $9, 213.00 USA Qtr4

,
8 Jones
Smith
$7.433.00 UK
$16, 753.00 UK
Qtr 1
QU3
10 Smith $18,919.00 USA Qtr 3
11 Smith $9,698.00 USA Qut
12 Williams $10,644.00 UK Qtrl

,.
13 Williams
Williams
$12,438.00
$14,867.00
UK
USA
Qtr 1
Qtr 3
15 Williams $19, 302.00 UK QU'

"
Note to sort in descending order, c lick ZA

Multiple Columns
To sort on multiple columns . execute the following steps
Multiple Columns
To sort on mun,ple colullVls, execute the following steps

1 On the Data tab, III the Sort & Filter group. click Sort

T T .

Sort & f ilter

The Sort dialog box appears

2 Select Lasl Name from the 'Sort by' li"op..down ~l

So. I X

+~l "dd lfWl X Qtltlt In,' ~ ",oP1 lrn l


I Qptlons ... o Myd."h's hudm
Co lumn So rt On OrOff

S,.', ~ ~ V. lues v Alo l vij


...
,

I 0' I (.nul

3 Click on Add Level

4 Select Sales from the Then by' drop.down ~l


4 Se~t Sales from the 'Then by' drop-down lisL

Sort I X

+~l !dd Lrvel X Qelete Lrvel I!Bi ~op~ Lrvel I- Qptions... (;21 My data has headers

(olumn Sort On Order


Sort by Last Name v Valuu
--
v Ato Z Iv
Th~n b~
Q IValues v l Ata z [vi
I\illi:
"'
I OK I (,1,,<el

5. Click OK.

Resutt. Records are sorted by Last Name first and Sales second

A 8 C 0 E
1 !Lnt Nilme ' Sales Country QUilrter
I $3,255.00
,
2 1srown
Brown
$4,865.00
USA
USA
Qtr2
Otr"
Johnson
5 Johnson
$9,339.00
$14,808.00
UK
USA
Otr 2
Qtr 4
6 Jones $1,390.00 USA Qtr 3
7 Jones $7,433.00 UK Qtr 1

,
8 Jones
Smith
$9,213.00
$9,698.00
USA
USA
Qtr 4
Qtr 1
10 Smith $16,753.00 UK Qtr 3
11 Smith $18,919.00 USA Otr 3
12 Will iilms $10,644.00 UK atr 2

,."Will iams
Wilililms
$12,438.00
$14,867.00
UK
USA
Qtr 1
Otr 3
15 Will iilms $19,302.00 UK Otr "
16
Sort by Color
This example teaches you how to sort data by color in Excel

A
c 0 ,
1 ltast Nam e sales Country Quarter

,
2 ISmith
Johnson
1$16,753.00 UK
514,808.00 USA
Qtrl
Q'"

5 Will
.......ms $10.644.00 UK
$1.390.00 USA
""2
Brown
7 Williams
$4,865.00 USA
512,438.00 UK
"'"
Qtr4
OUI

,
8 John....
Smith
$9,339.00 UK
$18,919.00 USA
""2
Qt"
10 Jones $9,213.00 USA Qt,.
11 Jones $7,433.00 UK Otr 1
12
"""'"
13 Williams
$3.255.00 USA
$14,867.00 USA
""2
Qt"
14 Williams $19,302.00 UK Qt,.
15 Smith ...... USA

"
1 Chck any Single cell Inside a data set

II T
.,.,
2 On the Data tab, 111 the Sort & Filter group, click Sort.

T-, Pt ~pr
l! Sort l;) Filttr
1'/Advlnc ~
Sort & f ,ltu

The Sort dialog boll appears

3 Sort by Last N;vne (or any other coUm). sort on Cel Color (you can also son on FonI Color and Cellcon), and
select the green color lor the IWsl levei.

Sort 1 X

~! 6dd l~ 1 X Qtttit Lt'ltt ~ ~opy Lt'lt l


I Qpllol'ls... 1:21 My dill his htldt ~

Column So rt On Ord tr
So rt II)' l,st N.me v Ct ll Color v
1 I- 01'1 To p v

. ~D

0' C.nt tl

4 Click 'Copy Level' two trnes and select the other colors

5 Click OK
Sort 1 X

+~l Md Lnel X Qe lf tt lnof l 1!21 ~o py Ln.l I- QptIOnl ... 1;21 My data haslln dffS

Column Sort On Ordel


Sort by US! tlame Cfll Colo. [ -=:::JI ' On Top
Then by

Then by
list N,mt

lIsl Name


Cflt COlor

ICtll Color

- ,.
I I .. On Top

On Top

0'::J.:l:! C,nCf l

R6.-

A
1 last Name Sales

Country Quarter
C 0 E

,
2 IJOhnSOn
Brown
1514,808.00

USA Qtr4
$4,865.00 USA Otr4
, Smith
Jones
$18,919.00 USA
$9,213.00 USA
Q1<'
Qtr4
6 Williams $14,867.00 USA Qtr 1
7 WIlliams $19,302.00 UK 01<4

,
8 Sm it h
Williams
$16,753.00 UK
$12,438.00 UK
Qtr 3
Qtr 1
10 Jones $7,433.00 UK Ott 1
11
,...,"- $lO.6M.OO UK 00"2
U
13

1.5
16
--
" .......
$1....... USA
$1,",.00 UK
$3.25500 USA
00"'
00"2
00"2
1
Reverse List
This artICle teaches you how to reverse a list'" Excel For example. we want to reverse the list 111 colurm A beIoY.r

1 Enter the value 1 Into eelS1 and the value 2 Into eel 82

2 Select the range 61 82, ck:k the lower nghl comer of this range and drag ~ down to eel B8

A
C 0 E f G H

,
1 E)(cel
Word ,
1

3 Ate!!!ss 3

,
4 Outlook
PowerPoint ,
4

6 OneNole 6
7 Publisher 7

,
8 lync 8
/p,l
10
3_ Click any number in the list in colulTVl B

4 To sort in descending order, on the Data tab, in the Sort & FIRer group, click ZA

~CJeal
II Iml T ~'R9pp'"
Filter
II Sort 1/Advanced
~ Sort &; Filttr

ResuR_ Not only the list in colulTVl B, but also the list In colulTVl A has been reversed

A B C 0 E F G H
1 iLync

2 1pUbilSher
3 OneNote ,
71

4 PowerPolnt 5

,
5 Outl ook 4
Access
7 Word ,
3

,
B Excel 1
Randomize List
ThIS artICle teaches you how to randomize (shuffle) a list In Excel_ For example, we w ant to randomize the Jist In

column A below

1 Select cell 81 and insert the RANDO funcllOll_

2_Click on the lower nght comer of cell 81 and drag ~ down to cell SB

.,

A
C
'" =RANOO

D E F G H
1 Access 0. 101328
2 OneNote 0.654224
3 PowerPoint 0.460646
4 Lync 0.936226
5 Excel 0.404644

Outl ook
7 Publisher
0.146986
0.769478

,Word 0.908672+
1P,1
10
3 Chck any number In the hst In column B

4 To sort 11'1 desceodJog ordel-. on the Data tab. III the Sort 80 Filter group, click ZA

!11mJ T." ':lur

Sort Filler
' .~ ~Advanc ed
Sort &. Fillfr

ResoJl A random list 11 c~ A (sorted on the random nombers above)

B2
'" : RAN [)(j

1 Lyne
A

0.052329
C 0 E f G H

2 Word I0.935622!
3 Publisher 0.540229

,
4 OneNote 0.5n751
PowerPolnt 0.898621
6 beel 0.570332
7 Outl ook 0.950664

,Access 0.656213

NOIe random numbers change every time a cell on the sheet IS calculated If you don't want thIS_ sllqlly copy the
random nt.mbers aod paste them as values
Filter
Fitter your Excel data Jfyou only want to display records that meet certain critena_

1 Click any single cellrnside a data set

2 On the Data tab, in the Sort & Finer group, c lick Fitter

T ""::Cleal
~~Rl':app'"
fllt~
Cl-l/ Advanced
Sort.9.: Filttl
Alfaws 10 the column headers appear

A , . c . 0;;r:j E
1 Last Nan '" Sales ' ... ' Count ... Qua~
2 Smit h $16,753.00 UK atr 3
3 IJohnson

I
$14,808.00 USA aU4
4 Williams $10,644.00 UK atr 2
5 Jones $1,390.00 USA au 3

Brown 54,865.00
7 Williams $12,438.00
USA
UK
au4
au1

,
8 Johnson
Smith
$9,339.00
$18,919.00
UK
USA
atr 2
atr 3
10 Jone s $9,213.00 USA aU4
11 Jones $7,43].00 UK atr 1
12 Brown $3,255.00 USA atr 2
13 Williams $14,867.00 USA atr]
14 Williams $19,]02.00 UK atr 4
15 Smith $9,698.00 USA atr 1
16

3 Cltck the arrow next to Country

4 Click on Select AI to clear all the check boxes. and click the check box re~1 to USA
t! 20ft A to Z

U ~otZloA

Sotl by Coiol
... f,ltt'l'
Tmf!lten
,--ISel/ch
--
P
~ (Select A.lq
.Q UK

!fJZl

01( Canc t l
5 ClICk OK

Resu~ Excel only dpsplays the sales 111 the USA.

A 8 ~ . 0 E
1 LastN an l 5.Jles ' .. (ount _T Qua rl:j
1 IJOhnSOn 1514,808 .00 USA Qtr 4
5 Jones 51, 390.00 USA Qtr 3

Brown $4,865.00 USA Qtr4

I. Smith
Jones
12 Brown
518,919.00 USA
59,213.00
53,255.00
USA
USA
Qtr 3
Qtr4
Qtr 2
13 Williams 514,867.00 USA Qtr 3
15 5mlth $9,698.00 USA Qtr 1
16

6 Click the arrCM ne~t to auarter

7 Click on Select An to clear an the check bo~es, and click the check bo~ next to air 4
II 2<lrt A to Z
l! 52rtltoA
Sort by Colo.
.., luilrtft

Textfllt=
I~arch p
~ (Stlecll\lq
-.[J Qtr 1
0 0lr2
-O Otr 3

B Click OK.

ResuH_ Excel only displays the s ales In the USA In Qtr 4

1
A
last Nan<;] Sales
E

3 Johnson $14,808.00 USA Qtr4


6 Brown
$4,865.00 USA Qtr4
10 Jones $9, 213.00 USA Q,,'
16

9 To remove the fiRer, on the Data tab, in the Sort 8. FiRer group, click Clear To remove the Mer and the arrows,
click Finer
9. To remove the fiRer, on the Data tab, In the Sort /l, Fi~er group, click Clear To remove the fiRer and the arrows ,
click FiRer

II ImI 'T '1:~R~p,


,,-
U Sort Filter
1/Advanct(!
Sort & Fitttr
Number and Text Filters
Number FiRer I Text FiRer

This example teaches you how to apply a number fiRer and a text fiRer to only display records that meet certain
crrtena

Click any Single cell inside a data set

2 On the Data tab, in the Sort & FiRer group, click FiRer

'T TClear
_ l{. Reapply
filter
~1} Advan(<<I
Sort &; Filter
ArrfloNS In the column headers appear
B
A
C 0 ,
1 j u s t Nan~ Sales .. Count ""
2 5mith $16.]53.00 UK Qtr3
3 IJOhnson I
$14,808.00 USA
$10,644.00
Qtr4
4 WIlHams UK Qtr2
5 Jones $l.39O.oo USA Qtr 3

Brown
7 Williams
$4,865.00 USA
512,438.00 UK
Qtr4
Qtr1

,
8 Johnson
Smith
59, 339.00 UK
518,919.00 USA
Qtr2
Qtt 3
10 Jones $9, 213.00 USA Qtr4
11 Jones 57,433.00 UK Qtr 1
12 Brown 53,255.00 USA QU2
13 Williams 514,867.00 USA Qt< 1
14 Williams $19, 302.00 UK Qtr4
15 Smith 59,698.00 USA Qtr 1

"
Number Filter
To apply a number finer. execute the following steps

3. Clic k the arrow next to Sales

4 Clic k Number Fitters (this option is availa ble beca use the Sa les column contains numeric data) and se lect Greater
Than from the list
Than from the list

II Sort Sn"lI~t to llrgest


U S:l!rt llrgHt to Smiliest
Sort by Color
1;.
F
Numw[ilten {quais...
:SU.eh p Ooes Not Equal..,

!St rtct A1Q ~rutet' TNn ...


SI,39O.00
Grutu Thin 2r qull To.
~
S3,255.00
S4,86S.00 LHs Thin ...
21 S7,~33.00
lHs TNn Or E51ull To.
elS9,2U.00
21 S9,m .00 B~Hn ...
elS9,698.00
el Sl0, 644.00 lop 10...
~ $12,418.00 Abovt Avt gt
""""~'~'~
BelJ2w Ave gt
0' I_ c.ntel J Custom [Ilttr...

5 Enter 10,(01) and click OK

Custom AutoFiItt"r ? x
Show rows wht.t:
Sattl
,II lI.nter thi n
@!nd 0 2r

Use 7 to .ep.uent any Iln\ltt mlracttr


Use' to .ep.esent any Stlies 01 malacltrl

' -oo,C --' Can<tl


ResuH. Excel only displays the records where Sales is greater than $10,000

A
C 0 ,
1 last Nan-.. I sales
2 Smith $16,753.00 UK
.
.T lcounl:;jQua~
.
Qtr 3

,
3 Johnson $14,808.00 USA
Williams $10,644.00 UK
Qtr 4
Qtr2

,
7 Williams
Smith
$12,438.00 UK
$18,919.00 USA
Qtr 1
Qtr 3
13 Williams $14,867.00 USA Qtr 3
l' Williams $19, 302.00 UK Qtr 4
16

Note you can also display records equal to a value, less than a value, between two values , the top x records ,
records that are above average, etc. The sky IS the limn!
Text Filter
To apply a text fitter, execute the following steps

3 Click the arrow next to last Name

4 Click Text Fillers (ttvs option IS available because the Last Name column coolaln5 text data) and select Equals

from the list

!l SortAtoZ

U ~rtZtoA

Soft by Color
'!;. .' tiFtOn Ix"
.~ .... '"
Teet Eill:M qu.Is. ..
c~lI(h p Does ~ot EquaL.
~
[5 flfct Alq Begins Wjth .
e1 Brown
Ends With ...
~ J ohnson
-el Jonfl Contllns ...
It! Smith
~W1!11 lms
Qoes Not (onilln ...

Custom filter ...

at: Cancf l
5 Enter ?mOand click OK

Cu~om AutoFitter ? x
Show rows where:
last Name

Fl

Use? to represent Iny single chlrlder


USf to represent Iny suies of chlrlders

~ ______________________-,::==O:'=~_____ '_'_'_<_" __-,

Note A question rrnrk (7) fllilIches exactly one character An asterisk (0) fllilIches a seres of zero or more
characters

Resutt. Excel only displays the records where the second character of Last Name equals rn

A 8 C 0 E
1 ILast Na~ ~T!Sares t:1'count::1 Quartt::]
2 Smith $16,7S3.00 UK Qtr 3
9 Smith $18,919.00 USA Qtr 3
15 Smith $9,698.00 USA Qtr 1
16

Note you can <liso display records that begin wJth a specific character. end wJth a specific character, contain or do
not contain a specific character, etc. The sky IS the limrtl
Date Filters
This example teaches you how to apply a date finer to only display records that meet certain criteria

1 Click any single cell inside a data set

2. On the Data tab, in the Sort 8. FiRer group, click Filter

'T "'f ONf

'r. RHPply
Filter
~:l/ Advanced
Sort lit F,lttf
AIrfloNS In the column headers appear

A B C 0 E
1 Last Nan~ Sates
, Smith $16, 753.00 UK 4/25/20B
3 IJohnson I
$14,808.00 USA 1/S/2016

Williams $10,644.00
5 Jones $1,390.00
UK
USA
4/B/2015
9/5/2016
6 Brown $4,865.00 USA 1/21/20B
7 Williams $12,43S.00 UK 4/6/20B

,
8 Johnson
Smith
$9,339.00
$18,919.00
UK
USA
11/14/2016
7/ 16/2014
10 lanes $9,2B.00 USA 1/26/2015
11 Jones $7,433.00 UK 11/1/2013
12 Brown $3,255.00 USA 5/1S/2015
13 Williams $14,867.00 USA 1/5/2015
Williams $19, 302.00 UK S/23/2016
"
15 Smith $9,69S.00 USA 1/17/2016
16

3_ Click the arrow next to Date

4 Click on Select All to clear all the check boxes , click the + sign next to 2015, and click the check box next to
January

~j Sort Oldest to Newest


l! 52rt Newl!$t. to Oldl!$t.
Soil by Color
~

Date filters
r - --
!Search (All)
"'.3

..

5. Click OK.

ResuR. Excel only displays the sales In 2015, In January

A 8 C D E
1 LlstNiln~Siires Gjcount.,, ] oilte .Tl
10 Jones $9,213.00 USA 1/ 26/ 2015
13 WillJilms $14,867.00 USA 1/5/2015
16

6. Click the arrow next to Date

7 Click on Select All to select all the check boxes

8 Click Date FIRers (thiS optton IS available because the Date column Contall1S dates) and select Last Month from
,
8. Chck Date FiHers (thiS option IS available because the Date column contains dates) and select Last Month from
the list

:1 2<111 Oldest to Newest


U SilI1 Newest to Oldest
Soil by Color
lX ~Iul filter From ' Date'

Date filten {quais...

Ech(Al~. idort ...


~ (Select Al ij ~fttr ...
2016
Betwe~ ..
1fl-2I 201S
if!~ 201 4 !omofTOw
1il~ 20 13
T.Qday

YHT."'fgay

Next Week
ThlsW",elc

.Last Week
OK ( anct l
Next Month
.:J
Thlj; Month
tastMonth

Next Quarter
This Quarter

last Quarter

N~Yur

Th!~ Ytat
lastYUt

Yurto Olle

All Oates in thf f.enod


Custom filter ..
ThIS Qy.rter
l.st Qu'Ite<

Nqt Vur

Thl~ Vur

List Y~lr

Vurto D11~
All Diles In Ih~ eenod
C ~tom E"ter.

Res'" Excel orIy displays the sales 01 Last rmnIh

A B C ~~D"-~__~
E___
l j t.ast Nan " . ~'es ... . Count ... Icate .T!
8 ~ JOhnSOn $9,339.00 UK 11/ 14/2016

"
Note ttvs date Mer and many othef date fitters depend on todays date
Advanced Filter
And Crrtena I Or Crrtena I Formula as Crrtena

This example teaches you how to apply an advanced fitter In Excel to only display records that meet complex
crrteria_

When you use the Advanced FiRer, you need to enter the c rrtena on the worksheet Create iI CnterJa range (blue
border below for illustratton only ) above your data set Use the same column headers Be sure there's at least ore
blank [fNI between your Crrtena range and data set

And Criteria
To display the sales in the USA and In aIr 4, execute the followll"og steps

Enter the crrteria shown below on the worksheet

A
C 0 ,
1 Lnt Name sales Country Quarter

,
2 USA Qtr4

,
5 Last Name sales
Smith $16,753.00
Country Quarter
UK Qtr 3
7 IJOhnSOn 1514,808.00 USA Qtr4
$10,644.00
,Williams
Jones 51,390.00
UK
USA
Qtr2
Qtr 3
10 Brown $4,865.00 USA Qtr4
11 Williams 512,438.00 UK Qtr 1
12 Johnson $9,339.00 UK Qtr2
13 Smith $18,919.00 USA Qtr3
14 Jones $9,213.00 USA Qtr 4
15 Jones $7.433.00 UK QU 1
16 Brown $3, 255.00 USA Qtr2
17 Williams $14,867.00 USA Qtr 3
18 Williams $19, 302.00 UK Qt<4
Smith Qtr 1
"
20
$9,698.00 USA
2_ Click any Single cell inside the data set

3 On the Data tab, in the Sort 8. Fitter group, click Adv anced

Sort
~Adv1S.Ced
Sort &; Filttr

4 Click in the Crrterra range box and select the range Al:D2 (blue)

5 Click OK_

Actvanad Filtt r I x
Action
@filterthtlist, In-platt
o C2P)' to another loutlon
l ist range:
.criteria range:

(OpyIO:

o UnlQuf !ttords only


0' Canal

NotICe the opIIons to copy your fiRered data set to another location and display unique records only (ifyoor data set
contains duplicates)_

ResuH_
A
1 last Name Sales
c
Country Quarter
0 E

2 USA Qtr 4
3
S La st Name Sa les Country Quarter
7 Johnson $14,808.00 USA Qtr4

Brow n $4,865.00 USA Otr4
" Jones
"
20
$9,213.00 USA Qtr4

No rocket sCllffiCe so far We can achieve the same result with the normal N1er We need the Advanced Filter lor Or

'"~

Or Criteria
To display the sales 111 the USA 11 air 4.or: in the UK 1'1 Otr 1 exec~e the f~ steps

6 Enter the cnlena sl'lcmn below on the worksheeL

7 On the Data tab, 11 the SorI & Filler group. tick Advanced, and ad/USt the CrJlena range to range Al OJ (blue)
8 Cltck OK
Advanad Filtf.r 1 x
Action
filler tile list, Inpl!(e
o C.Qpy t o anothe.lo(,tlon
list range:

(opyto:

o Unique !etords only


(anul

Resutt.

A B c o E
1 Ln t Name Sates Co untry Quarter
2 USA Qtr4
3:~____________~U~K__-,Q~"~'~


5 Last Name Sales Co untry Q uarter
1 Johnson J $14,808.00 USA Qtr 4
10 Brow n $4,865.00 USA Qtr 4
11 Williams $12,438.00 UK Otr!

Jones
15 lanes
$9, 213.00 USA
$7,433.00 UK
Qtr4
Qtr 1
20

Formula as Criteria
To display the s ales in the USA in Qtr 4 greater than $10000 Q[ in the UK in Qtr " execute the following steps

9. Enter the crrteria (+formuia) shown below on the woosheel.

10 On the Data tab, In the Sort /l, FiRer group, click Advanced, and adjust the Cnteria range to range A1 E3 (blue)

11 Click OK.
Adv,nctd Filttr 1 x
Action
@flltertheli!1, In_plau
o C~ to .nolhrrloution
SASS:SD S 19--~"'
!!ij
"'-
"rih rl' lange: Shnl1!SAS1 :SES3I ~I
Copylo' ' ~
o Unique rt cord! only

E2 f. =86>10000

A
C 0 , ,
1 Last Name Sales Country Quarter

,
2 USA
UK
Otr4
Otr 1
I TRUE

4
5 Last Name Sales Country Quarter
7 Johnson $14,808.00 USA Otr4
11 Williams $12,438.00 UK Otr 1
15 Jones $7,433.00 UK Otr 1
20

NOIe always place Oil forrrula In Oil new eolulTn Do not use Oil eolurm Label or use Oil eolum label that IS not In yOIJ
data set Create Oil relatrve reference to the first eel In the eolurm (88) The forll'lUliJ must evaluate to TRUE or
FAlSE
Data Form
The data form in Excel allows you to add, ed~ and delete records (rows ) and display ooly those records that meet
certain crderia_ Especially when you have wide rows arod you w ant to avOId repeated scrolling to the right and left,
the data form can be useful

Open the downloadable Excel file

A B C 0
1 ILast Name Sales Product Type Com pany Contact I

,
2 Smith
Johnson
. $1,675.00
$1,480.00
EEE-312
OC-1
Wok N Ro ll
Wok N Ro ll
Adams
Rogers
4 Williams $1,064.00 EE-2 PeacE.' A Pizza Evans
5 Jones $1,390.00 OF) Kung Food Wl'bb
6 Brown $4,865.00 EEE-45 Peace A Pizza Fields
7 Williams $1, 243.00 FO-2 Kung Food Mccoy

,
8 Johnson
Smith
$9,339.00
$1,891.00
OC-1
EEE-312
Kung Food
Wok N Ro ll
Hansen
Ham iltol
10 Jones $9,213.00 FG-5 Wok N Roll Wood,
11 Jones $7,433.00 OF7 Kung Food Cunning
12 Brown $3,255.00 FO-2 Pancakes on the Rocks Myers
A~34

" Williams
14 Williams
$1,486.00
$1,930.00 A~34
Wok N Roll
Pancakes on the Rocks
Ford
Edwards
15 Smith $9,698.00 F-3334 Peace A Pizza Murphy
16

2 Add the Form command to the QUICk Access Toolbar


3 Clic k the Form command

4 Use the Find PreY and Find Next buttons to easily swdch from one record (row) to another

S.I~ ? X
list Namf: [JOtiillO n 20114

~ales: """ "",

Pr.Qduct Type: DC' ,


COmPany: jWotN Roll

Conl~ct Person: RO(jerl


find 1'r"
Phon" 1030 569 378
(oJJ.ntry: United Stitle! of AmerlCit

cjty: tlfW Yort

Discount ,
guartfr. ,'" ,
Month: October

5t~tus: Production

Note. use the New or Delete button to add or delete records Once you start edillng a record, you can use the
Restore button to undo any changes you make

5. To display only those records that meet certain crrtena, click the Cntena button

6. Enter the cnterla and click the Form button


S.'H 1 X

1iSI Name: Crilerll



~.Iu:

Pr~duct Typr.
, ~Ifli

COmPany.
,
Bellol!
( onlad Pelion:
-
,
Pflont:
, Flndfrn

Find Held
Coyntry. Unit~d Kingdom
,
City.

fOllll
[;l
Discount: 1 (JOIr

!),IlIrter:
1
Month:
1,
StatuI:

7 Now when you use the Find Prev and Find Ned buttons , you Will only see those records that meet these crrtena
In our e~ample. only record 13
"'6 ? X

LtSI N.mr. Wolli,ms 1 13 01 14

S" lu : 1930 1 N",

Pl'Jldurt Type: ,." ~fl fl:f

COmP.ny. Pancakes on the Rocks

ContlCl ~rson: Edwards


Find frf'l
,,
II Find !:tfid!
I'ttont: 050 9!>!! 911

COllntly. United Kinlldom ,,


london ,, "nteli.
'""
OiuQunt: ,,,
Qulrter: , , ClOlt

MontI\: Ouember

Stalul: Transport

Note to ed~ the crneraa, chc k the Crnenil button again. To close the data form, chck the Close button
Remove Duplicates
This example teaches you how to remove duplicates in Excel. Go here to only find duplicates

1 Click any Single cell Inside the data set

L On the Data tab, In the Data Tools group. click Remove Duplicates

Text toHuh
F- 8
R~e~
~
Dillil
Wo C1ii II
Consolidate Re!Jibonsh'fH Manage
Columns Fill OUIl:~"'leJ Validation Data Model
Data Tools

The followll"og dialog box appears


3 Leave all che{: k boxes che{: ked and click OK.

Remove Oup licalH 1 X


To d~let' dupt;,,!, ",lutS, stint ont or mo rt (olumnllha! {ontain dupll(aln.

Ij Stltd!,11 I I; J.lns~ltd All [;21 MY da!, has hndtn

Columnl
[;21 lilt N.mt
[;21 S.ltl
[;21 (ountlY
[;21 Quarttl

OKy j (.nttt

Result. ElIce! removes an identical rows (blue) except ror the first ldenbcal rrm found (yellow)

A B C 0 A B C 0
1 Last Name Sales Country Quarte r 1 Last Name Sales Country Quarter
2 Smith $16,753.00 UK atr3 2 Smith $16,753.00 UK Qtr3
3 Johnson $14,808.00 USA atr4 3 Joh nson $14,808.00 U5A Qtr4
, WIlliams $10,644.00
Jones $l,3'Kl.00
UK
USA
atr2
atr 3
, Wil liams $10,644.00
Jones $I, 3'Kl.00
UK
USA
Qtr 2
Qtr 3
6 Brown $4,865.00 USA atr4 6 Brown $4,865.00 USA Qtr4
7 Smith $16,753.00 UK atr 3 I 7 Williams $12,438.00 UK atr 1

,8 W i1ltams $12,438.00 UK atr 1


,8 Johnson $9, 339.00 UK atr 2

,. Johnso n
Smrt h
$9,339.00
$18,919.00
UK
USA
Ott 2
a tr 3 ,. Smit h
Jon es
$18,919.00
$9,213.00
USA
USA
atr 3
a tr4
11 Jon es $9,213.00 USA Qtr4 11 Jon es $7,433.00 UK Ott 1
12 Jones $7,433.00 UK Otr 1 12 Brown $3,255.00 USA atr2

,.
U Smith
Brown
$16,753.00
$3,255.00
UK
USA
Otr 3
Otr 2 ,.
U williams $14,867.00
Williams $19,302.00
USA
UK
Otr 3
Otr4
15 Williams $14,867.00 USA Otr3 15 Smith $9,698.00 USA QU'
16 Williams $19,302.00 UK QU' 16
17 Smith $9,698.00 USA Otr 1
..
17
To remove rows with the same values in certain columns, execute the followlrog steps

4 For example, remove rows with the s ame Last Name and Country

5. Check last Name and Country and click OK

Remove: Dupli cates I x


TO delde duplicate valuel, leled Ol'le or more column! tllat contaIn duplitatu.

I: l.!l'Iselect All E2I MY data lias lIuden

Co lumns
E2I tast Name
o Sal ~s
E2I Count/)'

O. CII'I(,I

Resutt. Excel removes all rows with the s ame last Name and Country (blue) except for the first Instances found
(yellow)

A B C 0 A B C 0
1 Lls t Name Sales Co untry Quarter 1 Lls t Name Sales Co untry Quarter
2 Smith $16,753.00 UK Otr 3 2 Smith $16,753.00 UK Otr3
3 Johnson $14,808.00 USA Qtr4 3 Johnson $14,808.00 USA Qtr4
4 Williams $10,644.00 UK Otr2 4 Williams $10,644.00 UK Otr2

,
5 Jones
Brown
$1,390.00 USA
$4,865.00 USA
Otr 3
Otr4 ,
5 Jones
Brown
$1,390.00 USA
$4,865.00 USA
Otr 3
01r4
7 WIlliams $12,438.00 UK Otr 1 7 Johnson $9, 339.00 UK Otr2

,
8 Johnson
Smit h
$9,339.00 UK
$18,919.00 USA
Otr 2
Otr 3 ,
8 Smith
Jones
$18,919.00 USA
$7,433.00 UK
Otr 3
Otr 1
10 Jones $9,213.00 USA Otr4 10 Will iams $14,867.00 USA Otr 3
11 Jones $7,433.00 UK Otrl 11
12 Brown $3,255.00 USA Otr2 12
7.
Outlining Data
OuUinlllg data makes your data easier to view In thas example we will total rows of related data arod collapse a group
of columns

First, sort the data on the Company column_

A B C 0 E
I ILast Name Sa te s Product Type Coml!an:i
2 Jones $1,390.00 OF-3 IKung Food I

l Williams $1,243.00 FO-2 Kung Food
4 Johnson $9,B9.00 DC-1 Kung Food
5 Jones $7,433.00 Of-7 Kung Food
6 Brown $3,255.00 fO2 Pancakes on the Rocks
7 Williams $1,930.00 A-34 Pancakes on the Rocks

,
B Williams
Brown
$1,064.00
$4,865.00
EE-2
EEE-45
Peace A Pi zza
Peace A Pi zza
10 Smit h $9,698.00 F3B1 Peace A Pizza
11 Smit h $1,675.00 EEE 312 Wok N Ro ll
12 Johnson $1,480.00 DC-1 Wok N Ro ll
13 Smit h $1,891.00 EEE 312 Wok N Ro ll
14 Jones $9,213.00 FG-5 Wok N Ro ll
15 Williams $1,486.00 A-34 Wok N Ro ll
16
2_On the Data tab, In the OuUine group, click Subtotal.

Shoo.,OI!'lIlI
H~Orllii
Group Ungroup Subtotal

Outline ~
3 Select the Company column, the column we use to ouUine our worksheet

4 Use the Count function.

5 Check the Company check box

6 Click OK.

Subtota l ? x
!t nch chano~ in:

U.se function:
nt El
Alld lubtota l to:
tast Name
Salt!
Product Type
Company

E2I Rep lau ~urrent lubtotall


o fage break between groups
E21s.ummary below data

gtmOWf All 0' canul

ResuK_
Resu~

I ' IzI , I 0
C 0

,
1 last Name
Jones
Sales
$1,390.00
Product Type
OF3
Company
Kung Food
3 WillIams $1,243.00 F(}" Kung Food

,
4 'Johnson
'Jones
$9,339.00
$7,433.00
0(1
OF 7
Kung Food
Kung Food

Kung Food Co unt 4

b
7 Brown $3,255.00 F(}" Pancakes on the Rocks
8 Wmlam s $1,930.00 034
Pancakes on the Rocks Count
Pancakes o n the Rocks
,

~
10 WillIams $1,064.00 EE2 Peace A PIzza
11 Brown $4,865.00 EEE-45 Peace A Pizza
12 5mith $9,698.00 F3334 Peace A PIzza
13 Peace A Pina Count 3
14 Smith $1,675.00 EEE312 Wok N Roll
15 Jo hnson $1,480.00 0( 1 Wok N Roll
Smith $1,891.00 EEE312 WokN Roll
"
17 Jones $9,213.00 FG5 Wok N Roll
18 willIams
19
$1,486.00 0 34
Wok N Ro ll Count
Wok N Roll
,
2() Grand Count 14
2l

7 To colapse a group of cells, click a minus sign You c an use the numbers to (elapse Of elIpand groups by level
For eJCample, click the 2 to only show the subtotals

ITJ:Wl 1 Last Name


0
Sales
Product Type
C
Company
0

+
+
Kung Food ( a unt
Pancakes on the Rocks ( ount ,
4

+ 13 Peace A PiZZoi Count


,3

"
+
,.
19 Wok N Roll (ount
Grand Count 14
2l
tI t-Of t!X ample, se;.,cl COlumn Po. ana tI

9 On the Data tab, in the Outhne group, click Group

1~ "~
Group Ungroup Subtotal

Outline

10. Click the minus sign above column C (~win change to a plus slgn)_

ResuH_

G
ffi
1' 121,I c 0 E F

,
1 Product Type
OF-3
Company
Kung Food
3 FO-2 Kung Food

DC-1
5 OF-7
Kung Food
Kung Food
6 Kung Food Count

b ,.
7 FO-2 Pancakes on the Rocks

,8 4-34
Pancakes o n the Rocks (aunt
Pancakes on the Rocks
,
EE-2 Peace A Pizza

L,. 11 EEE-4S
12 F-3334
13 Peace A Pizza (ount
EEE-312
15 DC-1
Peace A Pizza
Peace A Pizza

Wok N Roll
Wok N Roll
3

16 EEE-312 Wok N Roll


17 FG-S Wok N Roll
18 4-34 Wok N Roll

" Wok N Roll Count


20 Grand (aunt
5
14
21
11 To remove the outline, click any cell Inside the data set and on the Data tab, In the Outline group, click Subtotal,
Remove all

Subtotal 1 X
.at n<ll ( hano~ II\;
Company r--J
llst fund ion:
~t FI
subtotal to:
,

E2I Rrplau ~urrfnt lubtotall


o faOt bruk bftwt~n groupi
E21.s.ummafY below data

0< Canul
Conditional Formatting
Highlght Cells Rules I Clear Rules I Top/Bottom Rules

CooditJooal formatting In Excel enables you to hghlight cells with <.I certain color, depending on the celrs value

Highlight Cells Rules


To hghhght cells that are greater than a v alue, execute the foUowll"IQ steps

Select the range A1AIO

1
A
,. B

2


3
"
43
5 2

"5
.
7

,B 11

10 57
11 1

2 On the Home tab, In the Styles group, clic k CooditlOl'lal Formatting
--=-....... 1

~format
~ Normal "d Good Neutral
Condllional
formlnmg - Table-
as ExpJonotory .. ~1~"~P~"~t:::::::J .
51y1u

3 Click HIQhI9ll Ceis RIEi. Greater Than

to
l op/Bottom Ruin
[iJJ .,. ......
r=J CoIor ~ 1m .E.q~lTo...
rnIJ icon Seb ~ !ext tlYt ConWns...

{;:;] New Rule ...


~ -'Iur Rules
[d! A Date Occurring...

r::J M,nage Rules ... ~ Quplicate Values...

MOle Rules ...

" Enter the vilkJe 8O;nj select a fomlatmg style

Grutrr Than 7 x

liSl WIth light Rfd Fill with Dalk Rtd Tut ...,
- --=
OK (Inul
5_ Click OK

Result Excel highlights the cells that are greater than SO

A B
1 14

,
2 6

"
4
5 " 2
6
"5
,~ l 11
86
57
lOr
11

6. Change the value of cell AI to 81

Result Excel changes the format of cell AI automattcally

A B
1 I " I

~1
6

"
" 2
6
"5
~r 11
86

:1
11
57

Note you can also hghlight cells that are less than a value, between a low and high value, etc
Clear Rules
To clear a condttlOllal formamng rule. execute the following steps

Select the range Al.Al0

A

,1 81


4
3
.,
39

,
5

7 5

,8 11

"
10

11

2 OJ) the Home tab, 11 the Styles group click CoodiIJooal FomJatbng

Normal B.d Good Neutral

[I calculation ~heckCell _ Explanatory ... :::1 .


f'~O~p~,~1
StylfS

3 Click Clear Rules, Clear Rules from Selected Cells

.. lop/Bottom Ru6es
3 crICk Clear Rules, Clear R-wles fiom-$eiec----reoc'."",.---

~ Uighlight Ceis Rules

l op/Bottom Rules ,

~ ~;J Jean Sets


o MewRul~.

O':......
1':;-';';'.... :'7-;::----"__:c'....
;;;;.;;RuIes from Selected Cells
rn Manage Bults... Clea, Rules ',om Enllfe Sheet
Ie I R

Top/Bottom Rules
To hlghhght cells that are above the average of the cells, execute the follow"IflQ steps

Select the range At A10

1
A
81

2

3
5 .,"
, 2

"5
.
7

,
8 11

10 57
11 1
2 Oil the Home tab, ill the Styles g roup, click Conditional Formatting

Normal Good Neutral


Condlt,on,l Formlt 1$ ExpIDnatory .. ~Iln"p:::",,-_-,i,~~
Form.tt,1'\SI Tlble
Styles

3 Click Top'Bonom Rules, Above Average

lop 10 Items-

[ill a..lho 8.in


CoIot" ~e.lle; [~ .Ilottom 10 Itemfo-.

~ IeOllSets q Bgttoml0 L

L'l N- Rule ...


Nwve Avenge_
r:; tlurRulH ~
IE) Mllllgf BuIH... ~ Below AJler~e_

MOff Ruin ..

4 Select a formattrlg style

Abovf Aver.gf ? x

...
fOtm.ll: celli tMlMf ABOVE AVERAGE:

l or the Sflf Chd Ilngf WIth

01: ( Incfl
5 Click OK.

ResuH. Excel calculates the average (42.5) and formats the cells that are above thIS average

A B
1 81
2 6
3
4 "
43
5 2
6
7
"5
,
B 11
86
10 57
11 1
Note you can also highlight the top 10 rtems , the top 10 %, etc. The sky IS the limrt!
Manage Rules
To VJeoN all cood~1OIla1 formatbrog rules In a workbook , use the ConditIOnal Formatting Rules Manager You can also
use this screen to create, ed~ and delete rules

1. Select cell AI

A B
1 81 1

,
2 6

4 "
43
5 2
6
7
"5
,
B 11
B6
10 57
11
2 On the Home tab. In the Styles group. click Cooditional Formatting

~
ConditIOnal Format as
, Normal

Icalwlauon
Bod Good

Explanatory ..
Neutral

Formilttll!g TlIble~
Styles

3. Click Manage Rules

~ Highlight Cells Rul5 ~

lop/ Bottom Rul5 ~

D QlIta Bars
a Color ~ale5

D leon Sets
o t:!ew Rule...
r:; '-lea r Rules

[J Manage Bules. ~

The Conditional Formatllng Rules Manager appears


The Cooditional Formatting Rules Manager appears

Conditional formatting RutH

,S:howlormattlng I\Ilts lor;

Q Hew Rule ...


,
Manag~r

......
~ ~ fdft Rule ... ~ ,. X
- "
l2eltte RUle ]
~ :.!:
1 X

RUlt lapplifd in ord~1 shown) Format ApplifS to Stop II Trut

Ctll Valu~ ~ 80 AaabCtYyZl - SAS1:SAS1 O [ro.i 0

[ O. [ ClOSt

Note: beca use we selected cell AI . Ex cel shows the rule applied to the range Al.Al0

4 From the drop-down list, change Current Selection to ThIS Works heet. to Vtf.'!oN all coodruonal formatllng rules 10
thIS worksheet.

Conditional f ormattin9 RulH Manager 1 X


,S:how formatting rults for. li!!!!::Workshed
"
o .t!twRult... ~ fdit Rule .. X I2tltlt Rult
Rul~ lappllfd in orde! shown) format Applif5 to Stop II Trut

Top 1 AaBbCcYyZl ~S' : SESt O !I;;! 0


Ctll Value ~ 80 AaBbCtYyZl _SAS1 :SAS1 O [ilii[ 0

[ O. [ CIOlt
OK (Iolt

Note click New Rule, Edrt Rule and OeIeIe Rule to create, edit and delete nJes
Manage Rules
To VJeoN 311 conditional formathrog rules in a workbook , use the Conditional FormattJrog Rules Manager You can also

use thiS screen to create, ed~ and delete rules

Select cell A I.

A B
1 81 1
2 6

3
4 "
43
5 2
6
7
"5
,
B 11
86
10 57
11
2 On the Home tab, In the Styles group. clic k Coodihooal Formatting t- OIiOW I

Normal B.d Good Neutral

Il calctllatlOn Explonotory .. r.lln~p~"=t---" -;~

Stylu

3 Click Manage Rules

~ Highlight ( dI;!W1et;

. lop/BoHam Ru6n
[i] "' ......
r:J CoIor uIe
~ l<:on Sets
0 t:lew Rule...
1
0 ~Ielf RulH
.... ntgeBulft, ..
f:)
The CoocII\x:IoaI Foonatlrg Rules Mar\agef appears
Condition,1 Form.tting RulH Manager I X

1howformattin!! rolellor. ~ v
, ,
o tiew Rule. E) Edrt Rule ... X .l2.eltle Rule
Rule (applied In order shown] Format .... pp liuto Stop II True

eo 0
""
Cell V.lue AaBbCcYyZz _SAS1 :SAS1 0

I 0' I Close ~.

NOIe because we selected cell AI . Excel shows the rule applied to the rarge AlA 10

4 From the drop.down list. change Current Selection to thIS Woosheet. 10 v_ aU condruonal formaltJng rules in
thIS worksheet_

I x
1how lormattln!! rolel for.

o ~ew Rule... Rule... X .l2.eltle Rule ...

Rule (app lied in order shown) Form.t Applies to Stop II True

Top I AaBbCcYyZz -SESI:SES10 o


Cell Value . 80 AaBbCcYyZz o

Close
Data Bars
Data bar'S III EKCel make it VeJY easy 10 vISualize v~ III a range 01 eels A IongeJ bar rep-ese0t5 a h9Jer value

To add data bars. execute Ihe folloYnlg steps

1 Select a range

2 On the Home tab. III the Styles group click ConditJ:lnal FormattrIg

tl
CondJtJonaf Fonnat as
~ ,N:;;O~'
~ ;Ic===i]: Bad
,I ulculation I
Good
ExplonotOfy .
Neutral

Formattl"'ll Table:
3_ Click Data Bars arod click a subtype

WJ Highlight (~Ruln
!Ita lop/Bottom Ruin

a
-- (oIor~.. Ie5


Grildient Fill

IB~
IB lt lt
OJ leon Sets Sofid flO

I:J New Rule. . !H la ~


5 "Iur Rul6
t;) Manage 8uI6 la la !H
More RuI6 ..

ResuH:

A B
1
I
jl ,.
2 JI 6

"
' 3
2
951
5

Explanation by defauH. the cell that holds the minimum ~alue (0 if there are no negative values) has no data bar arod
the cell that holds the mivamum value (95) has a data bar that fills the entire cell All other cells are filled
4 Change the values

Resull Excel updates the data bars automatically Read on 10 further CUSIOllllZe these data bars

A,
1
2
3

,,
4

,
8

I.
111
5 SelecllherangeAl .Al0

6 On the Home tab, In the Styles group. click Condillonal Formatllng Manage Rutes

7 ClICk Edrt rule


Excel launches the Ed~ Formatting Rule dialog box Here you can further custOll'llZe your data bars (Shc;m Bar Only,
Minimum and Maxlloom, Bar Appearance, Negative Value and AxIS, Bar DlrectlOll, etc)

Edit Fo,m,ning Rule , x

.. forlll.1 all (fn~ b'~fd on Ihftr UfU!,


.. fo,m,t only nllllh,t contlln
... f ormat only lop 0' bonom ranked \'iIlues
.. fo"...1 onlynluel thai art abovt 0' btlow awtragt
... f Olmat only uniquf 0' duplicate valuel
... Un. lon.. ul. to dtlt,minf wtlidl cflls to 10lmat

FOI'INII all cdls bHed on their ",alue:


F,Strmat Stylf : Oal, Bar v o Show ~ar Only
MlIllmum Maximum
!ype: Automlti, v Autom,!iC v
---
::.!alut: ~utomatlCl 1li1 (Autom.tlc) IFliiI
&ii, Appnf,nce:
fill
Glldltnl Fill 1. .
",0101 Bordel
Solid Bordn rv ,.a
Coiol

Htgatin Value and Axis ... Bal Qlrectio n: Context v

Note 10 drectIy lamch this dialog box for new nJes, at step 3, click More Ru6es

B Selecl NlMTtler from the Mnnun drtJp-da.n list and enter the ",ak,oe 100 Select NlMTtler from the Maxnun drop-
down IIsI and enter the vakJe 150

9 Click OK tw.::e
Edit Form~tting Rule ? X

S.tltct' Rult Type:


... FormM III trlls blsrd on thrlr n luts
.. Form,t only (till thaI (ontain
... Form.t only top or bottom ranbd ...,Iuts
.. form.t only ..,lutl that 1ft abon Of btlow IIYfrallt
... format only uniqur 0' duplitatr ...,Iurs
.. Ust .Iormula 10 dtltrmint whl(h crill to lormat

""
-o
forlNOl II cells bHed on their ....Iues:
F.strm.1 Sl)'It: D.t. B.r Show I" Only

-
Minimum M.ximum
Jypr: Numbtr Numb,r
:ialut: '00 ll!il ,S<j ~
hi' Appe~"fKt:

fill Bordtr (olor

- 1-
,,"010'
Gr.dlrnt Fill
:-1 Solid Bordtr 1-", I G
Utll.lA'r V.lut lind Allis ... ] B., Qllt(\lon: (onlrxt .Iv..
".-~
I Ol---.f\J (ancrl
Resu~

A ,
d, 101

,2

4
5
6
7

,,.
8

111
EwplanatJOn the eel that holds the value 100 (If any ) has no data bar and the eellhat holds the value 150 (If any )
has a data barthat tills the enbre eel AI other cells are IiIIed proportlOOally

Ramco Global
Payroll S/W
Covering all of Asia, Middle
East,Australia & New Zealand
On One Unified Platform
Ramco Systems
Color Scales
Color Scales In Excel make rt very easy to vISualize values In a range of cells_ The shade of the color represents the

value in the cell

To add a color scale, execute the followlrog steps

1. Select a range

2. On the Home tab, In the Styles group, click Conditional Formattlllg

Normal B.d Good Neutral


condit;Onll~Formllt as [I CiJlCUlatioo ChedtCeli . . ,~I_ ".
Exp /a no , 01)' ... =
I~t
Formllttlll9 Table
Styles

Indiabulls
HOME LOANS

RUt . . """;o;"'T..-
' i"r
HOME UIAJIS It 1.5G% P
3 Clic k Color Scales arod click a subty pe

ttr~ Highlight Cds Rulrs

..
,..., lop/Bottom Rulrs


M
lj lc:on Seb
[:J New Rule .
r, ,Clur Rules
rn M~n~ge Buies...
MOle Rules ...

ResuR_

'L....::A
'--o '
1

7 ,.
.J
ExplanatIOn by default. for 3--Color sc ales. Excel c alculates the 50th percentile (also known as median, middle v alue
or midpoint). The cell that holds the minimum value (9) is colored red_ The cell that holds the median (36) IS colored

yellow, arod the cell thaI holds the max imum value (80) IS colored green All other cells are colored proportionally.

Read on 10 further cuslOOllZe thIS color scale


4 Selecttherar.geAl.A7

5. On the Home tab, in the Styles group, click Coodruooal Formatllng, Manage Rules

6 Click Edrt rule

Indiabulls
HOME LOANS
'.., . . T. . . . . . .,..
oi.-iP.A.
HOME UlAJlS O 8.50% ...
Nih'

Excellaurx:hes the Ed~ Formatllng Rule dialog box Here you can further customize your color scale (Format Style,
Minimum, Midpoint and Maximum, Color, etc).
Edit Form~tting Rult 1 x
.s:~lect' Rule l)'1)e:
.. FOIIII&I.1i ttlll billtd on Ih~1f w~lu~
.. Form't only Ctlll th.1 (ont.in
.. Formilt only top 01 bottom ranl:td walut5
.. Form't onlyw,luts th.t 1ft ilboWf 01 btlow ntlilge
.. Formlt only unique 01 dupli{Mt walun
.. Un 'formul, to delermiM which ulillo fOlmll

flirt Iht RUlt OtlUiptioo:

F,Qlmll Style: 3.(0101 SUit

Minimum Midpomt Muimum


lYJ)e: townt Value v Ptlunlilt v Hlghut V.lue
~'Iue: ;;'=== 50 ===~]i!]~. (Hlghtst W.IUfl
~olor.
a
0'

Note to dlle<:tIy launch thIS dialog box for /leW IUIes, at step 3, chc k More Rules

7 Select 2-Color Scale from the Format Style drop.down list and select wMe and blue

8 Click OK twICe
Edit Fo.m~tt;ng Rule 1 x
a Rule
.. FOlmlt III tetts based on thelrVillufS
.. Formlt only (tiIS th" (ont,;n
.. FOlmat only top or bottom .ani:td value!
.. Formlt onlynluu thlt 'ft aboWl 0' btlow IYflagf
.. FOlmat only unlquf 01 dupli{llt nlues
... Use fonnul. to dete.mint whl(h (tlls 10 fOlmat

Minimum M'lCimu,",
bPt: town! Value v Highut V.IUf
!i.lut, (lowest lue)
-~=~
'blJi.
;'-I (Hightst .,Iut)
~otor. :v I

(,nttl

Resu~

1
A

2 "
3
4
S
6 "
IS
7 SO

Icon Sets
Icon Sets in Excel make rt ~ery easy to visualize values in a range of cells Each icon represents a range ofvalues

To 00d an icon set, execute the following steps

Select a range

2 On the Home tab, In the Styles group, click ConditJonal Formathng

Normal B.d Good Neutral

CO!'ldihon"~Form"- as II Calculation check Cell . Explanatory ~I'n~p~~t~=:lf-~


Formatt"'!!1 9
Tablt y

Styles
3_ Clic k Icon Sets and clic k a subty pe

~d Uighlight Cds Rulf5

IopIBottom RutH
"
D Q.- IaBan
II Color Scales
1
Directional

...
o ! :rt ... ~
.. ...
..... .... .....
!::!ewRule
... ~
~ ~Iear Rules ~ ... ~~ ...
G Manage Butes".
~~ ...
'......


. 0


Indicaton;

~OO " IX
I~ II> I~
Ratin!Js

*tr -c:r odIod olllolll


~ () ~ 0 0lil 0lil od .. 0lil
More Rules ..
Resutt_

.1. A
.4
B

!~
6

"
43
5 . 2
6 . 95
7
5

,
B

10
11
. 11
86
57

Explanation by defautt, for 3 icons , Excel calculates the 67th percent and 33th percent 67th percent = min + 067'
(max -min) = 2 + 067 (95--2) = 64 31 33th percent = min + 0.33 (max -min) = 2 + 0.33 (95--2) = 3269 A green

arrow will show for values equal to or gre<ller than 64_31. A yellow arrow will show for values less than 64 31 and
equal to or greater than 32_69 A red arrow will show for values less than 32.69

Indiabulls
HOME LOANS

,... AIu TN .....,~.~


,.!'~~
4 Change the values

Resu~ E~cel updates the ICon set automatically. Read on to further custOlTllZe thiS ICon set

1
2
r. A
2.5
50

3
4 75
0


5 75

7 100
0

,
8 50

10
11
75
100

5 Select the range AlA 10

6 00 the Home tab, III the Styles group, click CoodilJonal FormattJOg, Maoage Rules

7 Click Edit rule

E~cel laullChes the Ed~ Forrnatbng Rule dialog bo~ Here you cao further custorruze your ICon set (Icon Style,
Reverse Icon Order, Show Icon Ooly, Icoo, Value, Type, etc)
Edit Formatting Rule I x
lelect a Rule Type:
.. Fo'm~t all telll baled on then ~tue
.. Fo rmat only cellI that (onta in
.. format only top or bottom ranked aluel
.. Format only aluel that I re above or below anrage
.. format only unique or dupli(ate n lun
.. Ule a formula 10 determine wh ich ull! 10 formal

Edit the Rule Oemiptlon:

Formal illI cells bilsed on their values:


FljIlmlt Style: I(on Seh

"..
OilpllYn(h iton aord ing 10 thele ruin:
koo

[
~
.;

wilen value il

wilen < 67 1nd


[m.[
[Iiil[
Per(!n!

Pu(enl
[v
[v

L 1wilen < 33

OK

Note to directly launch this dialog box for new rules , at step 3, click More Rules

8. Select 3 symbols (Uncrrcled) from the Icon Sty le drop-down list Select No Cell Icon from the second Icon drop-
down list Change the Types to Number and change the Values to 100 and 0 Select the greater than symbol ( next
to the value 0

9. Click OK twice
Edit Form.tting Rule 1 X

1~I~ct. Rult Tl'Jlt:


.. Form.t III ttlll blled on their "Iutl
.. Format only (tllllh~1 (onl~ln
... Form at only top Of bottom IInkfd valutl
.. Formlt onlyvaluts th~1 ~It Ibon Of below awl'Ve
.. format only unique or dupliule nlutl
.. Un lormu l. 10 dtltfmint which celLs 10 lorm~1

(dot the Rule Oelaiption:


Formal ~ ct'IK bHtd on their ....Iues:
F,Qlm'l Style: I(on Scts v li!!:ersc I(on Or~cl
lion Style: Cuslom - 10 Show I(on Only

O,sp l.yeach Icon .((ording 10 thtn ru lts:


kOf!
., - ll"ue "po
when Vllue il v 100
~ tlumbu v

-
No Ctlll(on wnen < 100 .nd v 0
~ Number v

X - whtn<~O

I O.
~ C.nul
ResuR_

A B
1 '-'
2 50
3 75
4 X 0
5 75

"
6 100
7 X 0

,
8 50
75

1O j"
11
100

Indiabulls
HOME LOANS
_ . . T.. . . . . .
1HOME UWlS O I.5O% P.A.
-;g.'.
New Rule
If the Highlight Cells Rules , TopIBottom Rules, Data Bars , Color Scales and Icon Sets are not SuffICient, you can
create a new rule For example. highlight the codes below that occur more than once In the range A2.Al0 iIDd have a
score greater than 100

Select the range A2.A 10

A , C
1 !code Score
2
3 ,
A 4
14
4 C 31
5 A ISO
6 0 6

,
7 0 SO

, 0 42

10 ,
E


120
22
nl

2 On the Home tab, in the Styles group, click Conditional Formatting

I;l lti'
ConditIOnal Format IS
Norm al

II Ca lculation
B.d
Check Cell _
Good

Explanatory .. ,
Neutral

"- '::",--'I '~~


I,n::
F~ Tlbl~
Styles

3 Click New Rule

~ Highlight erik Rulrs ~

~ lop/Bottom RulH
"" D:"t"
D 80IIrs

III Coiof5.C....H
D IconS~u
0 Hew RuIe. ..
r;; ~
.cleu Rules
G Mllllge Buln ...

Note Highlight Cells Rules , TopIBottom Rules, Data Bars, Color Scales and Icon Sets are shortcuts. They can also
be found under New Rule

4 Select 'Use a formula to determine which cells to format'

5 Enter the formula =AND(COUNTIF($A$2 $A$10,A2I,B2>100)

6 Select a formatting style and click OK.


6 Select a fOlTfl<lltJrog style arod clic k OK_

N_ Formatting Rule ? X

1elect a Rule TYPf:


... Format all tell! based on their valutl
... Format only ttlls that contain
... Format only top or bottom ranked valutl
.. Format only valuel thlt ale above 01 below lIVeragt
... Format only unique or duplicate valut$
... Use a 10lmula to det elmlne whith cells to fOlmat

.[dit the Rule Description:

f2f1Tl'lt valu ~ W~t this fonnula Is WI!':


- Al'ID [COUNTIF[$AS2.:SAS 1O,A2)' 1,62 ' t OOl [!IOI

Pr~
[ AaBbCcYyZz
[ I , orma!... I
OK r-.... I Cancel

Result Excel formats cell A5 bec ause code A occurs more than once in the range A2.A I O arod the value 150 in cell
85 IS greater than 100

A B C
1 Code Score

,
2 A
B
4
14
4 C
5 A "
150
6 0 6
7 0 50

,
B 0
E
42
120
10 B 22
11
Explanation COUNTIF($A$2$A$10,A2) counts the number of codes in the range A2.Al0 that are equal to the code
In cell A2. If COUNTIF($A$2 $A$10,A2) > 1 and B2 > 100, Excel formats cell A2 Because we selected the range
AlAl0 before we clicked on CondrtlOflal Formatting, Excel automatically copies the formula to the other cells. Thus ,
cell A3 formula =AND(COUNTIF($A$2$A$10,A3 1,B3> 100), cell A4
=ANO(COUNTIF($A$2:$A$10,A41 ,B4>100), etc Notice how we created an absolute reference ($A$2.$A$10) to
fIX this reference

~ EP.efi
---
See how EPPS ERP can help you
manage material req uirements and
more.
REQUEST DEMO

6/11 Completed! Learn more about conditional formatting>


Find Duplicates
Thrs exafl'l)le teaches you how to fiod duplicates (or tr'-:ates) fl Excel Go here to remove dupiK:ates

Seieclltle rooge At CtO

A B C 0

,
1 Sierra Tango Charlie

, Kilo
Golf
Bravo
Mike
Yankee
Delta
4 Juliet Alpha Foxtrot

, Papa
5
Zulu
X-ray
5iemil
Nov@mber
Whiskey
7 Romeo 'roo Quebec

, Sierra
8 India O~,

Urna
Delta
Uniform
10 Hotel Juliet Victor
11

2 On the Home tab, in the Styles group, click Conditional FormatIlng

"d GOOO - - - ' Neutral

r.:1
1",,:::;--'
Exp /0 notary .. , ... ' ,,"::t===:-,1_0 '

3 Click H~ Ceis Rue.. D~te Vakles


"""
IhfIIghI Cell Rules ~ y ruter ThM...
om lop/Boltom Rules ~ l.euTh.n...
[Hj Q.Jt. a,.rJ Between-

tel (-~ ~ fqu.lTo.-

IT) l<:onSeb ~ lext tlYt Cont.1m...

{;J New Rule ...

--.........
~ 6 D.-te Oc:<:uning...
I~ tlurRuln
rn Manage Ruin ...

More Rules. ..
~

" Select a Ioonattlng style ;nj click OK

7 x

PupIgtt I v 'IIlufs with Ught Rfd Fill wrth Oark Rfd Tut v

0' &1 (,nul


Resutt. Excel highlights the duplicate names

1 Sierra
A
Tango
C
Charlie
0

2 Ki lo Bravo Yankee
l Golf Mike Delta
4 Juliet A l pha Foxtrot

,5 Papa
Zu l u
X-ray
Si e r ra
November
Wh iskey
7 Romeo Echo Quebec
8 India Oscar Delta
9 Sierra Um. Uniform
10 ~ Hotel Juliet Victor
11

Note select Unique from the first drop-down list to highlight the unique names

As you c an see, Excel highlights duplic ates (Juliet, Detta), triplic ates (S ierra), quadruplicates (if we have any), etc
Execute the following steps to highlight triplicates only

Indiabulls
HOME LOANS
_ ... THSNNtAlu
] HOME UlAJlS Q 1.50%' P.A. (
-hUM
I

5. First, c lear the prevIOUS conditional formatting rule

6. Select the range AICIO


7. On the Home tab, in the Styles group, click Condrtional Formatting

i;) ~ N o rm al Bad
rrl"(~.IC,~u~,.~uCo="==I C.heck Cell _,
Good Neutral
Conditiontl Form.., '$
Explanatory... [, IC""'OU'",==,-J
FOI'fI"d'ng Table

8 Click New Rule

lop/Bottom Rules ~

D U~t~ Ibrs
III Color S.c~le!i
D ll:on Sets
0 Hew RuIe,.,
~
r:f .clur Rules
t:I Menege Rules,..
9 Select 'Use a formula to detenmroe which cells to format'

10 Enter the formula =COUNTIF($A$1 $C$10,Al)=3

II. Select a formatllng style and click OK.


New Form~tting Rule ? X

Sfltct, Rulf TI'Jlt:


... Format III tflls basfd on their 'I'IIUfl
.. FOlm~t only ulll thai (onla in
... Format only top or bottom ranked values
.. Form" onlyvalufS thalalf abOYt or bflow lVullle
... formlt only unique or duplicate 'I'Iluel
... Use ~ formula to detfrminf which cflll to fOlmal

fdll tht Rule DeHriptlon:


f2fJN1YWe where this formuLa i5 true:
.COUtmf(W\:SCS10.,AI I"3
~

Prev;ew:
I AaBbCcYyZz
II ,Oflllat ... I
I 0' I}J Can cel

Resu~ Excel highlights the tnplicate names

A 8 C 0
1 ,Sierra Tango Charlie
2 Kilo Bravo Yankee
3 Go lf Mike Delta

,
4 J uliet
Papa
Alpha
X-ray
foxtrot
November


7
Zulu
Romeo
Sierra
'<ho
Whiskey
Quebec

,
8 India 0=, Delta
Sierra Um. Unifo rm
10 ~ Hotel Juliet Victor
11
Explanatton =CQUNTIF($A$1 $C$10,Al ) counts the number of names In the range A I :Cl0 that are equal to the
name in cell AI If CQUNTlF ($A$I$C$10,Al ) = 3, Excel formats the cell Because we selected the range A1Cl0
before we clicked on Condlllonal Formatting, Excel automatIC ally copies the formula to the other cells Thus , cell A2
contains the formula =COUNTlF($A$1 $C$10,A2)=3, cell A3 =COUNTIF($A$I$C$10,A3)=3, etc NotICe hoY; we
created an absolute reference ($A$I$C$10) to fIX thiS reference_

Note. you can use any formula you like For example, use thIS formula =CQUNTlF($A$I$C$10,Al 3 to highlight
the names that occur more than 3 times

Indiabulls
HOME LOANS
_ " . . TN . . .,.
';-'. . ..
HOME UIAJIS 0 '.50%. P.,
wQU-
Shade Alternate Rows
This example shows you how to use conditional formatting to shade attemate rows Shading every other ffloN in a
raoge makes rt easier to read your data

Select a range

A 8 C 0 E

,
1 Last Name ISales Country Quarter
Qt, ,
, Smith
Johnson
$16,753.00
$14,808.00
UK
USA Qt,.
Jon@s
5
Williams $10,644.00 UK
$1, 390.00 USA
Qt"
Qt, ,
6 Brown $4,865.00 USA Qt,.
7 Williams SU.438.00 UK Qt"

,
8 Johnson
Smith
$9,339.00 UK
$18,919.00 USA
Qt"
Qt, ,
10 Jon@s $9,213.00 USA Qt,.
II lones $7,433.00 UK Qt"
U Brown $3,255.00 USA Qt"

,.
13 Williams
Williams
$14,867.00 USA
$19, 302.00 UK
Qt, ,
Qt,.
15 Smith $9,698.00 USA Qt"
161
2. On the Home tab, In the Styles group, click Cond~1OIlii1 Formatllng

~~ No rma l Bad Good Neutral

Conditional Format
F~ Tlble~
IS
Md culatlon I=heck cell _I Exp /a notary ... b ",,-----,I_ .'
~ut

Styles

3_ Click New Rule

~ Highlight Cells Rules

lop/Bottom Rules

D D:~t.1 B~rs
a CoIorSuie
D lc:on Sets
o HewRuIe..,
r, .ctnr Rules ~.
rn Manage Buies...

4 Select 'Use a formula to determine which cells to format'

5. Enter the formula =MOO(ROWO,2)

6_ Select a formatlJng style and click OK


New FOfm~tt ing Rule ? X

1tltct, Rult TrPt:


... FOlmat I II ttlls bastd on thm '11luts
... FOlm.t only (tlil lhat (01'111 11'1
... FOlmat only top 01 bottom linked '11luu
... FOlmat only yaluts thai art abovt 01 btlOW Iwtflgt
... format only unique 01 duplicatt '11luel
... Un I forlllU" to detelllllnt wnidl ttlll to f ormat

I drl the Rule Description:

F2flI\It nlue where this formull is true:


aMOD{ROWQ.21 ~

I'f~
II A.abCCYyZz
II ,olmat.. I
I 0'
~
C,ntel

Res utt
1
A
c 0 E

2 $16,753.00 UK atr 3
3 USA
4 Will iams Q1r2
5
6 Brown
7
$4,865.00 USA
... Qlr4
QI!'

,
8 au 2

Qtr4

12 Brown $3,255.00 USA Qtr 2


13 .00 QI!'

15
16
......
14 Williams $19, 302.00 UK Qtr4

E~planatlOO the MOD function gIVes the remall"der of iI divlSlOI1 The ROW() fUnc::tlOl"l retums the row number For
example, for the seventh row, MOD(7.2) equals 1 7 IS divided by 2 (3 limes) 10 gIVe a remalJ'Kler of 1 For the eght
row, MOO(8,2) equals 0 8 is dIVided by 2 (exactly 4 Illnes) 10 gIVe a remall'der of 0 As a resun, all odd rows return 1
(TRUE ) and will be shOOed
Compare Two Lists
This example describes how to compare two lists using cood~ional formatting For example, you may have two lists
of NFL teams

A 8 C
1 Miami Dolphins Atlanta Falcons
2 Cincinnati Bengals New Yert Giants
3 Detroi t LIons Oenver Broncos

San Francisco 4gers Chicago Bears

,
5 Indianapolis Colts
New England Patriots
Tampa Bay Buccaneers
Washington Red sklns
7 Houston Texans Indianapolis Col ts

, Jacksonville Jaguars
8
Chicago Bears
San Diego Chargers
New England Patriot s
10 San Diego Chargers Cincinnati sengals
11 New York Giant s Arilona Cardinals
12 New Orl eans 5alnts M in nesota Vikings

,.
13 Tampa Bay Buccaneers
Seattle Seahawks
Pitt sburgh Steelers
San Francisco 4gers
15 Atlanta Falcons New Orleans Saints
Tennessee Titans Houston TeKans
"
17 Wash ington Redsk ins Seattle Seahawks
18 Baltimore Ravens Jackso nville Jaguar.;
Baltimore Ravens
"
20 Det roit Uons
21
To hlghhght the teams In the first list that are not in the second list, eKecute the following steps

1 First, select the range Al.AI8 and name rt firstlJst, select the range 81 820 and name rt secondlJst

2 Ne.t, select the range A I.A 18

3 On the Home tab, In the Styles group. click Condibonal FormattlllQ

rN~O'Omc.O'oO===;' i'"
Good Neutral

1 (~ICUlation chedl Cell Explanotory. , "[In,,,p::ut,-_-,1 ~

Styl~1

4 Click New Rule

ffi Highlight ( elk Ruift


lop/Bottom Rules

[LJ Q.. t .. BolA


rIl Color SColte5
tl]
,. Icon SelJ
0 /low .......
I;;; !:.1~lf Rules
t;) Mlnlge Buies .

5 Select 'Use a formula to delerf!Wle wtw:h cels to format'

6 Enler the formula =COUNnF(secordJstAl)=O

1 Select a formattng style and click OK


New Form.tting Rule , x

.. Form.t III (ells blled on their "lues


... FOrml! only nlll that conta,n
.. FOfmat only lop Or bottom linked "Iun
... Formlt only"lun thlt .rt .bove or below 1Y1t1l,,!
.. Formll only un ique Or duplicate 't. lues
... Use I IOflnula to dtlelftline which (tits 10 f o~

Idll the Rule OeHJlplio n:


F~ I vlllun Whtflf this formula Ii ~

. COUtmF (st (ondUst,.At )- O oii1

Resun Ml3fl'11 DoIph'ns and Tennessee Trtans are not ,n the secood list
1
2 New York Gi ants
3 Uons Denver Broncos
4 Francisco 4ger5 Chicago Bears

,
5
England Patriots
Ta mpa Bay Buccaneers
washington Redsk ins
7 Texans Indianapolis Colts

,8
Bears
Jaguars San Diego Chargers
New England Patriots
Diego Chargers Cincinnati Bengals
York Giants Arlzona Cardinals
Orleans Saints Minnesota Vikings
Bay Buccaneers Pinsburgh Steelers
San Francisco 4gers
New Orleans Saints
Texans
Seattle Seahawks
Ravens Jacksonville Jaguars
Bal timor e Ravens
Detroit lions
21

Explaoauoo =COUNTIF(secoodllst,Al) coools the nurber ofleams in secordlJs\ that are equal 10 the team If) eel
AI If COUNTlF(secoocLlSl,Al) :: O. the team 10 eel A tIS notl'l the second list As a restil. Excel fils the eel W11h a
blue background color Because we selected the filOlJe AlA 18 before we clicked on CondI\JooaI FOfTOatbng. Excel
3IAoma\lcaly copes the forrrUa 10 the oCher eels Thus eel A2 contans the formula =COUNTlF(secoocLJsl,A2}=O.
eel A3 =COUNTlF(secoocLJSl.A3}=-O. etc

8 To hIghIIghI the teams 111 the second list that are not In the first 1IsI, selecl the range 81 820. creale a new r\k>
usng the formula =COUNTlF(IirsIlJsL81)=O, and selthe formallD orange iii

Result Denver 8roocos, ArIzona Cardinals, t.1innesota Vlkngs and Prttsbu-gh Steelers are no! III the first ~I
B
1
2 New Vort. Giants
3 lions lIoncas

,
4 Francisco 4gers
Colts
Chicago Bears
Tampa Bay Buccaneers
6 Patriots Washington Redsklns
7 Indianapolis Colts

,
8 San Diego Chargers
New England Patriots
Cincinnati sengals
Giants c.....
MIl. 14lVldllp
Bay Buccaneers
Seahilwks san Francisco 4gers
New Orleans Saints
Ho"'too Te)(ilns
Seattle Seahawks
18 1acksonville Jagua rs
Baltimore Rilvens
"20 Detroit Lions
21
Conflicting Rules
Sometimes multiple cood~ional formatllng rules in Excel conflict A higher rule always wins This example illustrates
two different resuRs

1 The value 95 is higher than 80 but is also the highest value (Top 1). The formats (yellow fill vs green fill and yellow
text color vs green text color) conflict A higher rule alwavs WIllS As a resuR, the value 95 IS colored yellow

Conditional Formntin9 RulH Man<lger 1 x


,S:how l orm~ttin9 J1llt~ fo r:

Rule ...
Rule (applied in ordel show n) Format App lies to Stop If True

Cell V.tIUf ~ 80 AaBbCcYyZl r. SA.Sl:SAS1 0 Ig;;' D


Top 1 AaBbCcYyZz . s..o..Sl:SAS10 --=::;I~!I!l1 D

0' Cl ost
Resu~

1
A
81

2

3
4 "
43
S 2
1 95 1
s
:j 11

"57
:1
11

2 Move the second n*! 141 The value 9515 the highest value {Top 1} but 15 also Ngt1ef than 80. The formals (green
flI vs yelow flI and green text color vs yelow text color) cOflflct. A I'lIghef n*! always WflS As a restAl, the value 95
IS colored green

Condition,1 Formutin9 RulH Manag~r 1 x


~how formatting lulu for; Currtnt Sfltction

o tjew Rule... I .

Cfll Val Uf 80 AaBbCcYyZz .. s.\SI ;Wl 0


~ o

., . ,.
Resu~


1
2 ,
B1

3
"
,
4 43

, 2

7 ",
,
8 11

,. 86

11 "
Note only use the Stop If True check bo~es for backwards compabbllity wnh earier verslOOS of MIcrosoft EJccei

Indiabulls
HOME LOANS
Checklist
This ex ample teac hes you how to create a chec klist In Excel First, turn on the Developer tab_ Next, you can create
a checklist

A B 0

1 Holiday Checklist
, Passport
2
Sun cream
Swimming costume
5 MoneV
6 Medication
7 Camera

,
8 A good book
Toothbrush
10 Trave l insurance documents
11 Mobile phone
12
13 Total items I.
I. Items packed 8
15
16 Am I good to go?
17 -
To create thIS checklist, execute the followll19 steps

On the Developer tab, In the Controls group, click Insert.

~
L:2r
Visual Maeros
Basic
~ Rl!<ord Macro
~ Us", R",lativ", R""H"'ne~
! Macro SKunty

Code
tf
Add-
m,
exe",1 (OM
~
AdcIins AdcIins
Addlns
In~
~
Design
~ Mode
Prop"'rti~
Q:JVi~Cod'"
00 Run Dialog
Controls

2. Click Check Box in the Form Controls section.

3. Draw a check box in cell B2.

A B ( o
1 Holiday Checklist
2 Passport
3 Sun cream
4 Swimming cost ume

4 To remove "Check Box 1", right click the check box , click the text and delete~.

5. Select cell B2

6. Click on the lower right comer of cell B2 and drag rt down to cell Bll
A B C 0

1 Holiday Checklist
I
2 Passport 0
l Sun cream
4 Swimming costume
5 Money
6 Medication
7 Camera

,
B A good book
Toothbrush
10 Travel insu rance documents
11 Mobile phone
12
+
7 Right rid the first check box ard click Formal Control

A B C 0

1 Holiday Checklist
~ ,0"
2 Passport
l Sun cream C'"
4 Swimming costume U~
5 Money [ 0 faste
6 Medication [
7 Camera [
yrOup'"lI
Order
,
B A good book
Toothbrush
0
0 Assign Mitcro...

10 Trave l i nsurance documents [~ format Control... ~


11 Mobile phone [j
12
8. Lmk the check box to the cell next to d (cell e2l

FOflTlat Objert ? x
Colon and Lines Size Protection Properties Art Te:d Co ntrol

Value
@J./.n<hecked
o !;hecked
o M ixed
Celi Jink: scs2I
-~
010 shadln,;!

OK Canul

9. Repe<l\ step B for the other check boxes

10. The count the number of rtems packed, Insert a COUNTIF funcllon Into cell 814
814 I. =COU NTI F(C2:Cll,TR UE)

A
C 0

1 Hoi iday Checklist


2 Passport ~ TRUE
3 Sun cream ~ TRUE
4 Swimming costume 0 fALSE
5 Money 0 fALSE
MedicatIon
7 Camera
0
0
FALSE
FALSE
8 A good book 0 FALSE
9 Toothbrush 0 FALSE
10 Travel Insurance documents 0 FALSE
11 Mobile pho ne 0 FALSE
12
13 Total lterns 10
14 Items packed I 2 I

-

,.
15
Am I good to go?
17

11 H!de colurmC

121nsenaniFfuncbonll1locellB16
Result:

816 : IF( B14:B13, "YES", ~ N O")

A 8 o E

1 Holiday Checklist
2 Passport 0
3 Sun cream 0
4 Swimming costume 0
,
5 Money
Medication
0
0
7 Camera 0
,
8 A good book
Toothbrush
0
0
10 Travel insurance documents 0
11 Mobile phone 0
12
13 Total items 10
14 Items packed 10
15
"JAm I good to go?
17
...
I

Note we created a coodillonal formalllllQ rule to change the background color of cell 816 depending on the celrs
value

You might also like