excelformulas tf jul1605

164
1 Introduction to Excel Yitzchak Rosenthal

Upload: shalua

Post on 25-Feb-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 1/164

1

Introduction to

Excel

Yitzchak Rosenthal

Page 2: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 2/164

Worksheet

Basics

2

Page 3: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 3/164

3

Worksheets

• Excel’s main

screen is called a

“worksheet”.

• Each worksheet is

comprised of many

 oxes! called

“cells”.

Page 4: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 4/164

"

#r$ani%e &nformation

• 'o( can or$ani%einformation y

typin$ a sin$le

 piece of data into

each cell. )see next

slides*

Page 5: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 5/164

+

,ow to Enter &nformation

Page 6: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 6/164

-

electin$ a /ell

• “Select” a cell y clickin$ on itonce )don’t

do(le click*.

• 'o( can move 

from cell to cellwith the arrowkeys or y pressin$ the

“Enter” key.

Page 7: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 7/164

0

Enterin$ &nformation he orm(la Bar 

• o enter information in acell! 4(st start typin$.

• When yo( are doneeither  5 

6ress the Enter Key 5  6ress an arrow key

 5  /lick on the “checkbutton” )only 7isilewhen enterin$ data intoa cell*

• he information in theselected cell is alsodisplayed in the“formula bar” ao7e theworksheet.

Page 8: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 8/164

8

9o(le /lick to :odify a /ell

• o modify the contentsof a cell do(le click

on the cell.

• hen (se the ri$ht! left

arrow keys and the&nsert and 9elete keys

to modify the data.

• When yo( are done;

 5  6ress the Enter keyor 

 5  /lick on the check ox.

Double click to

change “hi there” to

“hello there”

Page 9: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 9/164

<

 =ames of >ows! /ol(mns and

/ells

Page 10: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 10/164

1?

/ol(mn =ames (letters @ >ow =ames (numbers

• he columns of

the worksheet

are named with

letters• he rows are

named with

n(mers

Selected

!ell

Page 11: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 11/164

11

/ell =ames )ex. B"*

• he name of a cell is a cominationof the "etter #f $he !olumn thatthe cell is in followed y the%umber #f $he &ow that the cell isin.

• Example; the selected cell in the

 pict(re is named '  (NOT 4B) 

• Excel a(tomatically shows the thename of the currently selected cellin the “name box” )located ao7ethe worksheet*.

• he letter must  come first )i.e. B"! =# "B* and there may =# e anyspaces etween the letter and then(mer.

• We will learn later why it isimportant to (nderstand how to namecells.

%ame

'ox

Selected

!ell

Page 12: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 12/164

12

Aon$$$$$$$$ 9ata

Page 13: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 13/164

13

&nformation that is “too wide” for a cell• he word “=ame” is in cell

+• he words “,o(rs Worked”

are in cell ') )=# in cell/+*. ,owe7er! since theinformation is too wide for

cell B+! it looks like itextends into cell /+.

• 'o( can determine that theinformation is really only IN

cell ') y selectin$ cell B+and lookin$ at the form(la ar and then selectin$ cell/+ and lookin$ at theform(la ar.

“*ours

+orked” is

in cell ')

(look at

formula bar

“*ours

+orked” is

%#$ in cell

!) (formula

bar is em,ty

Page 14: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 14/164

1"

&nformation that is “/hopped #ff”• &f there is information

in the cell to the ri$ht!then the ori$inal cell

still contains all of the

data! (t the data

appears to e

“chopped off”.

• 'o( can see the

complete data yselectin$ the cell and

lookin$ in the

form(la ar.

Page 15: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 15/164

1+

/han$e the Width of a /ol(mn or

the ,ei$ht of a >ow

1-

Page 16: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 16/164

1-

:ake a col(mn wider 

• o make /ol(mn B wider! point the c(rsor to the

col(mn separator etween

col(mns B and col(mn /.

• he c(rsor chan$es to a

“9o(le headed arrow”.

•  =ow! click the left mo(se

 (tton and witho(t lettin$

$o of the (tton! dra$ the

separator to the ri$ht tomake the col(mn wider )or

to the left to make the col(mn

narrower*. !olumn is now wider

Drag column

se,arator to the

right

10

Page 17: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 17/164

10

Cettin$ the Exact Width

• o $et the “exact” width!do(le click on the

separator instead of

dra$$in$ it.

!olumn is now EXACTLY  the correct width

Double click here

18

Page 18: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 18/164

18

>esi%in$ a >ow

• :ake a rowtaller orshorter ydra$$in$the

separator etween therows.

• /lick anddra$ here toresi%e row+.

&ow is nowtaller

1<

Page 19: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 19/164

1<

6(ttin$ an “Enter” inside a cell

• o add a new lineinside a cell

 5  9o(le click inside

the cell where yo(

want the new line.

 5  6ress /trlDEnter

)i.e. hold down the

/trl key and press

Enter while still

holdin$ down

/trl*.

 5  When yo( are done

editin$! press Enter

)witho(t holdin$

down /trl* to

accept the chan$es.

Ste, -. #riginally

“*ours +orked”

is on one line/

Ste, 0. Double click

to edit cell and then,ress !trl1Enter

Ste, 2. 3ress Enter

(without !trl to

acce,t the changes/

Page 20: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 20/164

2?

Basic ormattin$

)e.$. old! colors! fonts! etc*

21

Page 21: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 21/164

21

ormattin$ /ells

• elect one or more cells and then click on any of the formattin$ (ttons )see

 elow* to chan$e the formattin$ of the selected cells.• ormattin$ (ttons;

fontname

fontsize

bold

italics

underline

center & mergecells

(will explain later)

center 

right justifyleft justify

These change the waynumbers are displayed

in cells (these don’taffect words)

show as currency(ex !"""#"$ becomes %!"""#")

show with commas (eg!'# becomes !'#)

show as percent (ex"# becomes #"*)

remo+e indent

show fewer decimal points (ex!"#"$ is displayed  as !"#!)

show more decimal points (ex!"#"$ is displayed  as !"#"$")

indent within cell

put border around cell(s)

color of cell

color oftext in cell

click ondownward

pointing arrowsfor other colors

and borderstyles

click ondownward

pointing arrowsfor other font

names andsizes

22

Page 22: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 22/164

22

Example 5 (nformatted worksheet

• nformatted worksheet 5 see next slide for formattin$.

23

Page 23: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 23/164

23

Example 5makin$ cells old• /lick on cell 1 and dra$ to cell 3.

• hen press the Bold (tton to make cells 1!2!3 old.• 'o( co(ld also press the font or ack$ro(nd color (ttons to chan$e the color

or apply any other formattin$ yo( like )this is not shown elow*.

2"

Page 24: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 24/164

2"

#ther Ways of electin$ :ore han #ne

/ell

• o select a lar$e ran$e of cells! click on the (pperleft cell in the ran$e. hen hold the shift key and

click on the lower ri$ht cell in the ran$e.

• 'o( can select different “nonDconti$(o(s” areas ofcells y holdin$ down the /trl key while clickin$

and dra$$in$.

2+

Page 25: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 25/164

2+

electin$ =onD/onti$(o(s >an$es

• /lick anddra$ to

select the

first

ran$e.

• /trlDclick

and dra$to select

additional

ran$es

($his cell is also selected

even though it a,,ears

white/

2-

l i i i l

Page 26: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 26/164

2-

electin$ entire >ows! entire /ol(mns or

all cells on the worksheet.

• o select an entire col(mn! click on the letter forthe col(mn header. o select se7eral col(mns!

click on the header for the first col(mn and dra$ to

the ri$ht.• o select an entire row! click on the n(mer for the

row header. o select se7eral rows! click on the

header for the first row and dra$ down.• o select all of the cells on the spreadsheet! click

on the (pper left hand corner of the spreadsheet

)where the col(mn headers meet the row headers*

20

Page 27: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 27/164

20

elect Entire /ol(mns>owsWorksheet$o select E%$I&E !#"45% '

click on “'” column header

$o select !#"45%S '6!6D

click on “'” column header and drag to right

$o select !#"45%S '6! and 7686*  5  click on “'” column header6 drag to right6

 5  then !trl1!lick on “7” column header and drag right

$o select E%$I&E &#+ 0

click on “0” row header

$o select &#+S 062 and )696: 5  click on “0” row header6 drag down6

 5  then !trl1!lick on “)” row header and drag down

$o select E%$I&E +#&KS*EE$ 

click on select worksheet button

(in corner between “-” and “;” buttons

!lick !lick 

dra$!lick 

drag

/lick and dra$ down

then /trlD/lick

and dra$ down

!lick drag

!trl1

!lick !lick 

28

Page 28: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 28/164

28

Example D contin(ed

• Ste, -. /lick onrow header forrow +

• Ste, 0. /trlDclick onrowDheader forrow 11

• Ste, 2. 6ressBold (tton ortype ctrlD

• %ote. fter

 ein$ “olded”!the word“Employee” isnow too widefor the col(mn!so make thecol(mn wider ifnecessary )thisstep is notshown*.

Page 29: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 29/164

2<

:ore d7anced ormattin$

3?

Page 30: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 30/164

ormat /ells• sin$ the formattin$ (ttons only

$i7e yo( a limited amo(nt offormattin$ aility.

• or more formattin$ aility! selectone or more cells and ri$ht click onthe selection. hen choose “formatcells” from the pop(p men(.

• /hoose options from the =(mer!li$nment! ont! Border and6atterns tas and press #F tochan$e the way yo(r informationlooks on the screen.

•he 6rotection ta is (sed to lockcells so that their contents can’t emodified.

• We will not $o into the details of(sin$ the format cells dialo$ ox atthis time (t yo( sho(ld e ale to

fi$(re o(t most of it y yo(rself.

31

i h h hi A##F

Page 31: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 31/164

ormattin$ chan$es how thin$s A##F!

not how they W#>F.

•  =#E; yo( will proaly not (nderstand this slide(ntil after yo( learn ao(t Excel orm(las.

orm(las are co7ered later in this presentation.

• When yo( chan$e the format of a cell! Excel still“rememers” the ori$inal 7al(e.

• Excel will (se the (nDformatted 7al(e when

calc(latin$ form(la 7al(es.• Example; if yo( chan$e n(mers to appear with

fewer decimal points the ori$inal n(mer with all

of its decimal points are (sed in calc(lations.

Page 32: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 32/164

orm(las

he read and (tter of Excel

32

33

Page 33: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 33/164

Excel orm(las

• 'o( m(st ha7e an eG(als si$n ) H * as the firstcharacter in a cell that contains a form(la.

• he H si$n tells excel that the contents of the cell

is a form(la• Witho(t the H si$n! the form(la will not calc(late

anythin$. &t will simply display the text of the

form(la.

3"

Page 34: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 34/164

orm(las D correct

form(la with H si$n fter pressin$ E=E>  

3+

Page 35: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 35/164

:issin$ H si$n

:issin$ H si$nI

Before pressin$ enter 

fter pressin$ E=E>

)no chan$e D not a f(nction*

3-

Page 36: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 36/164

ypes of operations

• 'o( can (se any of the followin$ operations in aform(la;

operation symol example

addition; J Ha1J3s(traction; D H1??D3

m(ltiplication; K Ha1K1

di7ision; Hd11??exponentiation L Ha2L2

ne$ation D HDa2J3

)same symol as s(raction*

30

Page 37: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 37/164

Explicit )literal* 7al(es and cell references

• 'o( can (se oth explicit 7al(es and cellreferences in a form(la

• n explicit 7al(e is also called a literal value

 5 orm(la with only cell references; Ha1K1

 5 orm(la with only literal 7al(es; H1??20

 5 orm(la with oth cell references and literal 7al(es;

Ha11??

Page 38: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 38/164

38

Errors in orm(las

3<

Page 39: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 39/164

/ommon Errors

• he followin$ are some errors that may appear in a spreadsheet )there are others too*.

 5  MMMMMMM• /ell is too narrow to display the res(lts of the form(la. o fix this simply make the col(mn wider and

the “real” 7al(e will e displayed instead of the MMMMMM si$ns. =ote that e7en when the MMMMMM si$ns are ein$ displayed! Excel still (ses the “real” 7al(e to calc(late form(las that reference this cell.

 5  M=:EN• 'o( (sed a cell reference in the form(la that is not formed correctly )e.$. HBBJ1? instead of HB3J1?*

 5  MOAEI• s(ally the res(lt of tryin$ to do math with a text(al 7al(e. Example; H1K3 where 1 contains the

word “hello”

 5  M9&O?I

• ryin$ to di7ide y %ero. Example; H31 where 1 contains ? )%ero*

 5  /irc(lar >eference• sin$ a form(la that contains a reference to the cell that the form(la “li7es in”. Example; p(ttin$ the

form(la H1J1 in cell 1 or p(ttin$ the form(la H:)1;B2* in any of the cells 1! B1! 2! B2

Page 40: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 40/164

"?

#rder of #perations

"1

Page 41: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 41/164

/omplex form(las

• 'o( can (se se7eral operations in one f(nction• 'o( can $ro(p those operations with parentheses

• Examples

H3K2J1

Hc1K)a1J1*

H)1??Ka2D1?*J)2??K3D2?*J3?

H)3J2K)+?3J3*0*K)3J0*

"2

Page 42: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 42/164

#rder of operations

• When (sin$ se7eral operations in one form(la!Excel follows the order of operations for math.

 5 first; all parentheses D innermost first

 5 second; exponents )L* 5 third; all m(ltiplication )K* and di7ision )*. 9o

these startin$ with the leftmost K or

and work to the ri$ht.

 5 fo(rth; all addition )J* and s(traction )D*. 9o

these startin$ with the leftmost J or D

and work to the ri$ht.

"3

Page 43: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 43/164

6lease Exc(se :y 9ear (nt ally

• he sentence P6lease exc(se my dear a(nt allyP is a pop(lar mne(monic to rememer the order of operations;

:en(monic :eanin$

 5  3lease parentheses

 5  Exc(se exponents

 5  5y Dear m(litplication and di7ision)$oin$ left to ri$ht*

 5  ;(nt Sally addition and s(traction

)$oin$ left to ri$ht*

""

Page 44: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 44/164

#rder of operations

• $he value of

2 < 0 = )

is

-2

%#$ 0)>

"+

Page 45: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 45/164

#rder of operations3 + (100 - 20) / 10 - 6 * 2 / 4 + 9

3 + 80 / 10 - 6 * 2 / 4 + 9

3 + 8 - 6 * 2 / 4 + 9

3 + 8 - 12 / 4 + 9

3 + 8 - 3 + 9

11 - 3 + 9

8 + 9

answer: 17

"-

Page 46: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 46/164

/ntrlDQ

• o see the form(las in the worksheet 5 6ress the /ntrl key at the same time as yo( press the Q

key )i.e. /ntrlDQ*

 5 6ress /ntrlDQ a$ain to see the 7al(es

"0

Page 47: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 47/164

(nctions

"8

Page 48: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 48/164

What is a f(nctionN

• f(nction is a Pnamed operationP

• (nctions ha7e

 5 a name

 5  parentheses

 5  parametersar$(ments inside the parentheses

• he words parameter and ar$(ment mean the same thin$

• yo( can ha7e many parameters for one f(nction separatedwith commas )!*

• he n(mer of parameters is one more than the n(mer of

commas.

"<

Page 49: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 49/164

he : f(nction

• Examples

(nction >es(lt

H:)1!2!3!"!+* 1+

H:)a1!1!c1* a1J1Jc1

H:)<!a1!2!+!c1* <Ja1J2J+Jc1

+?

Page 50: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 50/164

erminolo$y

S45(-606266)

 5 he name of the f(nction is P:P

 5 he ,arameters or arguments to this f(nction are

1!2!3!" and +

 5 he entire thin$! i.e. :)1!2!3!"!+*! is a function call

 5 he value of this f(nction call is 1+.nother way to say this is that this f(nction callreturns 1+.

Page 51: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 51/164

>an$es )e.$. a1;c3*

+1

>an$es+2

Page 52: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 52/164

>an$es• rectan$(lar ox of cells is called a “ran$e”.

• he name of a ran$e is

 5  the name of the (pper left cell of the ran$e 5  ollowed y a colon ;

 5  ollowed y the lower ri$ht cell of the ran$e

• Example; 1;B2 is shorthand for 1!2!B1!B2

 5  ee next slide for more examples

A1:B2

Examples of >an$e =ames+3

Page 53: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 53/164

Examples of >an$e =ames• Examples

/3;E1?

B2;B+

B3;E3

+"

Page 54: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 54/164

sin$ a ran$e as a parameter 

• >an$es can e specified as a parameters to a f(nction call.• Both of the followin$ f(nction calls prod(ce the same

res(lt as Ha1J1Jc1Ja2J2Jc2Ja3J3Jc3Ja"J"Jc"

howe7er the 2nd 7ersion (ses a ran$e and is m(ch shorter.

witho(t a ran$e

H:)a1!1!c1!a2!2!c2!a3!3!c3!a"!"!c"*

with a ran$e

H:)a1;c"*

++

Page 55: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 55/164

(nction calls with m(ltiple parameters

• 'o( can incl(de m(ltiple ran$es and cells as parameters

• Example; the followin$ f(nction call has 3 parameters.

here are two ran$es )a1;2 and c";c0*! one n(mer )1??*

and one cell reference )d3*

H:)a1;2!1??!c";c0!d3*

&s the same as;

H:)a1!a2!1!2!1??!c"!c+!c-!c0!d3*

Page 56: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 56/164

#ther (nctions

+-

+0

Page 57: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 57/164

#ther f(nctions

• /lick the f(nction (tton to see the a7ailalef(nctions;

7unction buton

 rin$s (p the

f(nction dialo$ ox

)see next slide*

+8Warnin$; this slide was created (sin$Excel 2???. he dialo$ ox in later

Page 58: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 58/164

  (nction dialo$ ox

cate$ories)i.e. $ro(ps of f(nctions*

(nctions for the selected cate$ory

9escription

of c(rrently

selected

f(nction

Excel 2???. he dialo$ ox in later

7ersions of Excel looks a little different!

 (t it has the same f(nctionality.

+<

i di

Page 59: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 59/164

(nction Editor 

• 9o(le click on the f(nction name to $et a dialo$ ox that helps yo( enter 7al(es for the parameters

of the f(nction.

)see next slide*

-?

i di

Page 60: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 60/164

(nction Editor When yo( press #F! this will create

the f(nction call;  OE>CE)2!a1;c2!f13*

6(t 7al(es for the parameters in

the edit oxes.

-1

E l

Page 61: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 61/164

Example

• OE>CE

form(la that contains a f(nction 7al(e

HOE>CE)2!"!1?!"* +

HOE>CE)a1!f32* )a1Jf32* 2

HOE>CE)a1;c1* )a1J1Jc1* 3

HOE>CE)a1;c1!1?* )a1J1Jc1J1?* "

-2

Page 62: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 62/164

/ominin$ (nctions and other 7al(es

in a sin$le form(la

-3

i d h l

Page 63: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 63/164

(nctions and other 7al(es

• 'o( can comine f(nctions! cell references andliteral 7al(es to make a complex Excel form(la

• Examples

H3 J 23 K :)d2?;$2?*H:)a1!1??* K OE>CE)d1?;41?*

H1?? ) OE>CE)2!c2!d3?* J OE>CE)f1;f2?* *

-"

Page 64: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 64/164

#ther ypes of /ell >eferences>eferences to entire >#Ws

>eferences to entire /#A:=s

>eferences to cells or ran$es on other worksheets )i.e. tas*

-+

E ti > ) 2 2 2 "*

Page 65: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 65/164

Entire >ows )e.$. 2;2 or 2;"*

• cell reference of the form Rrow=ameS.Rrow=ameS refers to theran$e of all the cells for those rows.

• Example; 5  he reference! 2.2! refers to all of the cells on the 2nd row.

 5  he followin$ form(la adds (p all of the 7al(es on the 2nd and "th rows of thespreadsheet;

Hs(m)2;2!";"*

• nother Example; 5  he reference! 2.! refers to all of the cells on the 2nd ! 3rd and "th rows!.

 5  he followin$ form(la adds (p all of the 7al(es on the 2nd! 3rd! "th ! 1?th! 11th !12th! 13th! 1"th and 1+th rows of the spreadsheet;

Hs(m)2;"!1?;1+*

--

E ti / l ) B B B 9*

Page 66: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 66/164

Entire /ol(mns )e.$. B.B or B.9*

• cell reference of the form Rcol=ameS.Rcol=ameS refers to theran$e of all the cells for those col(mns.

• Example; 5 

he reference! B.B! refers to all of the cells in the 2nd

 col(mn. 5  he followin$ form(la adds (p all of the 7al(es in the 2nd and "th  col(mns ofthe spreadsheet;

Hs(m)B.B!9;9*

• nother Example; 5  he reference! B.D! refers to all of the cells in the 2nd! 3rd and "th col(mns.

 5  he followin$ form(la adds (p all of the 7al(es in the 2nd! 3rd! "th! -th and 0th col(mns of the spreadsheet;

Hs(m)B;9!;C*

-0

> f t ll th k h t

Page 67: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 67/164

>eferences to cells on other worksheets

• /ell on another sheet;   sheetName!cellReference• >an$e on another sheet;   sheetName!range

• >ow on another sheet;   sheetName!row:row

• /ol(mn on another sheet;   sheetName!column:column

• If a sheet name has a s,ace in it6 you must surroundthe sheet name with a,ostro,hes (i/e/ single ?uotes

• Examplessheet2Ia1

sheet2I";c8

T2??2 orecastsTIf3;f1?

Hs(m)T2??2 orecastsTIf3;f1?*

Hs(m)T22?2 orecastsTIf;f*

-8

: l

Page 68: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 68/164

:ore examples

• dd (p 7al(es from 2 different sheetsHs(m ) T$reat stocksTI2;c"! Tso so stocksTI2;c"*

•his next one is a little conf(sin$Hs(m )a1!aIa1!1;"!1I"!cIc;c*

Explanation

a- this is a cell reference on the c(rrent sheeta>a- PaP is the name of sheet. Pa1P is a cell on the PaP sheetb-.b this is a ran$e on the c(rrent sheetb->b P1P is the name of a sheet. P"P is a cell on the P1Psheetc>c.c “cP is the name of a sheet. “c;cP is all of the cells in the c col(mn

 on the “c” sheet

-<

Page 69: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 69/164

sol(te and >elati7e

/ell >eferences

0?

l t d > l ti / ll > f

Page 70: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 70/164

sol(te and >elati7e /ell >eferences

• By defa(lt! when yo( copy a form(la that containsa cell reference! excel will a(tomatically ad4(st thecell reference.

• 'o( can stop Excel from a(tomatically ad4(stin$the cell reference y (sin$ one or more dollar si$ns)U* in the cell reference. hese are called asol(te

cell references.

• cell reference witho(t a dollar si$n is a relati7e

cell reference.

01

E l

Page 71: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 71/164

Examples

• he followin$ all refer to the same celld<

UdU<

Ud<

dU<

• he only difference etween these cell references

relates to what happens when yo( copy a form(la

that contains the cell reference.

02

> l ti / ll > f

Page 72: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 72/164

>elati7e /ell >eference

• d@  his is a Prelati7e cell referenceP. 5 /han$in$ the col(mn; &f & copy this cell reference to

another cell;

•  the PdP will increment one letter for e7ery cell that & mo7eo7er to the ri$ht.

• he PdP will decrement one letter for e7ery cell that & mo7e

o7er to the left

 5 /han$in$ the row; &f & copy this cell reference toanother cell;

•  the P<P will increment y one for e7ery cell that & mo7e

down.

• he P<P will decrement y one for e7ery cell that & mo7e (p

03

l t ll f

Page 73: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 73/164

sol(te cell reference

• AdA@ his is an asol(te cell reference. 5 &f & copy a form(la with this cell reference! the cell

reference will =# chan$e AA.

0"

:i ed >eferences

Page 74: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 74/164

:ixed >eferences

• Ad@  and  dA@ hese are P:ixedP cell references;

• Ud<

 5 he PdP will stay the same when yo( copy the cell! (t

the P<P will chan$e.

• dU< 5 he PdP will chan$e when yo( copy the cell! (t the

P<P will stay the same.

0+

Page 75: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 75/164

9ata ypes

0-

9ata ypes

Page 76: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 76/164

9ata ypes•  =(meric

 5  7al(es; any n(mer  

 5  operators; J D K L V

 5  sample f(nctions; s(m) *! a7era$e) *! max) *! min) * etc.

• ext )F /haracter or trin$* 5  7al(es; ny $ro(p of letters or n(mers or special characters.

6refix 7al(e in cell with an apostrophe ) T * to force a text 7al(e

 5  operators; @ )concatenation*

 5  sample f(nctions; ri$ht) *! left)*! mid)*! lower)*! (pper)*! len)*! etc

• 9ates 5  7al(es; dates and times

operators; =

 5  sample f(nctions; now) *! today) *! ho(r)*! min(te)*! etc.

• Ao$ical )F oolean* 5  7al(es; tr(e false

 5  #perators; R S H RS RH SH

 5  sample f(nctions; if) *! and) *! or) *! not) *! islank)*

00

9ata ypes for Oal(es in /ells

Page 77: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 77/164

9ata ypes for Oal(es in /ells

• By defa(lt; 5 a cell that contains a n(mer is treated as n(meric data

 5 a cell that contains a date is treated as date data )weTll

see more ao(t this later* 5 a cell that contains data which is

not n(meric and not a date is treated as PtextP

Page 78: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 78/164

08

ext 9ata

0<

ext trin$ /haracter

Page 79: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 79/164

ext trin$ /haracter 

• he followin$ three terms all (sed to refer toPtextP data. ll three terms mean the same thin$.

 5 text data 5 strin$ data

 5 character data

• his presentation will $enerally (se the term Ptext

dataP (t yo( sho(ld e familiar with the terms

Pstrin$ dataP and Pcharacter dataP

8?

ext data

Page 80: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 80/164

ext data

• ext data is (sed to store $eneral p(rpose text )e.$.names! places! descriptions! etc*

• 'o( canTt do PmathP with text 7al(es )o7io(sly*

81

ext isnTt part of n(merical calc(lations

Page 81: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 81/164

)o7io(sly*orm(la to

add (p all

n(mers in

col(mn /

(Same

S,readsheet

ext data in/1 is not

incl(ded in

the (m

form(la 7iew )press /ntrlDQ*

7al(es 7iew )press /ntrlDQ*

Page 82: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 82/164

82

ext (nctions

83

ext (nctions

Page 83: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 83/164

ext (nctions

• :any f(nctions are (sed to manip(late text 7al(es.• he followin$ are only some of them

ri$ht) *

left) *mid) *

concatenate) *

lower) *

(pper) *len) *

Page 84: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 84/164

8"

>&C,! AE and :&9

f(nctions

8+

>&C, f(nction

Page 85: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 85/164

>&C, f(nction

• he >&C, f(nction is (sed to isolate a specificn(mer of “characters” from the ri$ht hand side of

a text 7al(e.

• )example on next slide*

8-

>&C, ) RtextS Rn(m/haractersS*

Page 86: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 86/164

>&C, ) RtextS! Rn(m/haractersS*

7ormula Biew

Balues Biew

80

>&C, 5 n(m/haracters is optional

Page 87: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 87/164

>&C, 5 n(m/haracters is optional

• he Rn(m/haractersS parameter in the >&C,f(nction is optional. &f yo( don’t specify it the

defa(lt is 1 )one*.

7ormula Biew

Balues Biew

$hese ,roduce thesame results/

88

AE

Page 88: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 88/164

AE

• he AE f(nction is the same as the >&C,f(nction! (t it ret(rns characters from the AE

side of the 7al(e.

8<

:&9 ) RtextS! Rstart6ositionS !

Page 89: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 89/164

Rn(m/haractersS*

• :&9 is (sed to $et 7al(es from the middle of sometext.

• :&9 takes 3 parameters; 5 he ori$inal text

 5 he position to start takin$ the new 7al(e from

 5 he n(mer of characters to take for the new 7al(e

• Example on next slide

<?

Example; :&9 ) RtextS! Rstart6ositionS !

Page 90: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 90/164

Rn(m/haractersS*

• his example extracts the second thro($h thefo(rth characters from the ori$inal text 7al(e;

7ormula Biew

Balues Biew

Page 91: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 91/164

<1

/oncatenation

) @ * and

/#=/E=E f(nction

<2

/oncatenation )@*

Page 92: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 92/164

/oncatenation )@*

• se @ to comine )or concatenate* two different text 7al(es

7ormula Biew

Balues Biew

%otice that there is no

s,ace between the two

values

<3

/oncatenate many 7al(es

Page 93: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 93/164

/oncatenate many 7al(es

• 'o( may concatenate many 7al(es to$ether 7ormula Biew

Balues Biew

<"

/oncatenation with PliteralP 7al(es

Page 94: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 94/164

/oncatenation with literal 7al(es

• 'o( can also concatenate PliteralP 7al(es.• 'o( m(st incl(de the literal 7al(es inside G(otes

• or example to display spaces in the Pf(ll nameP

in the pre7io(s example yo( co(ld (se thefollowin$ form(la. Each space that yo( want to

display m(st e incl(ded in G(otes.

H2@P P@B2@P P@/2

)9onTt for$et any of the @Ts *

• ee next slide ...

<+

/oncatenatin$ spaces D Example

Page 95: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 95/164

/oncatenatin$ spaces Example

• 'o( can concatenate spaces into a form(la7ormula Biew

Balues Biew valuescontain

s,aces

<-

AE) * with @ in same form(la

Page 96: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 96/164

AE) * with @ in same form(la• 'o( can comine the res(lts of different f(nction

calls with concatenation.7ormula Biew

Balues Biew

<0

6(ttin$ it all to$ether

Page 97: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 97/164

6(ttin$ it all to$ether • &n this example we concatenate periods into the

initials.7ormula Biew

Balues Biew

$he initials now contain

,eriods

<8

/#=/E=E (nction

Page 98: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 98/164

/#=/E=E (nction

• 'o( can (se the /#=/E=E f(nction insteadof the ampersand )@*.

• he followin$ form(las are eG(i7alent;

H1@B1@/1

H/#=/E=E)1!B1!/1*

• he /#=/E=E f(nction can take as many

parameters as yo( like.

Page 99: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 99/164

<<

:ore ext (nctions;A#WE> 

66E> AE=

1??

A#WE> ) RtextOal(eS *66E> ) O l *

Page 100: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 100/164

66E> ) RtextOal(eS *

• A#WE> con7erts text to lower case.• 66E> con7erts text to (pper case.

• Example;

7ormula Biew

Balues Biew

1?1

AE= ) RtextOal(eS *

Page 101: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 101/164

AE= ) textOal(e *

• AE= ret(rns a n(meric 7al(e eG(al to the n(merof character in a text 7al(e )i.e. the “len$th” of the

text 7al(e*.

• paces >E incl(ded in the len$th.• Example

7ormula Biew

Balues Biew

Page 102: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 102/164

1?2

9ates and imes

1?3

,ow Excel tores 9ates

Page 103: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 103/164

,ow Excel tores 9ates

• 9ates are stored in Excel as the n(mer of days since 9ec 31!18<< for that date. )ex. an 1! 1<?? is stored as the n(mer 1*.

• o see this! type a date in a cell and then press /trlDQ to see the

“form(las 7iew”.

• Exam,le 5  Balues Biew

 5  7ormulas Biew

Dates become

numbers in

“formulas

view”

1?"

imes and 9ates in the same /ell

Page 104: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 104/164

/

• cell can contain oth a date and a time.

• he 7al(e of oth the date and the time is stored internally as a sin$le decimal n(mer.

• he whole n(mer portion represents the 9E and is the n(mer of days since 9ec. 31!18<<

• he decimal part represents the &:E and is the fraction of the day that has elapsed.

• Examples;

 5  an 1! 1<?? at 12: is 1.? )i.e. 1 day since 9ec 31! 18<< and ? percent of the day elapsed so far*

 5  an 1! 1<?? at 126: is 1.+ )i.e. ?.+ of the day elapsed*

 5  an 2! 1<?? at 126: is 2.+ )i.e. 2 days since 9ec. 31! 18<<*

 5  e 1! 1<?? at 1;?+ 6: is 32.+"+138888888< )i.e. 32 days since 9ec 31! 18<< and?.+"+138888888< of the day elapsed y 1;?+ 6:. his makes sense as it is a little past noon so a

little more than half of the day elapsed.

1?+

imes and 9ates D Example

Page 105: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 105/164

p

• Oal(es Oiew

• orm(las Oiew

1?-

9ate rithmetic

Page 106: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 106/164

• 'o( can do arithmetic with dates.• dd and s(tract days y addin$ and s(tractin$ whole n(mers.• dd and s(tract times y addin$ and s(tractin$ fractional 7al(es.

• ExamplesH1J0 )one week after the date in 1*

H1D+K0 )+ weeks efore the date in 1*

H1D )12"* )one ho(r efore the time specified in 1*

H1J )32"* )three ho(rs after the time specified in 1*

H1J2.+ )two and a half days after the time specified in 1*

H1D2J1 )the M of days etween the date in 1 and the date in 2*

1?0

ormattin$ cells with 9ates and imes

Page 107: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 107/164

$

• >i$ht click on the cell andchoose “ormat /ells”

• rom the “/ate$ory” list in the

“=(mer” ta either 

 5  /hoose “9ate”! “ime” or

“/(stom” and choose an

appropriate lookin$ format

#>

 5  &f yo( choose “Ceneral” or

“=(mer”! the internal n(mer

for the 9ateime will e

displayed in the spreadsheet e7en

in the “7al(es” 7iew.

Page 108: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 108/164

1?8

Ao$ical )F oolean* 7al(es

1?<

>E and AE

Page 109: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 109/164

• lo$ical 7al(e can e one of only two 7al(es

>E

  or 

AE

11?

>E

Page 110: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 110/164

• he followin$ statements are >E;

ish li7e in water.

9eer li7e on land.

 

• he followin$ statements are also >E;

3 is $reater than 2

2 is less than 3

2 is less than or eG(al to 3

2 is less than or eG(al to 2

3 is $reater than or eG(al to 23 is $reater than or eG(al to 3

2 is eG(al to 2

2 is not eG(al to 3

111

AE

Page 111: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 111/164

• he followin$ statements are AE;

ish li7e on land.

9eer li7e in water.

 • he followin$ statements are also AE;

2 is $reater than 3

3 is less than 23 is less than or eG(al to 2

2 is $reater than or eG(al to 3

2 is eG(al to 3

2 is not eG(al to 2

112

Ao$ical operators

Page 112: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 112/164

$ p

• &n Excel the followin$ PoperatorsP are (sed#,erator 5eaning

S $reater than

R less thanSH $reater than or eG(al to

RH less than or eG(al to

H eG(al to

RS not eG(al to• Examples

3 S 2 tr(e

3 R 2 false

113

Ao$ical orm(las

Page 113: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 113/164

$

orm(la Oiew Oal(es Oiew

11"

ame form(las! different 7al(es

Page 114: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 114/164

orm(la Oiew Oal(es Oiew

11+

& (nction

Page 115: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 115/164

11-

6arameters for & f(nction

Page 116: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 116/164

110

& f(nction

Page 117: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 117/164

orm(la Oiew Oal(es Oiew

118

& with a n(meric res(lt

Page 118: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 118/164

11<

& with a n(merical res(lt

Page 119: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 119/164

orm(la Oiew Oal(es Oiew

12?

Page 120: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 120/164

=9

#> 

 =#

121

=9

Page 121: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 121/164

• he followin$ is >E

ish li7e in water =9 deer li7e on land.

• he followin$ are all AE

ish li7e in water =9 deer li7e in water.

ish li7e on land =9 deer li7e on land.ish li7e on land =9 deer li7e in water.

122

=9 f(nction

Page 122: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 122/164

123

=9

Page 123: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 123/164

orm(la Oiew Oal(es Oiew

12"

& with =9 D nested f(nction calls

Page 124: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 124/164

• 'o( can (se an =9 inside of an &.• his is called a =EE9 =/&#= /AA

• Example

H&) =9 )2S3!B2RSB3* ! +??! 1???*

=9 is PnestedP inside of the &

hese parentheses Pelon$ toP the if 

12+

& with =9 D parameters

Page 125: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 125/164

6arameters for & f(nction;

12-

& with =9 D spreadsheet 7iews

Page 126: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 126/164

orm(la Oiew Oal(es Oiew

120

=9 f(nction

Page 127: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 127/164

• akes any n(mer of parameters• >et(rns >E if AA of the parameters e7al(ate

to >E otherwise ret(rns AE.

128

#> and =# f(nctions

Page 128: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 128/164

12<

#> 

Page 129: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 129/164

• akes any n(mer of parameters• >et(rns >E if =' of the parameters e7al(ate

to >E otherwise ret(rns AE

13?

 =#

Page 130: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 130/164

• akes #=A' #=E parameter • >et(rns the PoppositeP of the 7al(e of the

 parameter 

 5 ret(rns AE if the parameter 7al(e is >E 5 ret(rns >E if the parameter 7al(e is AE

131

Examples of /omplex =ested (nction /alls

Page 131: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 131/164

• H&)=9)2S3! #>)B2HB3!/2R/3**! +??! 1???*

• H&)=#)=9)2S3! #>)B2HB3!/2R/3***! +??! 1???*

• H&)=9)2S3! =#)#>)B2HB3!/2R/3***! +??! 1???*

Page 132: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 132/164

132

#ther Ao$ical (nctions;

&BA=F 

133

&BA=F) R7al(eS *• &BA=F ret(rns >E if the 7al(e is lank and

Page 133: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 133/164

&BA=F ret(rns >E if the 7al(e is lank and

false otherwise. )see example elow*

7ormula Biew

Balues Biewblank value

$otal will be

wrong if

?uantity is

blank (since

a blank is

normally

treated as

Cero

$otal will be correct even if ?uantity

is blank (?uantity is assumed to be -

in that case

Page 134: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 134/164

;33E%DI!IES

13"

Page 135: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 135/164

13+

sin$ the mo(se to create

form(las.

13-

/lick to choose cell references

Page 136: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 136/164

• #nce yo( type the eG(al si$n )H* yo( can click with yo(rmo(se to enter cell references into a form(la.

• Example on followin$ slides

%ow you can click with your mouse to

enter cell references/

130

Example; click to $et cell reference• ype a n(mer in cell 1 • ype a pl(s si$n )J* si$n and

Page 137: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 137/164

• ype a n(mer in cell 1

• type an eG(al si$n )H* in B1

• /lick on cell 1. 'o( will seea dashed line aro(nd cell 1and the text “1” )witho(t theG(otes* will e entered into theform(la in B1. he dashed lineindicates that this is the cellreference ein$ entered.

• ype a pl(s si$n )J* si$n andthe dashed line aro(nd cell 1

disappears.

• 'o( can contin(e to fill o(t therest of the form(la now;

• 6ress E=E> to $et the res(lt;

138

Example; chan$in$ the cell reference• ype n(mers in cells 1 and B1 • /lick cell B1. he dashed line mo7es to

Page 138: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 138/164

ype n(mers in cells 1 and B1

• ype an eG(al si$n )H* in /1

• /lick on cell 1. 'o( will see a

dashed line aro(nd cell 1 and

the text “1” )witho(t the

G(otes* will e entered into the

form(la in /1. he dashed lineindicates that this is the cell

reference ein$ entered.

/lick cell B1. he dashed line mo7es tocell B1 and the text in cell /1 chan$es to“B1”. 'o( can keep clickin$ on different

cells (ntil yo( click on the ri$ht one.

• ype a pl(s si$n )J* si$n. he dashed linearo(nd cell B1 disappears.

• &f yo( click on another cell now! a new cellreference will e entered.

• 'o( can contin(e to fill o(t the rest of theform(la now X

13<

se mo(se to enter other types of cellreferences.

Page 139: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 139/164

references.

• /ell ran$es;• /lick and dra$ on a cell to enter a cell ran$e reference

• /ells on a different worksheet 5 /lick on a cell on another worksheet to enter a

reference from a different worksheet.

 5 Be s(re to type the next symol in the form(la )e.$. a

 pl(s si$n )J* ! a comma )!* ! etc efore yo( click on the

ori$inal ta. &f yo( don’t then the form(la will e

incorrect )try it*.

Page 140: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 140/164

1"?

#>:&=C /EAA

EY

1"1

 =(mers with leadin$ %eros• ometimes yo( desire to ha7e to ha7e %eroes displayed at the e$innin$ of a n(mer

Page 141: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 141/164

• ometimes yo( desire to ha7e to ha7e %eroes displayed at the e$innin$ of a n(mer.

• or example! social sec(rity n(mers are made (p of < di$its. he first few di$its may e %eroes.

• his ca(ses in a prolem in Excel. When yo( type in a n(mer with leadin$ %eroes into acell! Excel remo7es the leadin$ %eroes when yo( press Enter.

• E;53"E;&f yo( type the followin$ into a cell )efore yo( press Enter*

When yo( press Enter yo( $et this;

• See next slides for how to fix this

Leading

zeroes are

missing

1"2

ormattin$ a cell to display as text

Page 142: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 142/164

• o fix this prolem yo( can “format” the cell todisplay as “text” instead of as a “n(mer”.

• he 7al(e will still e ale to e (sed incalc(lations (t it will e displayed on the screen(sin$ the r(les for text 7al(es instead of the r(lesto display n(mers

• #ne of the r(les Excel (ses to displayin$ n(mers

is to remo7e leadin$ %eroes.• ,owe7er! if a n(mer displayed as PtextP data then

Excel W&AA display leadin$ %eros.

• ee next slide for instr(ctions on how to do this

1"3

#penin$ the Pormat cellsP dialo$ ox

Page 143: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 143/164

• elect the cell or cells that yo( want to format as text.• >i$ht click on the selected cell)s* and choose the

followin$ from the pop(p men(

format cells

or click on a cell and choose the followin$ men( choice

format Z cells

• hen yo( will see the Pormat /ellsP dialo$ ox.

)ee the next slide ...*

1""

Pormat /ellsP dialo$ ox

Page 144: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 144/164

• /hoosePextP

from the

P=(me

rP ta

and

 press the

#F (tton.

1"+

 =ot a 6erfect ol(tion X

Page 145: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 145/164

• When yo( format the cell as “text” it will displaythe leadin$ %eroes )yo( m(st type them in a$ain*.

• *owever! Excel will warn yo( that a n(mer is

formatted as text. )see next slide*

1"-

>es(lt of ormattin$ a =(mer as ext

Page 146: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 146/164

• Excel indicates this iss(e

with a$reen trian$le in the (pperleft hand corner of the cell;

• &f yo( select the cell yo(can see the error messa$e.

• 'o( can ha7e Excel toi$nore this type of “error”

 y choosin$ the “ools Z#ptions” men( choice and(ncheckin$ the “=(merstored as text” option fromthe “Error /heckin$” ta.)this sol(tion is not shown

on this slide*

Page 147: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 147/164

1"0

nother #ption 5 (sin$ an

postrophe )[*

1"8

orce a /ell to 9isplay as ext y sin$ anpostrophe )T*

Page 148: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 148/164

p p ) *

• nother way to display leadin$ %eroes in a n(mer is totype an apostrophe as the first character in the cell.

• When yo( press Enter! the apostrophe is =# displayed

in the cell )it is displayed in the form(la ar*.

• he apostrophe tells Excel that the contents of the cellsho(ld e treated as text.

• he apostrophe is similar to the H si$n.

 5  he H si$n tells Excel that the cell contains a form(la. 5  he apostrophe )[* tells Excel that the cell contains a text 7al(e.

1"<

>es(lts of sin$ an postrophe

Page 149: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 149/164

•ype an apostrophefollowed y the =.

• Before pressin$ Enteryo( can see theapostrophe.

• fter pressin$ Enter yo(can’t see the apostropheanymore and leadin$%eroes remain.

*owever! Excel willwarn yo( that a n(meris formatted as text 7iathe $reen trian$le. )see

earlier slides*

Page 150: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 150/164

1+?

&$norin$ n(mers in calc(lations

1+1

&$norin$ n(mers in calc(lations

Page 151: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 151/164

• ypin$ an apostrophe )[* as the first character in acell with a n(mer has the additional effect of

ca(sin$ the n(mer to e i$nored in calc(lations.

• %#$E; his does not happen when yo( format

the cell that contains a n(mer to display as text.

1+2

&$norin$ n(mers in calc(lations.

Page 152: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 152/164

• By default ! all n(mers are incl(ded in n(mericcalc(lations.

• ,owe7er! yo( can force a cell that contains a n(mer to

 e treated as text and not e incl(ded in calc(lations with

n(meric f(nctions )ex. :! OE>CE! etc.* y

 placin$ an apostrophe as the first

character in the cell

1+3

Example

Page 153: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 153/164

orm(la to

add (p alln(mers in

col(mn 9

(Same

S,readsheet

he Fear is

incorrectlyincl(ded in

the s(m.

form(la 7iew )press /ntrlDQ*

7al(es 7iew )press /ntrlDQ*

1+"

Example D contin(ed$o fi the ,roblem o can %#$E. +hen o sto,$his ill force

Page 154: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 154/164

$o fix the ,roblem you can

add an a,ostro,he (G before

the data for the year (no s,acenecessary after the

a,ostro,he/

%#$E. +hen you sto,

editing the cell6 the

a,ostro,he will %#$ bevisible in the s,readsheet/

*owever6 it will be visible in

the formula bar/

$his will force

the number to

be treated astext (see next

slide/

1++

Example D finished

Page 155: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 155/164

$he a,ostro,he in not visible in

the s,readsheet (unless youGre

editing the cell/

$he number for the year is

now treated as text and is

not included in the sum/

$he a,ostro,he IS

visible in the formula

bar/

Page 156: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 156/164

1+-

$he End

,lides after this one are in progress -you can ignore them

#9#

Page 157: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 157/164

1+0

D inish editin$ the followin$

slides

D :o7e apostrophe st(ff to the

appendix

 =ested & (nctions1+8

Page 158: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 158/164

• #9#; add slides for nested &s

Page 159: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 159/164

1+<

Enterin$ 7al(es in m(ltiple

sheets at once.

Page 160: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 160/164

1-?

/ell =ames

1-1

/ell =ames

Page 161: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 161/164

• &nsert Z =ame Z /reate

1-2

Page 162: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 162/164

6>#E/&=C

W#>F,EE W#>FB##F 

Page 163: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 163/164

d7anced

ormattin$

1-3

#9#; fill o(t this section1-"

Page 164: ExcelFormulas Tf Jul1605

7/25/2019 ExcelFormulas Tf Jul1605

http://slidepdf.com/reader/full/excelformulas-tf-jul1605 164/164

• #9#; fill o(t this section 5 sin$ “format cells” dialo$ ox

 5 /onditional ormattin$

 5 9ata 7alidation