EXCEL Formula Dictionary
EXCEL Formula Dictionary
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
Reference
FunctionDictionary
FunctionExamples
FunctionCategories
About
ErrorsandProblems
Legal
Reference
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
Reference
FunctionDictionary FREEWARELICENSE
FunctionExamples PeterNoneleygrantsyoualimitednonexclusivelicensetouseTheExcelFunction
FunctionCategories DictionaryandTutorFREEWAREforpersonal,educational,charity,andcommercial
use,anddonationsareentirelyoptional!
ThisFreewareislicensedtoyouinaccordancewiththetermsandconditionsofthis
Agreement.Yourepresentandwarrantthatyouwillnotviolateanyofthe
requirementsofthisAgreementandfurtherrepresentandwarrantthat:
Youwillnot,andwillnotpermitothersto:
(i)reverseengineer,decompile,disassemble,modify,orcreatederivativeworks
fromthisFreeware,or
(ii)copy,distribute,publiclydisplay,orpubliclyperformcontentcontainedinthis
FreewareotherthanasexpresslyauthorizedbythisAgreement.
YouwillnotusethisFreewaretoengageinorallowotherstoengageinanyillegal
activity.
YouwillnotengageinusingthisFreewarethatwillinterferewithordamagethe
operationoftheservicesofanythirdparties.
About YouwillnotsellthisFreewareorchargeothersforuseofit(eitherforprofitor
ErrorsandProblems merelytorecoveryourmediaanddistributioncosts)whetherasastandalone
Legal product,oraspartofacompilationoranthology,withoutexplicitpriorwritten
permission.
YouwillnotusethisFreewaretoengageinanyactivitythatwillviolatetherightsof
thirdparties,including,withoutlimitation,throughtheuse,publicdisplay,public
performance,reproduction,distribution,ormodificationofcommunicationsor
materialsthatinfringecopyrights,trademarks,publicityrights,privacyrights,other
proprietaryrights,orrightsagainstdefamationofthirdparties.
Youmaynotclaimanysponsorshipby,endorsementby,oraffiliationwithPeter
Noneley.(c)[email protected]
Reference Errors&Suggestions About
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
[email protected]
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal RequiresAnalysisToolpak
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal RequiresAnalysisToolpak
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal RequiresAnalysisToolpak
Reference Functions Functions
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
Reference Examples Examples
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
About
ErrorsandProblems
Legal
FunctionDictionary
20032009PeterNoneley
ExcelFunctionDictionary v3.0www.xlfdic.com
FunctionDictionary
ABS ISBLANK STDEVP
ADDRESS ISERR SUBSTITUTE
AnalysisToolPak ISERROR SUM
AND ISLOGICAL SUM_as_Running_Total
AREAS ISNA SUM_using_names
AVERAGE ISNONTEXT SUM_with_OFFSET
CEILING ISNUMBER SUMIF
CELL ISREF SUMPRODUCT
CHAR ISTEXT SYD
CHOOSE LARGE T
CLEAN LEFT TEXT
CODE LEN TIME
COMBIN LOOKUP(Array) TIMEVALUE
CONCATENATE LOOKUP(Vector) TODAY
CORREL LOWER TRANSPOSE
COUNT MATCH TREND
COUNTA MAX TRIM
COUNTBLANK MEDIAN TRUNC
COUNTIF MID UPPER
DATE MIN VALUE
DATEDIF MINUTE VAR
DATEVALUE MMULT VARP
DAVERAGE MOD VLOOKUP
DAY MODE WEEKDAY
DAYS360 MONTH YEAR
DB N
DCOUNT NA
DCOUNTA NOT
DGET NOW
DMAX ODD Thesefunctionsshow#NAMEif
DMIN OR theAnalysys Toolpakis
Documentation PACKERS notinstalled.
DOLLAR PERMUT
DSUM PI BIN2DEC
EAST POWER CONVERT
FunctionDictionary
EXACT QUARTILE DELTA
FACT RAND EDATE
FIND RANK EOMONTH
FIXED REPLACE GCD
FLOOR REPT GESTEP
FORECAST RIGHT HEX2DEC
FREQUENCY ROMAN ISEVEN
FREQUENCY2 ROUND ISODD
HLOOKUP ROUNDDOWN LCM
HOUR ROUNDUP MROUND
IF SECOND NETWORKDAYS
INDEX SIGN QUOTIENT
INDIRECT SLN RANDBETWEEN
INFO SMALL WORKDAY
INT STDEV YEARFRAC
What Is In The Dictionary ?
Thisworkbookcontains1worksheets,eachexplainingthepurposeandusageof
particularExcelfunctions.
Therearealsoanumberofsampleworksheetswhicharesimplemodelsofcommon
applications,suchasTimesheetandDateCalculations.
Formatting
Eachworksheetusesthesametypeofformattingtoindicatethevarioustypesofentry.
North Textheadingsareshowningrey.
100
100 Dataisshownaspurpletextonayellowbackground.
100
300 TheresultsofFormulaareshownasblueonyellow.
=SUM(C13:C15) Theformulausedinthecalulationsisshownasbluetext.
TheArialfontisusedexclusivleythroughouttheworkbookandshoulddisplaycorrectly
withanyinstallationofWindows.
Eachsheethasbeendesignedtobeassimpleaspossible,withnofancymacrosto
accomplishthedesriredresult.
Printing
EachworksheetissettoprintontoA4portrait.
TheprintoutswillhavethecolumnheadingsofA,B,C...andtherownumbers1,2,3...which
willassistwiththereadingoftheformula.
Theidealprinterwouldbealasersetat600dpi.
Protection
Eachsheetisunprotectedsothatyouwillbeabletochangevaluesandexperiment
withthecalculations.
Analysis ToolPak
What Is The Analysis ToolPak ?
TheAnalysisToolPakisanaddinfilecontaining
extrafunctionswhicharenotbuiltintoExcel.
ThefunctionscoverareassuchasDateandMathematicaloperations.
TheAnalysisToolPakmustbeaddedintoExcelbeforethesefunctionswillbeavailable.
UsetheToolsmenu,thenAdd-ins,thenAnalysis Toolpak.
AnyformulausingthesefunctionswithouttheToolPakloadedwillshowthe#NAMEerror.
Time Calculation
Excelcanworkwithtimeveryeasily.
Timecanbeenteredinvariousdifferentformatsandcalculationsperformed.
Thereareoneortwooddities,butnothingwhichshouldputyouoffworkingwithit.
SeetheTimeSheetexampleforanexample.
Typing time
Whentimeisenteredintoworksheetitshouldbeenteredwithacolonbetween
thehourandtheminutes,suchas12:30,ratherthan12.30
Excelcancopewitheitherthe24hoursystemortheam/pmsystem.
Tousetheam/pmsystemyoumustentertheamorpmafterthetime.
Youmustleaveaspacebetweenthenumberandthetext.
Adding time
Youcanaddtimetofindatotaltime.
Thisworkswelluntilthetotaltimegoesabove24hours.
Fortotalsgreaterthan24hoursyoumayneedtoapplysomespecialformatting.
1.Clickonthecellwhichneedstheformat.
2.ChoosetheFormatmenu.
3.ChooseCells.
4.ClicktheNumbertagatthetopright.
5.ChooseCustom.
6.ClickinsidetheType:box.
7.Type[hh]:mmastheformat.
8.ClickOKtoconfirm.
TimeSheet for Flexi
Weekbeginning Mon05Jan98 NormalHours 37:30
Underworkedby =IF(G3G11>0,G3G11,"")
Overworkedby 1:15 =IF(G3G11<0,ABS(G3G11),"")
Instructions :
TypetheweekstartdateincellC3,theWeekbeginning.
Usetheformatdd/mm/yy,thenameofthedaywillappearautomatically.
ThedateisthenpasseddowntotheDaycolumn.
TypetheamountofhoursyouareexpectedtoworkinG3,theNormalHours.
Thisisusedlatertocalculateifhaveworkedoverorundertherequiredhours.
Typethetimesyouarriveandleaveworkintheappropriatecolumns.
Usetheformatofhh:mm.
Note
TheTotalHourscellhasbeenformattedas[hh]:mm.
Thisensuresthetotalhourscanbeexpressedasavalueabove24hours.
Ifthe[hh]:mmformathadnotbeenusedtheTotalHourswouldshowas: 14:45
Ifthe[hh]:mmformatdoesnotshowinthecellformatdialogbox
onyourcomputer,itcanbecreatedusingFormat,Cells,Number,Custom.
Split Forename and Surname
Thefollowingformulaareusefulwhenyouhaveonecellcontainingtextwhichneeds
tobesplitup.
OneofthemostcommonexamplesofthisiswhenapersonsForenameandSurname
areenteredinfullintoacell.
Theformulausevarioustextfunctionstoaccomplishthetask.
Eachofthetechniquesusesthespacebetweenthenamestoidentifywheretosplit.
FullName FirstName
AlanJones Alan =LEFT(C14,FIND("",C14,1))
BobSmith Bob =LEFT(C15,FIND("",C15,1))
CarolWilliams Carol =LEFT(C16,FIND("",C16,1))
FullName LastName
AlanJones Jones =RIGHT(C22,LEN(C22)FIND("",C22))
BobSmith Smith =RIGHT(C23,LEN(C23)FIND("",C23))
CarolWilliams Williams =RIGHT(C24,LEN(C24)FIND("",C24))
Theformulaabovecannothandleanymorethantwonames.
Ifthereisalsoamiddlename,thelastnameformulawillbeincorrect.
Tosolvetheproblemyouhavetouseamuchlongercalculation.
FullName LastName
AlanDavidJones Jones
BobJohnSmith Smith
CarolSusanWilliams Williams
=RIGHT(C37,LEN(C37)-FIND("#",SUBSTITUTE(C37," ","#",LEN(C37)-LEN(SUBSTITUTE(C37," ","")))))
Initialvalue 120
%tofind 25%
Percentagevalue 30 =D8*D9
Example 1
Acompanyisabouttogiveitsstaffapayrise.
Thewagesdepartmentneedtocalculatetheincreases.
Staffondifferentgradesgetdifferentpayrises.
Grade %Rise
A 10%
B 15%
C 20%
Initialvalue 120
%increase 25%
Increasedvalue 150 =D33*D34+D33
Example 2
Acompanyisabouttogiveitsstaffapayrise.
Thewagesdepartmentneedtocalculatethenewsalaryincludingthe%increase.
Staffondifferentgradesgetdifferentpayrises.
Percentages
Grade %Rise
A 10%
B 15%
C 20%
ValueA 120
ValueB 60
Aas%ofB 50% =D59/D58
Youwillneedtoformattheresultas%byusingthe%button
onthetoolbar.
Example 3
Anmanagerhasbeenaskedtosubmitbudgetrequirementsfornextyear.
Themangerneedstospecifywhatwillberequiredeachquarter.
Themanagerknowswhathasbeenspentbyeachregioninthepreviousyear.
Byanalysingthepastyearsspending,themanagerhopestopredict
whatwillneedtobespentinthenextyear.
Increasedvalue 150
%increase 25%
Originalvalue 120 =D100/(100%+D101)
Example 4
Anemployhastosubmitanexpensesclaimfortravellingandaccommodation.
TheclaimneedstoshowtheVATtaxportionofeachreceipt.
Unfortunatelythereceiptsheldbytheemployeeonlyshowthetotalamount.
TheemployeeneedstosplitthistotaltoshowtheoriginalvalueandtheVATamount.
VATrate 17.50%
10 20 30
30 40 70
50 60 60
70 80 30
SUM using names
Youcanusethenamestypedatthetopofcolumnsorsideofrowsincalculations
simplybytypingthenameintotheformula.
Trythisexample:
GotocellC16andthenentertheformula=SUM(jan)
Theresultwillshow.
ThisformulacanbecopiedtoD16andE16,andthenameschangetoFebandMar.
Clickanywhereinsidethetableabove.
ThenpressF11.
Filename formula
Theremaybetimeswhenyouneedtoinsertthenameofthecurrentworkbook
orworksheetintoacell.
ThiscanbedonebyusingtheCELL()function,shownbelow.
F:\SHAHIDDataCollection\PPTTEmplets&Vista\Exelformuladictionary\[EXCELFormulaDictionaryBySHAHID.xls]MenuEmpty
=CELL("filename")
Theproblemwiththisisthatitgivesthecompletepathincludingdriveletterandfolders.
Tojustpickouttheworkbookorworksheetnameyouneedtousetextfunctions.
Mathematicallyspeakingthe*and/aremoreimportantthan+and.
The*and/operationswillbecalculatedbefore+and -.
Example1:Thewronganswer!
10
20
2
50 =C12+C13*C14
Youmayexpectthat10+20wouldequal30
Andthen30*2wouldequal60
Butbecausethe*iscalculatedfirstExcelseesthe
calculationas20*2resultingin40
Andthen10+40resultingin50
Example2:Thecorrectanswer.
10
20
2
60 =(C27+C28)*C29
Byplacingbracketsaround(10+20)Excelperformsthis
partofthecalulationfirst,resultingin30
Thenthe30ismultipledby2resultingin60
Age Calculation
Youcancalculateapersonsagebasedontheirbirthdayandtodaysdate.
ThecalculationusestheDATEDIF()function.
TheDATEDIF()isnotdocumentedinExcel5,7or97,butitisin2000.
(MakesyouwonderwhatelseMicrosoftforgottotellus!)
Birthdate: 1Jan60
Yearslived: 49 =DATEDIF(C8,TODAY(),"y")
andthemonths: 4 =DATEDIF(C8,TODAY(),"ym")
andthedays: 5 =DATEDIF(C8,TODAY(),"md")
Youcanputthisalltogetherinonecalculation,whichcreatesatextversion.
Ageis49Years,4Monthsand5Days
="Age is "&DATEDIF(C8,TODAY(),"y")&" Years, "&DATEDIF(C8,TODAY(),"ym")&" Months and "&DATEDIF(C8,TODAY(),"md")&" Days"
Birthdate: 1Jan60
Tryithere:
MovetoablankcellintheTotalroworcolumn,thenpressAltand=.
or
Selectarow,columnorallcellsandthenpressAltand=.
What Does it Do ?
Thisfunctioncalculatesthevalueofanumber,irrespectiveofwhetheritispositiveornegative.
Syntax
=ABS(CellAddressorNumber)
Formatting
Theresultwillbeshownasanumber,nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyacompanytestingamachinewhichcutstimber.
Themachineneedstocuttimbertoanexactlength.
Threepiecesoftimberwerecutandthenmeasured.
IncalculatingthedifferencebetweentheRequiredLengthandtheActualLengthitdoes
notmatterifthewoodwascuttoolongorshort,themeasurementneedstobeexpressedas
anabsolutevalue.
Table1showstheoriginalcalculations.
TheDifferenceforTest3isshownasnegative,whichhasaknockoneffect
whentheErrorPercentageiscalculated.
Whetherthewoodwastoolongorshort,thepercentageshouldstillbeexpressed
asanabsolutevalue.
Table1
Test Required Actual Error
Difference
Cut Length Length Percentage
Test1 120 120 0 0%
Test2 120 90 30 25%
Test3 120 150 30 25%
=D36E36
Table2showsthesamedatabutusingthe=ABS()functiontocorrectthecalculations.
ABS
Table2
Test Required Actual Error
Difference
Cut Length Length Percentage
Test1 120 120 0 0%
Test2 120 90 30 25%
Test3 120 150 30 25%
=ABS(D45E45)
ADDRESS
Typeacolumnnumber: 2
Typearownumber: 3
Typeasheetname: Hello
$B$3 =ADDRESS(F4,F3,1,TRUE)
B$3 =ADDRESS(F4,F3,2,TRUE)
$B3 =ADDRESS(F4,F3,3,TRUE)
B3 =ADDRESS(F4,F3,4,TRUE)
R3C2 =ADDRESS(F4,F3,1,FALSE)
R3C[2] =ADDRESS(F4,F3,2,FALSE)
R[3]C2 =ADDRESS(F4,F3,3,FALSE)
R[3]C[2] =ADDRESS(F4,F3,4,FALSE)
Hello!$B$3 =ADDRESS(F4,F3,1,TRUE,F5)
Hello!B$3 =ADDRESS(F4,F3,2,TRUE,F5)
Hello!$B3 =ADDRESS(F4,F3,3,TRUE,F5)
Hello!B3 =ADDRESS(F4,F3,4,TRUE,F5)
What Does It Do ?
Thisfunctioncreatesacellreferenceasapieceoftext,basedonarowandcolumn
numbersgivenbytheuser.
Thistypeoffunctionisusedinmacrosratherthanontheactualworksheet.
Syntax
=ADDRESS(RowNumber,ColNumber,Absolute,A1orR1C1,SheetName)
TheRowNumberisthenormalrownumberfrom1to16384.
TheColNumberisfrom1to256,colsAtoIV.
TheAbsolutecanbe1,2,3or4.
When1thereferencewillbeintheform$A$1,columnandrowabsolute.
When2thereferencewillbeintheformA$1,onlytherowabsolute.
When3thereferencewillbeintheform$A1,onlythecolumnabsolute.
When4thereferencewillbeintheformA1,neithercolorrowabsolute.
TheA1orR1C1iseitherTRUEofFALSE.
WhenTRUEthereferencewillbeintheformA1,thenormalstyleforcelladdresses.
WhenFALSEthereferencewillbeintheformR1C1,thealternativestyleofcelladdress.
TheSheetNameisapieceoftexttobeusedastheworksheetnameinthereference.
TheSheetNamedoesnotactuallyhavetoexist.
AND
ItemsToTest Result
500 800 TRUE =AND(C4>=100,D4>=100)
500 25 FALSE =AND(C5>=100,D5>=100)
25 500 FALSE =AND(C6>=100,D6>=100)
12 TRUE =AND(D7>=1,D7<=52)
Syntax
=AND(Test1,Test2)
Notethattherecanbeupto30possibletests.
Formatting
WhenusedbyitselfitwillshowTRUEorFALSE.
Example 1
Thefollowingexampleshowsalistofexaminationresults.
Theteacherwantstofindthepupilswhoscoredaboveaverageinallthreeexams.
The=AND()functionhasbeenusedtotestthateachscoreisabovetheaverage.
TheresultofTRUEisshownforpupilswhohavescoredaboveaverageinallthreeexams.
Averages 47 54 60
AREAS
Pink Name Age 2 =AREAS(PeopleLists)
Alan 18
Bob 17
Carol 20
Syntax
=AREAS(RangeToTest)
Formatting
Theresultwillbeshownasanumber.
Example
Theexampleatthetopofthispageshowstworangescolouredpinkandgreen.
TheserangeshavebeengiventhenamePeopleLists.
The=AREAS(PeopleLists)givesaresultof2indicatingthattherearetwoseparate
selectionswhichformthePeopleListsrange.
Note
TonamemultiplerangestheCTRLkeymustbeused.
Intheaboveexamplethepinkrangewasselectedasnormal,thentheCtrlkey
washelddownbeforeselectingthegreenrange.
WhenaRangeNameiscreateditwillconsiderbothPinkandGreenasbeingonerange.
AVERAGE
Mon Tue Wed Thu Fri Sat Sun Average
Temp 30 31 32 29 26 28 27 29 =AVERAGE(D4:J4)
Rain 0 0 0 4 6 3 1 2 =AVERAGE(D5:J5)
What Does It Do ?
Thisfunctioncalculatestheaveragefromalistofnumbers.
Ifthecellisblankorcontainstext,thecellwillnotbeusedintheaveragecalculation.
Ifthecellcontainszero0,thecellwillbeincludedintheaveragecalculation.
Syntax
=AVERAGE(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
Note
Tocalculatetheaverageofcellswhichcontaintextorblanksuse=SUM()togetthetotaland
thendividebythecountoftheentriesusing=COUNTA().
FurtherUsage
BIN2DEC
BinaryNumber DecimalEquivalent
0 0 =BIN2DEC(C4)
1 1 =BIN2DEC(C5)
10 2 =BIN2DEC(C6)
11 3 =BIN2DEC(C7)
111111111 511 =BIN2DEC(C8)
1111111111 1 =BIN2DEC(C9)
1111111110 2 =BIN2DEC(C10)
1111111101 3 =BIN2DEC(C11)
1000000000 512 =BIN2DEC(C12)
11111111111 #NUM! =BIN2DEC(C13)
What Does It Do ?
Thisfunctionconvertsabinarynumbertodecimal.
Negativenumbersarerepresentedusingtwo'scomplementnotation.
Syntax
=BIN2DEC(BinaryNumber)
Thebinarynumberhasalimitoftencharacters.
Formatting
Nospecialformattingisneeded.
CEILING
Number RaisedUp
2.1 3 =CEILING(C4,1)
1.5 2 =CEILING(C5,1)
1.9 2 =CEILING(C6,1)
20 30 =CEILING(C7,30)
25 30 =CEILING(C8,30)
40 60 =CEILING(C9,30)
What Does It Do ?
Thisfunctionroundsanumberuptothenearestmultiplespecifiedbytheuser.
Syntax
=CEILING(ValueToRound,MultipleToRoundUpTo)
TheValueToRoundcanbeacelladdressoracalculation.
Formatting
Nospecialformattingisneeded.
Example 1
Thefollowingtablewasusedbyaestateagentrentingholidayapartments.
Thepropertiesbeingrentedareonlyavailableonaweeklybasis.
Whenthecustomersuppliesthenumberofdaysrequiredinthepropertythe=CEILING()
functionroundsitupbyamultipleof7tocalculatethenumberoffullweekstobebilled.
DaysTo
DaysRequired BeBilled
Customer1 3 7 =CEILING(D28,7)
Customer2 4 7 =CEILING(D29,7)
Customer3 10 14 =CEILING(D30,7)
Example 2
Thefollowingtablewasusedbyabuildersmerchantdeliveringproductstoaconstructionsite.
Themerchantneedstohiretruckstomoveeachproduct.
Eachproductneedsaparticulartypeoftruckofafixedcapacity.
Table1calculatesthenumberoftrucksrequiredbydividingtheUnitsToBeMovedby
theCapacityofthetruck.
Thisresultsofthedivisionarenotwholenumbers,andthebuildercannothirejustpart
CEILING
ofatruck.
Table1
UnitsTo Truck Trucks
Item BeMoved Capacity Needed
Bricks 1000 300 3.33 =D45/E45
Wood 5000 600 8.33 =D46/E46
Cement 2000 350 5.71 =D47/E47
Table2showshowthe=CEILING()functionhasbeenusedtorounduptheresultof
thedivisiontoawholenumber,andthusgiventheexactamountoftrucksneeded.
Table2
UnitsTo Truck Trucks
Item BeMoved Capacity Needed
Bricks 1000 300 4 =CEILING(D54/E54,1)
Wood 5000 600 9 =CEILING(D55/E55,1)
Cement 2000 350 6 =CEILING(D56/E56,1)
Example 3
Thefollowingtableswereusedbyashopkeepertocalculatethesellingpriceofanitem.
Theshopkeeperbuysproductsbythebox.
ThecostoftheitemiscalculatedbydividingtheBoxCostbytheBoxQuantity.
Theshopkeeperalwayswantsthepricetoendin99pence.
Table1showshowjustanormaldivisionresultsinvaryingItemCosts.
Table1
Item BoxQnty BoxCost CostPerItem
Plugs 11 20 1.81818 =D69/C69
Sockets 7 18.25 2.60714 =D70/C70
Junctions 5 28.10 5.62000 =D71/C71
Adapters 16 28 1.75000 =D72/C72
Table2showshowthe=CEILING()functionhasbeenusedtoraisetheItemCostto
alwaysendin99pence.
Table2
CEILING
Item InBox BoxCost CostPerItem RaisedCost
Plugs 11 20 1.81818 1.99
Sockets 7 18.25 2.60714 2.99
Junctions 5 28.10 5.62000 5.99
Adapters 16 28 1.75000 1.99
=INT(E83)+CEILING(MOD(E83,1),0.99)
Explanation
=INT(E83) Calculatestheintegerpartoftheprice.
=MOD(E83,1) Calculatesthedecimalpartoftheprice.
=CEILING(MOD(E83),0.99) Raisesthedecimalto0.99
CELL
Thisisthecellandcontentstotest. 17.50%
Thetypeofentryinthecell. v =CELL("type",D3)
Shownasbforblank,lfortext, vforvalue.
Thealignmentofthecell.
Shownas'forleft,^forcentre,"forright. =CELL("prefix",D3)
Nothingisshownfornumericentries.
Thewidthofthecell. 12 =CELL("width",D3)
Thenumberformatfothecell.
P2 =CELL("format",D3)
(Seethetableshownbelow)
Formattedforbraces()onpositivevalues. 0 =CELL("parentheses",D3)
1foryes, 0forno.
Formattedforcolourednegatives.
0 =CELL("color",D3)
1foryes, 0forno.
Thetypeofcellprotection.
0 =CELL("protect",D3)
1foralocked,0forunlocked.
Thefilenamecontainingthecell. F:\SHAHIDDataCollection\PPTTEmplets&Vista\Exelformuladictionary\[EXCELFormulaDictionaryBySHAHID.xls]CELL
=CELL("filename",D3)
What Does It Do ?
Thisfunctionexaminesacellanddisplaysinformationaboutthecontents,positionandformatting.
Syntax
=CELL("TypeOfInfoRequired",CellToTest)
TheTypeOfInfoRequiredisatextentrywhichmustbesurroundedwithquotes"".
Formatting
Nospecialformattingisneeded.
Codesusedtoshowtheformattingofthecell.
Example
Thefollowingexampleusesthe=CELL()functionaspartofaformulawhichextractsthefilename.
Thenameofthecurrentfileis: EXCELFormulaDictionaryBySHAHID.xls
=MID(CELL("filename"),FIND("[",CELL("filename"))+1,FIND("]",CELL("filename"))FIND("[",CELL("filename"))1)
CHAR
ANSINumber Character
65 A =CHAR(G4)
66 B =CHAR(G5)
169 =CHAR(G6)
Syntax
=CHAR(Number)
TheNumbermustbebetween1and255.
Formatting
Theresultwillbeacharacterwithnospecialformatting.
Example
Thefollowingisalistofall255numbersandthecharacterstheyrepresent.
NotethatmostWindowsbasedprogrammaynotdisplaysomeofthespecialcharacters,
thesewillbedisplayedasasmallbox.
Note
Number32doesnotshowasitistheSPACEBARcharacter.
CHOOSE
Index
Value Result
1 Alan =CHOOSE(C4,"Alan","Bob","Carol")
3 Carol =CHOOSE(C5,"Alan","Bob","Carol")
2 Bob =CHOOSE(C6,"Alan","Bob","Carol")
3 18% =CHOOSE(C7,10%,15%,18%)
1 10% =CHOOSE(C8,10%,15%,18%)
2 15% =CHOOSE(C9,10%,15%,18%)
Syntax
=CHOOSE(UserValue,Item1,Item2,Item3throughtoItem29)
Formatting
Nospecialformattingisrequired.
Example
Thefollowingtablewasusedtocalculatethemedalsforathletestakingpartinarace.
TheTimeforeachathleteisentered.
The=RANK()functioncalculatesthefinishingpositionofeachathlete.
The=CHOOSE()thenallocatesthecorrectmedal.
The=IF()hasbeenusedtofilteroutanypositionsabove3,asthiswouldcause
theerrorof#VALUEtoappear,duetothefactthe=CHOOSE()hasonlythreeitemsinit.
Syntax
=CLEAN(TextToBeCleaned)
Formatting
Nospecialformattingisneeded.Theresultwillshowasnormaltext.
CODE
Letter ANSICode
A 65 =CODE(C4)
B 66 =CODE(C5)
C 67 =CODE(C6)
a 97 =CODE(C7)
b 98 =CODE(C8)
c 99 =CODE(C9)
Alan 65 =CODE(C10)
Bob 66 =CODE(C11)
Carol 67 =CODE(C12)
Syntax
=CODE(Text)
Formatting
Nospecialformattingisneeded,theresultwillbeshownasanumberbetween1and255.
Example
SeetheexampleforFREQUENCY.
What Does It Do ?
Thisfunctioncalculatesthehighestnumberofcombinationsavailablebasedupon
afixednumberofitems.
Theinternalorderofthecombinationdoesnotmatter,soABisthesameasBA.
Syntax
=COMBIN(HowManyItems,GroupSize)
Formatting
Nospecialformattingisrequired.
Example 1
Thisexamplecalculatesthepossiblenumberofpairsoflettersavailable
fromthefourcharactersABCD.
Example 2
Adecoratorisaskedtodesignacolourschemeforanewoffice.
Thedecoratorisgivenfivecolourstoworkwith,butcanonlyusethreeinanyscheme.
Howmanycoloursschemescanbecreated?
Syntax
=CONCATENATE(Text1,Text2,Text3...Text30)
Uptothirtypiecesoftextcanbejoined.
Formatting
Nospecialformattingisneeded,theresultwillbeshownasnormaltext.
Note
Youcanachievethesameresultbyusingthe&operator.
What Does It Do ?
Thisfunctionconvertsavaluemeasureinonetypeofunit,tothesamevalueexpressed
inadifferenttypeofunit,suchasInchestoCentimetres.
Syntax
=CONVERT(AmountToConvert,UnitToConvertFrom,UnitToConvertTo)
Formatting
Nospecialformattingisneeded.
Example
ThefollowingtablewasusedbyanImport/Exportingcompanytoconverttheweight
andsizeofpackagesfromoldstyleUKmeasuringsystemtoEuropeansystem.
Abbreviations
Thisisalistofallthepossibleabbreviationswhichcanbeusedtodenotemeasuringsystems.
Temperature Liquid
DegreeCelsius C Teaspoon tsp
DegreeFahrenheit F Tablespoon tbs
DegreeKelvin K Fluidounce oz
Cup cup
Force Pint pt
Newton N Quart qt
Dyne dyn Gallon gal
Poundforce lbf Liter l
Energy Power
Joule J Horsepower HP
Erg e Watt W
Thermodynamic
calorie c
ITcalorie cal Magnetism
Electronvolt eV Tesla T
Horsepowerhour HPh Gauss ga
Watthour Wh
Footpound flb
BTU BTU
Thesecharacterscanbeusedasaprefixtoaccessfurtherunitsofmeasure.
Using"c"asaprefixtometers"m"willallowcentimetres"cm"tobecalculated.
AirCond Advertising
Month AvgTemp Sales Costs Sales
Jan 20 100 2,000 20,000
Feb 30 200 1,000 30,000
Mar 30 300 5,000 20,000
Apr 40 200 1,000 40,000
May 50 400 8,000 40,000
Jun 50 400 1,000 20,000
What Does It Do ?
Thisfunctionexaminestwosetsofdatatodeterminethedegreeofrelationship
betweenthetwosets.
Theresultwillbeadecimalbetween0and1.
Thelargertheresult,thegreaterthecorrelation.
InTable1theMonthlytemperatureiscomparedagainsttheSalesofairconditioningunits.
Thecorrelationshowsthatthereisan0.864realtionshipbetweenthedata.
InTable2theCostofadvertisinghasbeencomparedtoSales.
Itcanbeformattedaspercentage%toshowamoremeaningfullresult.
Thecorrelationshowsthatthereisan28%realtionshipbetweenthedata.
Syntax
=CORREL(Range1,Range2)
Formatting
Theresultwillnormallybeshownindecimalformat.
COUNT
EntriesToBeCounted Count
10 20 30 3 =COUNT(C4:E4)
10 0 30 3 =COUNT(C5:E5)
10 20 30 3 =COUNT(C6:E6)
10 1Jan88 30 3 =COUNT(C7:E7)
10 21:30 30 3 =COUNT(C8:E8)
10 0.577764 30 3 =COUNT(C9:E9)
10 30 2 =COUNT(C10:E10)
10 Hello 30 2 =COUNT(C11:E11)
10 #DIV/0! 30 2 =COUNT(C12:E12)
What Does It Do ?
Thisfunctioncountsthenumberofnumericentriesinalist.
Itwillignoreblanks,textanderrors.
Syntax
=COUNT(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyabuildersmerchanttocalculatethenumberofsales
forvariousproductsineachmonth.
What Does It Do ?
Thisfunctioncountsthenumberofnumericortextentriesinalist.
Itwillignoreblanks.
Syntax
=COUNTA(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyaschooltokeeptrackoftheexaminationstakenbyeachpupil.
Eachexampassedwasgradedas1,2or3.
AfailurewasenteredasFail.
Theschoolneededtoknownhowmanypupilssateachexam.
Theschoolalsoneededtoknowhowmanyexamsweretakenbyeachpupil.
The=COUNTA()functionhasbeenusedbecauseofitsabilitytocounttextandnumericentries.
ExamsTaken
Maths English Art History
ByEachPupil
Alan Fail 1 2
Bob 2 1 3 3
Carol 1 1 1 3
David Fail Fail 2
Elaine 1 3 2 Fail 4
=COUNTA(D39:G39)
COUNTA
HowmanypupilssateachExam.
Maths English Art History
4 3 5 2
=COUNTA(D35:D39)
COUNTBLANK
RangeToTest Blanks
1 2 =COUNTBLANK(C4:C11)
Hello
3
0
1Jan98
What Does It Do ?
Thisfunctioncountsthenumberofblankcellsinarange.
Syntax
=COUNTBLANK(RangeToTest)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyacompanywhichwasballotingitsworkersonwhether
thecompanyshouldhaveanosmokingpolicy.
Eachofthedepartmentsinthevariousfactorieswerequestioned.
TheresponsetothequestioncouldbeYorN.
Astheresultsofthevotewerecollatedtheywereenteredintothetable.
The=COUNTBLANK()functionhasbeenusedtocalculatethenumberofdepartmentswhich
havenoyetregisteredavote.
VotesforYes: 14 =COUNTIF(C32:F41,"Y")
VotesforNo: 10 =COUNTIF(C32:F41,"N")
COUNTIF
Item Date Cost
Brakes 1Jan98 80
Tyres 10May98 25
Brakes 1Feb98 80
Service 1Mar98 150
Service 5Jan98 300
Window 1Jun98 50
Tyres 1Apr98 200
Tyres 1Mar98 100
Clutch 1May98 250
HowmanyBrakeShoesHavebeenbought. 2 =COUNTIF(C4:C12,"Brakes")
HowmanyTyreshavebeenbought. 3 =COUNTIF(C4:C12,"Tyres")
Howmanyitemscost100orabove. 5 =COUNTIF(E4:E12,">=100")
What Does It Do ?
Thisfunctioncountsthenumberofitemswhichmatchcriteriasetbytheuser.
Syntax
=COUNTIF(RangeOfThingsToBeCounted,CriteriaToBeMatched)
Thecriteriacanbetypedinanyofthefollowingways.
Tomatchaspecificnumbertypethenumber,suchas=COUNTIF(A1:A5,100)
Tomatchapieceoftexttypethetextinquotes,suchas=COUNTIF(A1:A5,"Hello")
Tomatchusingoperatorssurroundtheexpressionwithquotes,suchas=COUNTIF(A1:A5,">100")
Formatting
Nospecialformattingisneeded.
DATE
Day Month Year Date
25 12 99 12/25/99 =DATE(E4,D4,C4)
25 12 99 25Dec99 =DATE(E5,D5,C5)
33 12 99 January2,2000 =DATE(E6,D6,C6)
Syntax
=DATE(year,month,day)
Formatting
Theresultwillnormallybedisplayedinthedd/mm/yyformat.
ByusingtheFormat,Cells,Number,Datecommandtheformatcanbechanged.
DATEDIF
FirstDate SecondDate Interval Difference
1Jan60 10May70 days 3782 =DATEDIF(C4,D4,"d")
1Jan60 10May70 months 124 =DATEDIF(C5,D5,"m")
1Jan60 10May70 years 10 =DATEDIF(C6,D6,"y")
1Jan60 10May70 yeardays 130 =DATEDIF(C7,D7,"yd")
1Jan60 10May70 yearmonths 4 =DATEDIF(C8,D8,"ym")
1Jan60 10May70 monthdays 9 =DATEDIF(C9,D9,"md")
Syntax
=DATEDIF(FirstDate,SecondDate,"Interval")
FirstDate:Thisistheearliestofthetwodates.
SecondDate:Thisisthemostrecentofthetwodates.
"Interval":Thisindicateswhatyouwanttocalculate.
Thesearetheavailableintervals.
"d" Daysbetweenthetwodates.
"m" Monthsbetweenthetwodates.
"y" Yearsbetweenthetwodates.
"yd" Daysbetweenthedates,asifthedateswereinthesameyear.
"ym" Monthsbetweenthedates,asifthedateswereinthesameyear.
"md" Daysbetweenthetwodates,asifthedateswereinthesamemonthandyear.
Formatting
Nospecialformattingisneeded.
Birthdate: 1Jan60
Yearslived: 49 =DATEDIF(C8,TODAY(),"y")
andthemonths: 4 =DATEDIF(C8,TODAY(),"ym")
andthedays: 5 =DATEDIF(C8,TODAY(),"md")
Youcanputthisalltogetherinonecalculation,whichcreatesatextversion.
Ageis49Years,4Monthsand5Days
DATEDIF
="Age is "&DATEDIF(C8,TODAY(),"y")&" Years, "&DATEDIF(C8,TODAY(),"ym")&" Months and "&DATEDIF(C8,TODAY(),"md")&" Days"
DATEVALUE
Date DateValue
25dec99 36519 =DATEVALUE(C4)
25/12/99 36519 =DATEVALUE(C5)
25dec99 36519 =DATEVALUE(C6)
25/12/99 36519 =DATEVALUE(C7)
Syntax
=DATEVALUE(text)
Formatting
Theresultwillnormallybeshownasanumberwhichrepresentsthedate.Thisnumbercan
beformattedtoanyofthenormaldateformatsbyusingFormat,Cells,Number,Date.
Example
Theexampleusesthe=DATEVALUEandthe=TODAYfunctionstocalculatethenumberof
daysremainingonapropertylease.
The=DATEVALUEfunctionwasusedbecausethedatehasbeenenteredinthecellas
apieceoftext,probablyafterbeingimportedfromanexternalprogram.
DaysUntil
PropertyRef. ExpiryDate Expiry
BC100 25dec99 3420
FG700 10july/99 3588
TD200 13sep98 3888
HJ900 30/5/2000 #VALUE!
=DATEVALUE(E32)TODAY()
DAVERAGE
This is the Database range.
Life Box Boxes In Value Of
Product Wattage Hours
Brand Unit Cost Quantity Stock Stock
Bulb 200 3000
Horizon 4.50 4 3 54.00
Neon 100 2000
Horizon 2.00 15 2 60.00
Spot 60 0.00
Other 10 8000 Sunbeam 0.80 25 6 120.00
Bulb 80 1000 Horizon 0.20 40 3 24.00
Spot 100 unknown Horizon 1.25 10 4 50.00
Spot 200 3000 Horizon 2.50 15 0 0.00
Other 25 unknown Sunbeam 0.50 10 3 15.00
Bulb 200 3000 Sunbeam 5.00 3 2 30.00
Neon 100 2000 Sunbeam 1.80 20 5 180.00
Bulb 100 unknown Sunbeam 0.25 10 5 12.50
Bulb 10 800 Horizon 0.20 25 2 10.00
Bulb 60 1000 Sunbeam 0.15 25 0 0.00
Bulb 80 1000 Sunbeam 0.20 30 2 12.00
Bulb 100 2000 Horizon 0.80 10 5 40.00
Bulb 40 1000 Horizon 0.10 20 5 10.00
TocalculatetheAveragecostofaparticularBrandofbulb.
What Does It Do ?
Thisfunctionexaminesalistofinformationandproducesandaverage.
Syntax
=DAVERAGE(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthename,orcell,ofthevaluestobeaveraged,suchas"UnitCost"orF3.
TheCriteriaRangeismadeupoftwotypesofinformation.
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
DAVERAGE
Thesecondsetofinformationistheactualrecord,orrecords,whicharetobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Examples
Product Brand
Bulb Horizon
Thisisthesamecalculationbutusingtheactualname"UnitCost"insteadofthecelladdress.
1.16 =DAVERAGE(B3:I19,"UnitCost",E49:F50)
Product Wattage
Bulb 100
Product Wattage
Bulb <100
Syntax
=DAY(value)
Formatting
Normallytheresultwillbeanumber,butthiscanbeformattedtoshowtheactual
dayoftheweekbyusingFormat,Cells,Number,Customandusingthecodedddordddd.
Example
The=DAYfunctionhasbeenusedtocalculatethenameofthedayforyourbirthday.
Pleaseenteryourdateofbirthintheformatdd/mm/yy : 3/25/1962
Youwerebornon: Thursday25 =DAY(F21)
DAYS360
StartDate EndDate DaysBetween * See the Note below.
1Jan98 5Jan98 4 =DAYS360(C4,D4,TRUE)
1Jan98 1Feb98 30 =DAYS360(C5,D5,TRUE)
1Jan98 31Mar98 89 =DAYS360(C6,D6,TRUE)
1Jan98 31Dec98 359 =DAYS360(C7,D7,TRUE)
Syntax
=DAYS360(StartDate,EndDate,TRUEofFALSE)
TRUE:UsethisforEuropeanaccountingsystems.
FALSE:UsethisforUSAaccountingsystems.
Formatting
Theresultwillbeshownasanumber.
Note
Thecalculationdoesnotincludethelastday.Theresultofusing1Jan98and5Jan98will
givearesultof4.Tocorrectthisadd1totheresult.=DAYS360(Start,End,TRUE)+1
DB
PurchasePrice: 5,000
LifeinYears: 5
Salvagevalue: 200
Year Deprecation
1 2,375.00 =DB(E3,E5,E4,D8)
2 1,246.88 =DB(E3,E5,E4,D9)
3 654.61 =DB(E3,E5,E4,D10)
4 343.67 =DB(E3,E5,E4,D11)
5 180.43 =DB(E3,E5,E4,D12)
What Does It Do ?
Thisfunctioncalculatesdeprecationbaseduponafixedpercentage.
Thefirstyearisdepreciatedbythefixedpercentage.
Thesecondyearusesthesamepercentage,butusestheoriginalvalueoftheitemless
thefirstyearsdepreciation.
Anysubsequentyearsusethesamepercentage,usingtheoriginalvalueoftheitemless
thedepreciationofthepreviousyears.
Thepercentageusedinthedepreciationisnotsetbytheuser,thefunctioncalculates
thenecessarypercentage,whichwillbevarybaseduponthevaluesinputtedbytheuser.
Anadditionalfeatureofthisfunctionistheabilitytotakeintoaccountwhentheitemwas
originallypurchased.
Iftheitemwaspurchasedpartwaythroughthefinancialyear,thefirstyearsdepreciation
willbebasedontheremainingpartoftheyear.
Syntax
=DB(PurchasePrice,SalvageValue,Life,PeriodToCalculate,FirstYearMonth)
TheFirstYearMonthisthemonthinwhichtheitemwaspurchasedduringthe
firstfinancialyear.Thisisanoptionalvalue,ifitnotusedthefunctionwillassume12as
thevalue.
Formatting
Nospecialformattingisneeded.
Example 1
Thisexampleshowsthepercentageusedinthedepreciation.
DB
Year1depreciationisbasedupontheoriginalPurchasePricealone.
Year2depreciationisbasedupontheoriginalPurchasePriceminusYear1deprecation.
Year3deprecationisbaseduponoriginalPurchasePriceminusYear1+Year2deprecation.
The%Deprchasbeencalculatedpurelytodemonstratewhat%isbeingused.
PurchasePrice: 5,000
Salvagevalue: 1,000
LifeinYears: 5
TotalDepreciation: 3,998.48
Example 2
Thisexampleissimilartotheprevious,withtheexceptionofthedeprecationbeingcalculated
onamonthlybasis.Thishasbeendonebymultiplyingtheyearsby12.
PurchasePrice: 5,000
LifeinYears: 5
Salvagevalue: 100
Month Deprecation
56 8.79
57 8.24
58 7.72
59 7.23
60 6.78
=DB(E66,E68,E67*12,D75)
Example 3
Thisexampleshowshowthelengthofthefirstyearsownershiphasbeentakenintoaccount.
DB
PurchasePrice: 5,000
LifeinYears: 5
Salvagevalue: 1,000
FirstYearOwnershipInMonths: 6
TotalDepreciation: 3,808.54
Example 4
ThisexamplehasbeencreatedwithboththeExcelcalculatedpercentageandthe'real'
percentagecalculatedmanually.
TheExcelDeprecationusesthe=DB()function.
TheRealDeprecationusesamanualcalculation.
Errordifference: 1.52
DCOUNT
This is the Database range.
Life Box Boxes In Value Of
Product Wattage Hours
Brand Unit Cost Quantity Stock Stock
Bulb 200 3000
Horizon 4.50 4 3 54.00
Neon 100 2000
Horizon 2.00 15 2 60.00
Spot 60 0.00
Other 10 8000 Sunbeam 0.80 25 6 120.00
Bulb 80 1000 Horizon 0.20 40 3 24.00
Spot 100 unknown Horizon 1.25 10 4 50.00
Spot 200 3000 Horizon 2.50 15 1 37.50
Other 25 unknown Sunbeam 0.50 10 3 15.00
Bulb 200 3000 Sunbeam 5.00 3 2 30.00
Neon 100 2000 Sunbeam 1.80 20 5 180.00
Bulb 100 unknown Sunbeam 0.25 10 5 12.50
Bulb 10 800 Horizon 0.20 25 2 10.00
Bulb 60 1000 Sunbeam 0.15 25 1 3.75
Bulb 80 1000 Sunbeam 0.20 30 2 12.00
Bulb 100 2000 Horizon 0.80 10 5 40.00
Bulb 40 1000 Horizon 0.10 20 5 10.00
CountthenumberofproductsofaparticularBrandwhichhaveaLifeHoursrating.
TheCOUNTvalueofHorizonis: 7 =DCOUNT(B3:I19,D3,E23:E24)
What Does It Do ?
Thisfunctionexaminesalistofinformationandcountsthevaluesinaspecifiedcolumn.
Itcanonlycountvalues,thetextitemsandblankcellsareignored.
Syntax
=DCOUNT(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthename,orcell,ofthevaluestoCount,suchas"ValueOfStock"orI3.
TheCriteriaRangeismadeupoftwotypesofinformation.
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
DCOUNT
Thesecondsetofinformationistheactualrecord,orrecords,whicharetobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Examples
BoxesIn
Product Stock
Bulb 5
Thenumberofproductsis: 3 =DCOUNT(B3:I19,H3,E50:F51)
Thisisthesamecalculationbutusingthename"BoxesInStock"insteadofthecelladdress.
3 =DCOUNT(B3:I19,"BoxesInStock",E50:F51)
Product Wattage
Bulb 100
Thecountis: 2 =DCOUNT(B3:I19,"BoxesInStock",E61:F62)
Thecountis: 4 =DCOUNT(B3:I19,"BoxesInStock",E68:G69)
DCOUNTA
This is the Database range.
Life Box Boxes In Value Of
Product Wattage Hours
Brand Unit Cost Quantity Stock Stock
Bulb 200 3000
Horizon 4.50 4 3 54.00
Neon 100 2000
Horizon 2.00 15 2 60.00
Spot 60 0.00
Other 10 8000 Sunbeam 0.80 25 6 120.00
Bulb 80 1000 Horizon 0.20 40 3 24.00
Spot 100 unknown Horizon 1.25 10 4 50.00
Spot 200 3000 Horizon 2.50 15 1 37.50
Other 25 unknown Sunbeam 0.50 10 3 15.00
Bulb 200 3000 Sunbeam 5.00 3 2 30.00
Neon 100 2000 Sunbeam 1.80 20 5 180.00
Bulb 100 unknown Sunbeam 0.25 10 5 12.50
Bulb 10 800 Horizon 0.20 25 2 10.00
Bulb 60 1000 Sunbeam 0.15 25 1 3.75
Bulb 80 1000 Sunbeam 0.20 30 2 12.00
Bulb 100 2000 Horizon 0.80 10 5 40.00
Bulb 40 1000 Horizon 0.10 20 5 10.00
CountthenumberofproductsofaparticularBrand.
TheCOUNTvalueofHorizonis: 8 =DCOUNTA(B3:I19,E3,E23:E24)
What Does It Do ?
Thisfunctionexaminesalistofinformationandcountsthenonblankcellsinaspecifiedcolumn.
Itcountsvaluesandtextitems,butblankcellsareignored.
Syntax
=DCOUNTA(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthename,orcell,ofthevaluestoCount,suchas"ValueOfStock"orI3.
TheCriteriaRangeismadeupoftwotypesofinformation.
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
DCOUNTA
Thesecondsetofinformationistheactualrecord,orrecords,whicharetobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Examples
Product LifeHours
Bulb unknown
Thenumberofproductsis: 1 =DCOUNTA(B3:I19,D3,E50:F51)
Thisisthesamecalculationbutusingthename"LifeHours"insteadofthecelladdress.
1 =DCOUNTA(B3:I19,"LifeHours",E50:F51)
Product Brand
Bulb Horizon
Thecountis: 5 =DCOUNTA(B3:I19,"Product",E61:F62)
Product Brand
Spot Horizon
Neon Sunbeam
Thecountis: 3 =DCOUNTA(B3:I19,"Product",E68:F70)
DEC2BIN
DecimalNumber BinaryEquivalent
0 0 =DEC2BIN(C4)
1 1 =DEC2BIN(C5)
2 10 =DEC2BIN(C6)
3 11 =DEC2BIN(C7)
511 111111111 =DEC2BIN(C8)
512 #NUM! =DEC2BIN(C9)
1 1111111111 =DEC2BIN(C10)
2 1111111110 =DEC2BIN(C11)
3 1111111101 =DEC2BIN(C12)
511 1000000001 =DEC2BIN(C13)
512 1000000000 =DEC2BIN(C14)
What Does It Do ?
Thisfunctionconvertsadecimalnumbertoitsbinaryequivalent.
Itcanonlycopewithdecimalsrangingfrom512to511.
Theresultcanbepaddedwithleading0zeros,althoughthisisignoredfornegatives.
Syntax
=DEC2BIN(DecimalNumber,PlacesToPad)
ThePlacesToPadisoptional.
Formatting
Nospecialformattingisneeded.
DEC2HEX
DecimalNumber Hexadecimal
0 0 =DEC2HEX(C4)
1 1 =DEC2HEX(C5)
2 2 =DEC2HEX(C6)
3 3 =DEC2HEX(C7)
25 19 =DEC2HEX(C8)
26 1A =DEC2HEX(C9)
27 1B =DEC2HEX(C10)
28 1C =DEC2HEX(C11)
1 FFFFFFFFFF =DEC2HEX(C12)
2 FFFFFFFFFE =DEC2HEX(C13)
3 FFFFFFFFFD =DEC2HEX(C14)
2 FFFFFFFFFE =DEC2HEX(C15)
1 FFFFFFFFFF =DEC2HEX(C16)
549,755,813,887 7FFFFFFFFF =DEC2HEX(C17)
549,755,813,888 8000000000 =DEC2HEX(C18)
549,755,813,888 #NUM! =DEC2HEX(C19)
549,755,813,889 #NUM! =DEC2HEX(C20)
What Does It Do ?
Thisfunctionconvertsadecimalnumbertoitshexadecimalequivalent.
Itcanonlycopewithdecimalsrangingfrom549,755,813,888to549,755,813,887.
Theresultcanbepaddedwithleading0zeros,althoughthisisignoredfornegatives.
Syntax
=DEC2HEX(DecimalNumber,PlacesToPad)
ThePlacesToPadisoptional.
Formatting
Nospecialformattingisneeded.
DELTA
Number1 Number2 Delta
10 20 0 =DELTA(C4,D4)
50 50 1 =DELTA(C5,D5)
17.5 17.5 1 =DELTA(C6,D6)
17.5 18 1 =DELTA(C7,D7)
17.50% 0.175 1 =DELTA(C8,D8)
Hello Hello #VALUE! =DELTA(C9,D9)
1 =DELTA(C10,D10)
What Does It Do ?
Thisfunctioncomparestwovaluesandtestswhethertheyareexactlythesame.
Ifthenumbersarethesametheresultwillbe1,otherwisetheresultis0.
Itonlyworkswithnumbers,textvaluesproducearesultof#VALUE.
Theformattingofthenumberisnotsignificant,sonumberswhichappearroundeddue
totheremovalofdecimalplaceswillstillmatchcorrectlywithnonroundedvalues.
Syntax
=DELTA(FirstNumber,SecondNumber)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableisusedtodeterminehowmaypairsofsimilarnumbersareinalist.
The=DELTA()functiontestseachpairandthenthe=SUM()functiontotalsthem.
Howmanyboxesofaparticularitemdowehaveinstock?
Life
Product Wattage Hours Brand
Bulb 100 Horizon
What Does It Do ?
Thisfunctionexaminesalistofinformationandproducesoneresult.
Ifmorethanonerecordmatchesthecriteriatheerror#NUMisshown.
Ifnorecordsmatchthecriteriatheerror#VALUEisshown.
Syntax
=DGET(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthename,orcell,ofthevaluestoGet,suchas"ValueOfStock"orI3.
TheCriteriaRangeismadeupoftwotypesofinformation.
DGET
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
Thesecondsetofinformationistheactualrecordwhichneedstobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Example 1
Thisexampleextractsinformationfromjustonerecord.
Howmanyboxesofaparticularitemdowehaveinstock?
Life
Product Wattage Hours Brand
Bulb 100 Horizon
Example 2
Thisexampleextractsinformationfrommultiplerecordsandthereforeshowsthe#NUMerror.
Howmanyboxesofaparticularitemdowehaveinstock?
Life
Product Wattage Hours Brand
Bulb 100
Example 3
Thisexampleextractsinformationfromnorecordsandthereforeshowsthe#VALUEerror.
Howmanyboxesofaparticularitemdowehaveinstock?
Life
Product Wattage Hours Brand
DGET
Bulb 9999
Example 4
Thisexampleusesthe=IF()functiontodisplayamessagewhenanerroroccurs.
Howmanyboxesofaparticularitemdowehaveinstock?
Life
Product Wattage Hours Brand
Bulb 9999
Nosuchproduct.
=IF(ISERR(F88),CHOOSE(ERROR.TYPE(F88)/3,"Nosuchproduct.","Duplicatesproductsfound."),"Oneproductfound.")
DMAX
This is the Database range.
Life Box Boxes In Value Of
Product Wattage Hours
Brand Unit Cost Quantity Stock Stock
Bulb 200 3000
Horizon 4.50 4 3 54.00
Neon 100 2000
Horizon 2.00 15 2 60.00
Spot 60 0.00
Other 10 8000 Sunbeam 0.80 25 6 120.00
Bulb 80 1000 Horizon 0.20 40 3 24.00
Spot 100 unknown Horizon 1.25 10 4 50.00
Spot 200 3000 Horizon 2.50 15 0 0.00
Other 25 unknown Sunbeam 0.50 10 3 15.00
Bulb 200 3000 Sunbeam 5.00 3 2 30.00
Neon 100 2000 Sunbeam 1.80 20 5 180.00
Bulb 100 unknown Sunbeam 0.25 10 5 12.50
Bulb 10 800 Horizon 0.20 25 2 10.00
Bulb 60 1000 Sunbeam 0.15 25 0 0.00
Bulb 80 1000 Sunbeam 0.20 30 2 12.00
Bulb 100 2000 Horizon 0.80 10 5 40.00
Bulb 40 1000 Horizon 0.10 20 5 10.00
TocalculatelargestValueOfStockofaparticularBrandofbulb.
What Does It Do ?
Thisfunctionexaminesalistofinformationandproducesthelargestvaluefromaspecifiedcolumn.
Syntax
=DMAX(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthenameorcell,ofthevaluestopicktheMaxfrom,suchas"ValueOfStock"orI3.
TheCriteriaRangeismadeupoftwotypesofinformation.
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
DMAX
Thesecondsetofinformationistheactualrecord,orrecords,whicharetobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Examples
Product Brand
Bulb sunbeam
Thisisthesamecalculationbutusingthename"ValueOfStock"insteadofthecelladdress.
30.00 =DMAX(B3:I19,"ValueOfStock",E49:F50)
Product Wattage
Bulb 100
Product Wattage
Bulb <100
TocalculatelowestValueOfStockofaparticularBrandofbulb.
What Does It Do ?
Thisfunctionexaminesalistofinformationandproducessmallestvaluefromaspecifiedcolumn.
Syntax
=DMIN(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthename,orcell,ofthevaluestopicktheMinfrom,suchas"ValueOfStock"orI3.
TheCriteriaRangeismadeupoftwotypesofinformation.
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
DMIN
Thesecondsetofinformationistheactualrecord,orrecords,whicharetobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Examples
Product Brand
Bulb sunbeam
Thisisthesamecalculationbutusingthename"ValueOfStock"insteadofthecelladdress.
3.75 =DMIN(B3:I19,"ValueOfStock",E49:F50)
Product Wattage
Bulb 100
Syntax
=DOLLAR(Number,DecimalPlaces)
Number:Thisisthenumberwhichneedstobeconverted.
DecimalPlaces:Thisistheamountofdecimalplacesneededintheconvertednumber.
Formatting
Nospecialformattingisneeded.
Theresultwillbeshownasatextentry.
DSUM
This is the Database range.
Life Box Boxes In Value Of
Product Wattage Hours
Brand Unit Cost Quantity Stock Stock
Bulb 200 3000
Horizon 4.50 4 3 54.00
Neon 100 2000
Horizon 2.00 15 2 60.00
Spot 60 0.00
Other 10 8000 Sunbeam 0.80 25 6 120.00
Bulb 80 1000 Horizon 0.20 40 3 24.00
Spot 100 unknown Horizon 1.25 10 4 50.00
Spot 200 3000 Horizon 2.50 15 0 0.00
Other 25 unknown Sunbeam 0.50 10 3 15.00
Bulb 200 3000 Sunbeam 5.00 3 2 30.00
Neon 100 2000 Sunbeam 1.80 20 5 180.00
Bulb 100 unknown Sunbeam 0.25 10 5 12.50
Bulb 10 800 Horizon 0.20 25 2 10.00
Bulb 60 1000 Sunbeam 0.15 25 0 0.00
Bulb 80 1000 Sunbeam 0.20 30 2 12.00
Bulb 100 2000 Horizon 0.80 10 5 40.00
Bulb 40 1000 Horizon 0.10 20 5 10.00
TocalculatethetotalValueOfStockofaparticularBrandofbulb.
What Does It Do ?
Thisfunctionexaminesalistofinformationandproducesthetotal.
Syntax
=DSUM(DatabaseRange,FieldName,CriteriaRange)
TheDatabaseRangeistheentirelistofinformationyouneedtoexamine,includingthe
fieldnamesatthetopofthecolumns.
TheFieldNameisthename,orcell,ofthevaluestobetotalled,suchas"ValueOfStock"orI3.
TheCriteriaRangeismadeupoftwotypesofinformation.
Thefirstsetofinformationisthename,ornames,oftheFields(s)tobeusedasthebasis
forselectingtherecords,suchasthecategoryBrandorWattage.
DSUM
Thesecondsetofinformationistheactualrecord,orrecords,whicharetobeselected,such
asHorizonasabrandname,or100asthewattage.
Formatting
Nospecialformattingisneeded.
Examples
Product Brand
Bulb sunbeam
Thisisthesamecalculationbutusingthename"ValueOfStock"insteadofthecelladdress.
54.50 =DSUM(B3:I19,"ValueOfStock",E49:F50)
Product Wattage
Bulb 100
Product Wattage
Bulb <100
Syntax
=EDATE(StartDate,Months)
Formatting
Theresultwillnormallybeexpressedasanumber,thiscanbeformattedtorepresent
adatebyusingtheFormat,Cells,Number,Datecommand.
Example
Thisexamplewasusedbyacompanyhiringcontractstaff.
Thecompanyneededtoknowtheenddateoftheemployment.
TheStartdateisentered.
ThecontractDurationisenteredasmonths.
The=EDATE()functionhasbeenusedtocalculatetheendofthecontract.
ThecompanydecidenottoendcontractsonSaturdayorSunday.
The=WEEKDAY()functionhasbeenusedtoidentifytheactaulweekdaynumberoftheenddate.
Iftheweekdaynumberis6or7,(SatorSun),then5issubtractedfromthe=EDATE()to
ensuretheendofcontractfallsonaFriday.
=EDATE(C48,D48)IF(WEEKDAY(EDATE(C48,D48),2)>5,WEEKDAY(EDATE(C48,D48),2)5,0)
EOMONTH
StartDate PlusMonths EndOfMonth
5Jan98 2 35885 =EOMONTH(C4,D4)
5Jan98 2 31Mar98 =EOMONTH(C5,D5)
5Jan98 2 30Nov97 =EOMONTH(C6,D6)
Syntax
=EOMONTH(StartDate,Months)
Formatting
Theresultwillnormallybeexpressedasanumber,thiscanbeformattedtorepresent
adatebyusingtheFormat,Cells,Number,Datecommand.
ERROR.TYPE
Data TheError ErrorType
10 0 #DIV/0! 2 =ERROR.TYPE(E4)
10 3 #NAME? 5 =ERROR.TYPE(E5)
10 3 #REF! 4 =ERROR.TYPE(E6)
10:00 13:00 ############## #N/A =ERROR.TYPE(E7)
Syntax
=ERROR.TYPE(Error)
Erroristhecellreferencewheretheerroroccurred.
Formatting
Theresultwillbeformattedasanormalnumber.
Example
SeeExample4inthe=DGET()function.
EVEN
OriginalValue EvenlyRounded
1 2 =EVEN(C4)
1.2 2 =EVEN(C5)
2.3 4 =EVEN(C6)
25 26 =EVEN(C7)
What Does It Do ?
Thisfunctionroundanumberupthenearestevenwholenumber.
Syntax
=EVEN(Number)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableisusedbyagaragewhichrepairscars.
Thegarageisrepairingafleetofcarsfromthreemanufactures.
Eachmanufacturerusesadifferenttypeofwindscreenwiperwhichareonlysuppliedinpairs.
Table1wasusedtoenterthenumberofwipersrequiredforeachtypeofcar
andthenshowhowmanypairsneedtobeordered.
Table1
Car WipersToOrder PairstoOrder
Vauxhall 5 3 =EVEN(D28)/2
Ford 9 5 =EVEN(D29)/2
Peugeot 7 4 =EVEN(D30)/2
EXACT
Text1 Text2 Result
Hello Hello TRUE =EXACT(C4,D4)
Hello hello FALSE =EXACT(C5,D5)
Hello Goodbye FALSE =EXACT(C6,D6)
Syntax
=EXACT(Text1,Text2)
Onlytwoitemsoftextcanbecompared.
Formatting
IfthetwoitemsoftextareexactlythesametheresultofTRUEwillbeshown.
IfthereisanydifferenceinthetwoitemsoftexttheresultofFALSEwillbeshown.
Example
Hereisasimplepasswordcheckingformula.
Youneedtoguessthecorrectpassword.
Thepasswordisthenameofacolour,eitherredblueorgreen.
Thecaseofthepasswordisimportant.
The=EXACT()functionisusedtocheckyourguess.
Guessthepassword: red
Isitcorrect: No
(Tostopyoufromcheating,thecorrectpasswordhasbeenenteredasaseriesof=CHAR()
functions,whichusetheANSInumberofthecharactersratherthanthecharacteritself!)
Itsstillveryeasythough.
FACT
Number Factorial
3 6 =FACT(C4)
3.5 6 =FACT(C5)
5 120 =FACT(C6)
10 3,628,800 =FACT(C7)
20 2,432,902,008,176,640,000 =FACT(C8)
What Does It Do ?
Thisfunctioncalculatesthefactorialofanumber.
Thefactorialiscalculatedas1*2*3*4..etc.
Thefactorialof5iscalculatedas1*2*3*4*5,whichresultsin120.
Decimalfractionsofthenumberareignored.
Syntax
=FACT(Number)
Formatting.
Nospecialformattingisneeded.
FIND
Text LetterToFind PositionOfLetter
Hello e 2 =FIND(D4,C4)
Hello H 1 =FIND(D5,C5)
Hello o 5 =FIND(D6,C6)
AlanWilliams a 3 =FIND(D7,C7)
AlanWilliams a 11 =FIND(D8,C8,6)
AlanWilliams T #VALUE! =FIND(D9,C9)
Syntax
=FIND(LetterToLookFor,TextToLookInside,StartPosition)
LetterToLookFor:Thisneedstobeasinglecharacter.
TextToLookInside:Thisisthepieceoftexttobesearchedthrough.
StartPosition:Thisisoptional,itspecifiesatwhichpointinthetextthesearchshouldbegin.
Formatting
Nospecialformattingisneeded,theresultwillbeshownasanumber.
FIXED
Original Converted
Number ToText
10 10.00 =FIXED(C4)
10 10 =FIXED(C5,0)
10 10.0 =FIXED(C6,1)
10 10.00 =FIXED(C7,2)
10.25 10.25 =FIXED(C8)
10.25 10 =FIXED(C9,0)
10.25 10.3 =FIXED(C10,1)
10.25 10.25 =FIXED(C11,2)
1000 1,000.00 =FIXED(C12)
1000.23 1,000 =FIXED(C13,0)
1000.23 1000 =FIXED(C14,0,TRUE)
What Does It Do ?
Thisfunctionconvertsanumericvaluetotext.
Duringtheconversionthevaluecanberoundedtoaspecificnumberofdecimalplaces,
andcommascanbeinsertedatthe1,000's.
Syntax
=FIXED(NumberToConvert,DecimalPlaces,Commas)
IfDecimalPlacesplacesisnotspecifiedthefunctionwillassume2.
TheCommasoptioncanbeTRUEforcommasorFALSEfornocommas.
IftheCommasisnotspecifiedthefunctionwillassumeTRUE.
Formatting
Nospecialformattingisneeded.
NotethatanyfurtherformattingwiththeFormat,Cells,Numbercommandwillnothaveanyeffect.
FLOOR
Number RoundedDown
1.5 1 =FLOOR(C4,1)
2.3 2 =FLOOR(C5,1)
2.9 2 =FLOOR(C6,1)
123 100 =FLOOR(C7,50)
145 100 =FLOOR(C8,50)
175 150 =FLOOR(C9,50)
What Does It Do ?
Thisfunctionroundsavaluedowntothenearestmultiplespecifiedbytheuser.
Syntax
=FLOOR(NumberToRound,SignificantValue)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtocalculatecommissionformembersofasalesteam.
Commissionisonlypaidforevery1000ofsales.
The=FLOOR()functionhasbeenusedtorounddowntheActualSalestothe
nearest1000,whichisthenusedasthebasisforCommission.
Typethemonthnumbertopredict: 12
TheForecastsalesfigureis: 7,997 =FORECAST(E11,F4:F9,E4:E9)
What Does It Do ?
Thisfunctionusestwosetsofvaluestopredictasinglevalue.
Thepredictedvalueisbasedontherelationshipbetweenthetwooriginalsetsofvalues.
Ifthevaluesaresalesfiguresformonths1to6,(JantoJun),youcanusethefunction
topredictwhatthesalesfigurewillbeinanyothermonth.
ThewayinwhichthepredictioniscalculatedisbasedupontheassumptionofaLinearTrend.
Syntax
=FORECAST(ItemToForeCast,RangeY,RangeX)
ItemToForecastisthepointinthefuture,(orpast),forwhichyouneedtheforecast.
RangeYisthelistofvalueswhichcontainthehistoricaldatatobeusedasthebasis
oftheforecast,suchasSalesfigures.
RangeXistheintervalsusedwhenrecordingthehistoricaldata,suchasMonthnumber.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyacompanyconsideringexpansionoftheirsalesteam.
TheSizeandPerformanceofthepreviousteamsoveraperiodofthreeyearswereentered.
ThesizeoftheNewSalesteamisentered.
The=FORECAST()functionisusedtocalculatethepredictedperformanceforthenewsales
teambaseduponalineartrend.
SizeOf Known
Year SalesTeam Performance
1996 10 5,000
FORECAST
1997 20 8,000
1998 30 8,500
SizeOfTheNewSalesTeam: 40
EstimatedForecastOfPerformance: 10,667 =FORECAST(E43,E39:E41,D39:D41)
FREQUENCY
Jan Feb Mar
North 5,000 6,000 4,500
South 5,800 7,000 3,000
East 3,500 2,000 10,000
West 12,000 4,000 6,000
What Does It Do ?
Thisfunctioncomparesarangeofdataagainstalistofintervals.
Theresultshowshowmanyitemsintherangeofdatafallbetweentheintervals.
Thefunctionisenteredinthecellsasanarray,thatiswhyitisenclosedin{}braces.
Syntax
=FREQUENCY(RangeOfData,ListOfIntervals)
Formatting
Nospecialformattingisneeded.
Example 1
Thefollowingtableswereusedtorecordtheweightofagroupofchildren.
The=FREQUENCY()functionwasthenusedtocalculatethenumberofchildrenwhose
weightsfellbetweenspecifiedintervals.
WeightKg NumberOfChildren:
Child1 20.47 Between015Kg 2
Child2 22.83 Above15butlessthanorequalto20Kg 4
Child3 15.74 Above20Kg 3
Child4 10.80 {=FREQUENCY(C30:C38,C41:C43)}
Child5 8.28 {=FREQUENCY(C30:C38,C41:C43)}
Child6 20.66 {=FREQUENCY(C30:C38,C41:C43)}
Child7 17.36
Child8 16.67
Child9 18.01
KgWeightIntervals
15
FREQUENCY
20
100
FREQUENCY
Example 2
Thisexampleusescharactersinsteadofvalues.
Arestauranthasasked40customersfortheirratingofthefoodintherestaurant.
Theratingswereenteredintoatableasasingleletter,E,V,A,PorD.
Themanagernowwantstocalculatehowmanyresponsesfellintoeachcategory.
Unfortunately,the=FREQUENCY()functionignorestextentries,sohowcanthefrequency
oftextbecalculated?
Theansweristousethe=CODE()and=UPPER()functions.
The=UPPER()forcesallthetextentriestobeconsideredascapitalletters.
The=CODE()functioncalculatestheuniqueANSIcodeforeachcharacter.
Asthiscodeisanumericvalue,the=FREQUENCY()functioncanthenbeused!
Rating Frequency
Excellent E 6 {=FREQUENCY(CODE(UPPER(B67:I71)),CODE(UPPER(C60:C64)))}
VeryGood V 8 {=FREQUENCY(CODE(UPPER(B67:I71)),CODE(UPPER(C60:C64)))}
Average A 9 {=FREQUENCY(CODE(UPPER(B67:I71)),CODE(UPPER(C60:C64)))}
Poor P 8 {=FREQUENCY(CODE(UPPER(B67:I71)),CODE(UPPER(C60:C64)))}
Disgusting D 9 {=FREQUENCY(CODE(UPPER(B67:I71)),CODE(UPPER(C60:C64)))}
CustomerRatings
V D V A p A D D
V P a D A P V d
A V E P p E D A
A E d V D P a E
V e P P A V E D
FREQUENCY 2
Thisexampleshowshowthe=FREQUENCY()functionhasbeenusedtocalculate
howoftencertainnumbersappearintheLotteryresults.
Table1isarecordofalltheresultsfromthepastsevenweeks.
Table1
Week1 Week2 Week3 Week4 Week5 Week6 Week7
1stNumber 3 36 5 3 2 41 45
2ndNumber 6 3 19 37 23 15 4
3rdNumber 15 44 35 20 47 29 44
4thNumber 32 15 32 46 6 45 23
5thNumber 37 31 13 22 49 13 43
6thNumber 5 22 30 8 49 11 46
BonusBall 17 13 15 25 18 17 1
Table2isthelistofpossiblenumberfrom1to49,andhowmanyappearances
eachnumberhasmadeduringthepastsevenweeks.
Table2
Lottery HowMany
Number Appearances
1 1 {=FREQUENCY(C10:I16,B24:B72)}
2 1 {=FREQUENCY(C10:I16,B24:B72)}
3 3 {=FREQUENCY(C10:I16,B24:B72)}
4 1 {=FREQUENCY(C10:I16,B24:B72)}
5 2
6 2
7 0
8 1
9 0 Specialtip!
10 0 Tocounthowmanyuniquenumbersinarange
11 1 usethefollowingformula.Ithastobeentered,
12 0 asanarray,sopressCtrl+Shift+Enterratherthan,
13 3 justEnteralone.
14 0
15 4 Unique values. 31
16 0
17 2 =SUM(1/COUNTIF(C10:I16,C10:I16))
18 1
FREQUENCY 2
19 1
20 1
21 0
22 2
23 2
24 0
25 1
26 0
27 0
28 0
29 1
30 1
31 1
32 2
33 0
34 0
35 1
36 1
37 2
38 0
39 0
40 0
41 1
42 0
43 1
44 2
45 2
46 2
47 1
48 0
49 2
GCD
Greatest
Numbers Divisor
6 15 3 =GCD(C4,D4)
28 49 7 =GCD(C5,D5)
5 99 1 =GCD(C6,D6)
Greatest
Numbers Divisor
18 72 96 6 =GCD(C9,D9,E9)
300 500 200 100 =GCD(C10,D10,E10)
2.5 4 6 2 =GCD(C11,D11,E11)
What Does It Do ?
Thisfunctioncalculatesthelargestnumberwhichcanbeusedtodividedallthe
valuesspecified.
Theresultisalwaysawholenumber.
Wherethereisnocommondivisorthevalueof1isused.
Decimalfractionsareignored.
Syntax
=GCD(Number1,Number2,Number3...throughtoNumber29)
Formatting
Nospecialformattingisneeded.
GESTEP
Number1 Number2 GESTEP
10 20 0 =GESTEP(C4,D4)
50 20 1 =GESTEP(C5,D5)
99 100 0 =GESTEP(C6,D6)
100 100 1 =GESTEP(C7,D7)
101 100 1 =GESTEP(C8,D8)
2 1 =GESTEP(C9,D9)
2 0 =GESTEP(C10,D10)
What Does It Do ?
Thisfunctiontestanumbertoseeifitisgreaterthanorequaltoanothernumber.
Ifthenumberisgreaterthanorequal,theresultof1willbeshown,otherwise0isshown.
Syntax
=GESTEP(NumberToTest,NumberToTestAgainst)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtocalculatehowmanysalesstaffachievedtheirtargets.
The=GESTEP()functioncomparestheSaleswithTarget,andtheresultsaretotalled.
TargetsAchieved 3 =SUM(F27:F31)
HEX2DEC
Hexadecimal DecimalNumber
0 0 =HEX2DEC(C4)
1 1 =HEX2DEC(C5)
2 2 =HEX2DEC(C6)
3 3 =HEX2DEC(C7)
1A 26 =HEX2DEC(C8)
1B 27 =HEX2DEC(C9)
7FFFFFFFFF 549,755,813,887 =HEX2DEC(C10)
8000000000 549,755,813,888 =HEX2DEC(C11)
FFFFFFFFFF 1 =HEX2DEC(C12)
FFFFFFFFFE 2 =HEX2DEC(C13)
FFFFFFFFFD 3 =HEX2DEC(C14)
What Does It Do ?
Thisfunctionconvertsahexadecimalnumbertoitsdecimalequivalent.
Syntax
=HEX2DEC(HexaDecimalNumber)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtoaddtwohexadecimalvaluestogether.
Hexadecimal
Value1 F
Value2 1A
Result 29 =DEC2HEX(HEX2DEC(C29)+HEX2DEC(C30))
HLOOKUP
Jan Feb Mar row 1 The row numbers are not needed.
10 80 97 row 2 they are part of the illustration.
20 90 69 row 3
30 100 45 row 4
40 110 51 row 5
50 120 77 row 6
Typeamonthtolookfor: Feb
Whichrowneedstobepickedout: 4
What Does It Do ?
Thisfunctionscansacrossthecolumnheadingsatthetopofatabletofindaspecifieditem.
Whentheitemisfound,itthenscansdownthecolumntopickacellentry.
Syntax
=HLOOKUP(ItemToFind,RangeToLookIn,RowToPickFrom,SortedOrUnsorted)
TheItemToFindisasingleitemspecifiedbytheuser.
TheRangeToLookInistherangeofdatawiththecolumnheadingsatthetop.
TheRowToPickFromishowfardownthecolumnthefunctionshouldlooktopickfrom.
TheSorted/Unsortediswhetherthecolumnheadingsaresorted.TRUEforyes,FALSEforno.
Formatting
Nospecialformattingisneeded.
HLOOKUP
Example 1
Thistableisusedtofindavaluebasedonaspecifiedmonthandname.
The=HLOOKUP()isusedtoscanacrosstofindthemonth.
Theproblemariseswhenweneedtoscandowntofindtherowadjacenttothename.
Tosolvetheproblemthe=MATCH()functionisused.
The=MATCH()looksthroughthelistofnamestofindthenamewerequire.Itthencalculates
thepositionofthenameinthelist.Unfortunately,becausethelistofnamesisnotasdeep
asthelookuprange,the=MATCH()numberis1lessthanwerequire,soandextra1is
addedtocompensate.
The=HLOOKUP()nowusesthis=MATCH()numbertolookdownthemonthcolumnand
picksoutthecorrectcellentry.
The=HLOOKUP()usesFALSEattheendofthefunctiontoindicatetoExcelthatthe
columnheadingsarenotsorted,eventhoughtoustheorderofJan,Feb,Mariscorrect.
IftheyweresortedalphabeticallytheywouldhavereadasFeb,Jan,Mar.
Typeamonthtolookfor: feb
Typeanametolookfor: alan
100
Theresultis:
=HLOOKUP(F54,D47:F54,MATCH(F55,C48:C52,0)+1,FALSE)
HLOOKUP
Example 2
Thisexampleshowshowthe=HLOOKUP()isusedtopickthecostofasparepartfor
differentmakesofcars.
The=HLOOKUP()scansthecolumnheadingsforthemakeofcarspecifiedincolumnB.
Whenthemakeisfound,the=HLOOKUP()thenlooksdownthecolumntotherowspecified
bythe=MATCH()function,whichscansthelistofsparesfortheitemspecifiedincolumnC.
Thefunctionusestheabsoluterangesindicatedbythedollarsymbol$.Thisensuresthat
whentheformulaiscopiedtomorecells,therangesfor=HLOOKUP()and=MATCH()do
notchange.
AllthecalculationstakeplaceintheOrdersTable.
ThenameoftheItemistypedincolumnC.
TheUnitCostoftheitemisthenlookedupintheUnitCostTable.
TheFALSEoptionhasbeenusedattheendofthefunctiontoindicatethattheproduct
namesacrossthetopoftheUnitCostTablearenotsorted.
UsingtheFALSEoptionforcesthefunctiontosearchforanexactmatch.Ifamatchis
notfound,thefunctionwillproduceanerror.
=HLOOKUP(C127,E111:G112,2,FALSE)
ThediscountisthenlookedupintheDiscountTable
IftheQuantityOrderedmatchesavalueatthetopoftheDiscountTablethe=HLOOKUPwill
lookdownthecolumntofindthecorrectdiscount.
TheTRUEoptionhasbeenusedattheendofthefunctiontoindicatethatthevalues
acrossthetopoftheDiscountTablearesorted.
UsingTRUEwillallowthefunctiontomakeanapproximatematch.IftheQuantityOrdereddoes
notmatchavalueatthetopoftheDiscountTable,thenextlowestvalueisused.
Tryingtomatchanorderof125willdropdownto100,andthediscountfrom
the100columnisused.
=HLOOKUP(D127,E115:G118,MATCH(C127,D116:D118,0)+1,TRUE)
UnitCostTable
Brick Wood Glass
2 1 3
DiscountTable
1 100 300
Brick 0% 6% 8%
Wood 0% 3% 5%
Glass 0% 12% 15%
OrdersTable
Item Units UnitCost Discount Total
Brick 100 2 6% 188
HLOOKUP
Wood 200 1 3% 194
Glass 150 3 12% 396
Brick 225 2 6% 423
Wood 50 1 0% 50
Glass 500 3 15% 1,275
UnitCost =HLOOKUP(C127,E111:G112,2,FALSE)
Discount =HLOOKUP(D127,E115:G118,MATCH(C127,D116:D118,0)+1,TRUE)
HOUR
Number Hour
21:15 21 =HOUR(C4)
0.25 6 =HOUR(C5)
Syntax
=HOUR(Number)
Formatting
Theresultwillbeshownasanormalnumberbetween0and23.
IF
Name Sales Target Result
Alan 1000 5000 NotAchieved =IF(C4>=D4,"Achieved","NotAchieved")
Bob 6000 5000 Achieved =IF(C5>=D5,"Achieved","NotAchieved")
Carol 2000 4000 NotAchieved =IF(C6>=D6,"Achieved","NotAchieved")
Syntax
=IF(Condition,ActionIfTrue,ActionIfFalse)
TheConditionisusuallyatestoftwocells,suchasA1=A2.
TheActionIfTrueandActionIfFalsecanbenumbers,textorcalculations.
Formatting
Nospecialformattingisrequired.
Example 1
ThefollowingtableshowstheSalesfiguresandTargetsforsalesreps.
Eachhastheirowntargetwhichtheymustreach.
The=IF()functionisusedtocomparetheSaleswiththeTarget.
IftheSalesaregreaterthanorequaltotheTargettheresultofAchievedisshown.
IftheSalesdonotreachthetargettheresultofNotAchievedisshown.
Notethatthetextusedinthe=IF()functionneedstobeplacedindoublequotes"Achieved".
Example 2
ThefollowingtableissimilartothatinExample1.
ThistimetheCommissiontobepaidtothesalesrepiscalculated.
IftheSalesaregreaterthanorequaltotheTarget,theCommissionis10%ofSales.
IftheSalesdonotreachTarget,theCommissionisonly5%ofSales.
IF
Name Sales Target Commission
Alan 1000 5000 50 =IF(C43>=D43,C43*10%,C43*5%)
Bob 6000 5000 600 =IF(C44>=D44,C44*10%,C44*5%)
Carol 2000 4000 100 =IF(C45>=D45,C45*10%,C45*5%)
Example 3
Thisexampleusesthe=AND()withinthe=IF()function.
Abuildersmerchantgives10%discountoncertainproductlines.
ThediscountisonlygivenonproductswhichareonSpecialOffer,whentheOrderValue
is1000orabove.
The=AND()functionisusedwiththe=IF()tocheckthattheproductisonofferandthat
thevalueoftheorderisabove1000.
Special Order
Product Offer Value Discount Total
Wood Yes 2,000 200 1,800
Glass No 2,000 2,000
Cement Yes 500 500
Turf Yes 3,000 300 2,700
=IF(AND(C61="Yes",D61>=1000),D61*10%,0)
INDEX
Holidaybookingpricelist.
People
Weeks 1 2 3 4
1 500 300 250 200
2 600 400 300 250
3 700 500 350 300
Howmanyweeksrequired: 2
Howmanypeopleintheparty: 4
What Does It Do ?
Thisfunctionpicksavaluefromarangeofdatabylookingdownaspecifiednumber
ofrowsandthenacrossaspecifiednumberofcolumns.
Itcanbeusedwithasingleblockofdata,ornoncontinuosblocks.
Syntax
Therearevariousformsofsyntaxforthisfunction.
Syntax 1
=INDEX(RangeToLookIn,Coordinate)
ThisisusedwhentheRangeToLookIniseitherasinglecolumnorrow.
TheCoordinateindicateshowfardownoracrosstolookwhenpickingthedatafromtherange.
Bothoftheexamplesbelowusethesamesyntax,buttheCoordinatereferstoarowwhen
therangeisverticalandacolumnwhentherangeishorizontal.
Colours
Red
Green
Blue Size Large Medium Small
Typeeither1,2or3: 2 Typeeither1,2or3: 2
Thecolouris: Green Thesizeis: Medium
=INDEX(D32:D34,D36) =INDEX(G34:I34,H36)
INDEX
Syntax 2
=INDEX(RangeToLookIn,RowCoordinate,ColumnColumnCordinate)
Thissyntaxisusedwhentherangeismadeupofrowsandcolumns.
Type1,2,3or4forthecountry: 2
Type1,2or3forstatistics : 3
Syntax 3
=INDEX(NamedRangeToLookIn,RowCoordinate,ColumnColumnCordinate,AreaToPickFrom)
Usingthissyntaxtherangetolookincanbemadeupofmultipleareas.
Theeasiestwaytorefertotheseareasistoselectthemandgivethemasinglename.
TheAreaToPickFromindicateswhichofthemultipleareasshouldbeused.
InthefollowingexamplethefiguresforNorthandSouthhavebeennamedasone
rangecalledNorthAndSouth.
Type1,2or3fortheproduct: 1
Type1,2,3or4fortheQtr: 3
Type1forNorthor2forSouth: 2
INDEX
Theresultis: 3500 =INDEX(NorthAndSouth,F76,F77,F78)
INDEX
Example
Thisisanextendedversionofthepreviousexample.
Itallowsthenamesofproductsandthequarterstobeentered.
The=MATCH()functionisusedtofindtherowandcolumnpositionsofthenamesentered.
Thesepositionsarethenusedbythe=INDEX()functiontolookforthedata.
Type1,2or3fortheproduct: wood
Type1,2,3or4fortheQtr: qtr2
Type1forNorthor2forSouth: west
Theresultis: 6500
=INDEX(EastAndWest,MATCH(F100,C91:C93,0),MATCH(F101,D90:G90,0),IF(F102=C90,1,IF(F102=C95,2)))
INDIRECT
Jan Feb Mar
North 10 20 30
South 40 50 60
East 70 80 90
West 100 110 120
Typeaddressofanyofthecellsintheabovetable,suchasG6: G6
Thevalueinthecellyoutypedis: 80 =INDIRECT(H9)
What Does It Do ?
Thisfunctionconvertsaplainpieceoftextwhichlookslikeacelladdressintoausable
cellreference.
Theaddresscanbeeitheronthesameworksheetoronadifferentworksheet.
Syntax
=INDIRECT(Text)
Formatting
Nospecialformattingisneeded.
Example 1
Thisexampleshowshowdatacanbepickedformotherworksheetsbyusing
theworksheetnameandacelladdress.
TheexampleusesthreeotherworksheetsnamedNORTH,SOUTHandEAST.
Thedataonthesethreesheetsislaidoutinthesamecellsoneachsheet.
Whenareferencetoasheetismadetheexclamationsymbol!needstobeplaced
betweenthesheetnameandcelladdressactingaspunctuation.
Typethenameofthesheet,suchasNorth: North
Typethecell topickdatafrom,suchasC8: C8
ThecontentsofthecellC8onNorthis: 120 =INDIRECT(G33&"!"&G34)
The=INDIRECT()createdareferenceto=NORTH!C8
Example 2
Thisexampleusesthesamedataasabove,butthistimethe=SUM()functionis
INDIRECT
usedtocalculateatotalfromarangeofcells.
Typethenameofthesheet,suchasSouth: South
Typethestartcelloftherange,suchasC5: C5
Typetheend celloftherange,suchasC7: C7
ThesumoftherangeC5:C7onSouthis: 1200
=SUM(INDIRECT(G44&"!"&G45&":"&G46))
The=INDIRECT()createdareferenceto=SUM(SOUTH!C5:C7)
INFO
SystemInformation
F:\SHAHIDDataCollection\PPTTEmplets&Vista\Exel
Currentdirectory formuladictionary\ =INFO("directory")
Availablebytesofmemory 1,048,576 =INFO("memavail")
Memoryinuse 5,688,532 =INFO("memused")
Totalbytesofmemory 6,737,108 =INFO("totmem")
Numberofactiveworksheets 179 =INFO("numfile")
Cellcurrentlyinthetopleftofthewindow $A:$A$1 =INFO("origin")
Operatingsystem Windows(32bit)NT5.01 =INFO("osversion")
Recalculationmode Automatic =INFO("recalc")
Excel version 11.0 =INFO("release")
Nameofsystem. (PCorMac) pcdos =INFO("system")
Syntax
=INFO(text)
text:Thisisthenameoftheitemyourequireinformationabout.
Formatting
Theresultswillbeshownastextoranumberdependinguponwhatwasrequested.
INT
Number Integer
1.5 1 =INT(C4)
2.3 2 =INT(C5)
10.75 10 =INT(C6)
1.47589 2 =INT(C7)
What Does It Do ?
Thisfunctionroundsanumberdowntothenearestwholenumber.
Syntax
=INT(Number)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyaschooltocalculatetheageachildwhenthe
schoolyearstarted.
Achildcanonlybeadmittedtoschooliftheyareover8yearsold.
TheBirthDateandtheTermStartdateareenteredandtheagecalculated.
Table1showstheageofthechildwithdecimalplaces
Table1
BirthDate TermStart Age
1Jan80 1Sep88 8.668035592 =(D27C27)/365.25
5Feb81 1Sep88 7.570157426
20Oct79 1Sep88 8.8678987
1Mar81 1Sep88 7.504449008
Table2showstheageofthechildwiththeAgeformattedwithnodecimalplaces.
Thishastheeffectofincreasingthechildage.
Table2
BirthDate TermStart Age
1Jan80 1Sep88 9 =(D38C38)/365.25
5Feb81 1Sep88 8
20Oct79 1Sep88 9
1Mar81 1Sep88 8
INT
Table3showstheageofthechildwiththeAgecalculatedusingthe=INT()functionto
removethedecimalpartofthenumbertogivethecorrectage.
Table3
BirthDate TermStart Age
1Jan80 1Sep88 8 =INT((D49C49)/365.25)
5Feb81 1Sep88 7
20Oct79 1Sep88 8
1Mar81 1Sep88 7
Note
TheageiscalculatedbysubtractingtheBirthDatefromtheTermStarttofindthe
ageofthechildindays.
Thenumberofdaysisthendividedby365.25
Thereasonforusing365.25istotakeaccountoftheleapyears.
ISBLANK
Data IsTheCellBlank
1 FALSE =ISBLANK(C4)
Hello FALSE =ISBLANK(C5)
TRUE =ISBLANK(C6)
25Dec98 FALSE =ISBLANK(C7)
Syntax
=ISBLANK(CellToTest)
Formatting
UsedbyitselftheresultwillbeshownasTRUEorFALSE.
Example
Thefollowingexampleshowsalistofchequesreceivedbyacompany.
Whenthechequeisclearedthedateisentered.
UntiltheCleareddateisenteredtheClearedcolumnisblank.
WhiletheClearedcolumnisblankthechequewillstillbeOutstanding.
WhentheCleareddateisenteredthechequewillbeshownasBanked.
The=ISBLANK()functionisusedtodeterminewhethertheClearedcolumnisemptyornot.
What Does It Do ?
ThisfunctiontestsacellandshowsTRUEifthereisanerrorvalueinthecell.
ItwillshowFALSEifthecontentsofthecellcalculatewithoutanerror,oriftheerror
isthe#NAmessage.
Syntax
=ISERR(CellToTest)
TheCellToTestcanbeacellreferenceoracalculation.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableswereusedbyapublicantocalculatethecostofasinglebottle
ofchampagne,bydividingthecostofthecratebythequantityofbottlesinthecrate.
Table1showswhathappenswhenthevaluezero0isenteredasthenumberofbottles.
The#DIV/0indicatesthatanattemptwasmadetodividebyzero0,whichExceldoesnotdo.
Table1
CostOfCrate: 24
BottlesInCrate: 0
Costofsinglebottle: #DIV/0! =E32/E33
Table2showshowthiserrorcanbetrappedbyusingthe=ISERR()function.
Table2
CostOfCrate: 24
BottlesInCrate: 0
ISERR
Costofsinglebottle: Tryagain! =IF(ISERR(E40/E41),"Tryagain!",E40/E41)
ISERROR
Celltotest Result
3 FALSE =ISERROR(D4)
#DIV/0! TRUE =ISERROR(D5)
#NAME? TRUE =ISERROR(D6)
#REF! TRUE =ISERROR(D7)
#VALUE! TRUE =ISERROR(D8)
#N/A TRUE =ISERROR(D9)
#N/A TRUE =ISERROR(D10)
What Does It Do ?
Thisfunctiontestsacellorcalculationtodeterminewhetheranerrorhasbeengenerated.
ItwillshowTRUEforanytypeoferrorandFALSEifnoerrorisfound.
Syntax
=ISERROR(CellToTest)
TheCellToTestcanbeacellreferenceoraformula.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableswasusedtocalculatethedifferencebetweentwodates.
Table1showsanerrorduetothefactthatthefirstentrywasenteredusinganinappropriate
dateformat.
Table1
Startdate: Jan0198
Enddate: 5Jan98
Difference: #VALUE! =D31D30
Table2showshowthe=ISERROR()functionhasbeenusedtotraptheerrorandinformthe
userthattherehasbeenanerrorinthedataentry.
Table2
Startdate: Jan0198
Enddate: 5Jan98
Difference: Errorindataentry
ISERROR
=IF(ISERROR(D40D39),"Errorindataentry",D40D39)
ISEVEN
Number IsitEven
1 FALSE =ISEVEN(C4)
2 TRUE =ISEVEN(C5)
2.5 TRUE =ISEVEN(C6)
2.6 TRUE =ISEVEN(C7)
3.5 FALSE =ISEVEN(C8)
3.6 FALSE =ISEVEN(C9)
Hello #VALUE! =ISEVEN(C10)
1Feb98 FALSE =ISEVEN(C11)
1Feb96 TRUE =ISEVEN(C12)
What Does It Do ?
Thisfunctiontestsanumbertodeterminewhetheritiseven.
AnevennumberisshownasTRUEanoddnumberisshownasFALSE.
Notethatdecimalfractionsareignored.
Notethatdatescanbeevenorodd.
Notethattextentriesresultinthe#VALUE!error.
Syntax
=ISEVEN(CellToTest)
Formatting
Nospecialformattingisrequired.
ISLOGICAL
CellToTest Result
FALSE TRUE =ISLOGICAL(D4)
TRUE TRUE =ISLOGICAL(D5)
FALSE =ISLOGICAL(D6)
20 FALSE =ISLOGICAL(D7)
1Jan98 FALSE =ISLOGICAL(D8)
Hello FALSE =ISLOGICAL(D9)
#DIV/0! FALSE =ISLOGICAL(D10)
What Does It Do ?
Thisfunctiontestsacelltodeterminewhetherthecellcontentsarelogical.
ThelogicalvaluescanonlybeTRUEorFALSE.
Ifthecelldoescontainalogicalvalue,theresultTRUEisshown.
Ifthecelldoesnotcontainalogicalvalue,theresultFALSEisshown.
Syntax
=ISLOGICAL(CellToTest)
Formatting
Nospecialformattingisneeded.
ISNA
Number Result
1 FALSE =ISNA(C4)
Hello FALSE =ISNA(C5)
FALSE =ISNA(C6)
1Jan98 FALSE =ISNA(C7)
#N/A TRUE =ISNA(C8)
Syntax
=ISNA(CellToTest)
Formatting
Nospecialformattingisneeded.
ISNONTEXT
ItemToTest IsItANumber?
10 TRUE =ISNONTEXT(C4)
Hello FALSE =ISNONTEXT(C5)
TRUE =ISNONTEXT(C6)
1Jan98 TRUE =ISNONTEXT(C7)
1OO FALSE =ISNONTEXT(C8)
Syntax
=ISNONTEXT(CellToTest)
Formatting
Nospecialformatting.
Examples
Thefollowingtableisusedbyanelectricalretailertocalculatethesellingprice
ofanitembasedonthebuyingpriceandtheshopmarkup.
Table1showsthe#VALUE!errorgeneratedwhenanumber,300,isentered
usingtheletterOinsteadofthezero0.
Table 1
Item BuyingPrice Markup Profit
Radio 400 150% 600
TV 800 200% 1600
Video 3OO 150% #VALUE! =D32*E32
Table2showshowtheerroristrappedusingthe=ISNONTEXTfunctionand
the=IF()functioninthecalculation.
Table 2
Item BuyingPrice Markup Profit
Radio 400 150% 600
ISNONTEXT
TV 800 200% 1600
Video 3OO 150% RetypethePrice
=IF(ISNONTEXT(D40),D40*E40,"Retype
thePrice")
ISNUMBER
CellEntry Result
1 TRUE =ISNUMBER(D4)
1Jan98 TRUE =ISNUMBER(D5)
FALSE =ISNUMBER(D6)
#DIV/0! FALSE =ISNUMBER(D7)
Hello FALSE =ISNUMBER(D8)
What Does It Do ?
Thisfunctionexaminesacellorcalculationtodeterminewhetheritisanumericvalue.
IfthecellorcalculationisanumericvaluetheresultTRUEisshown.
Ifthecellorcalculationisnotnumeric,orisblank,theresultFALSEisshown.
Syntax
=ISNUMBER(CellToTest)
Thecelltotestcanbeacellreferenceoracalculation.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyapersonneldepartmenttolookupthesalaryofanemployee.
TheemployeecanbeenteredasaNameorasaNumericvalue.
The=ISNUMBER()functionhasbeenusedtoidentifythetypeofentrymade,andthen
the=IF()decideswhichVLOOKUPtoperform.
TypeEmployeeNameorID: eric
TheSalaryis: 12,000
=IF(ISNUMBER(E35),VLOOKUP(E35,C29:E33,3,FALSE),VLOOKUP(E35,D29:E33,2,FALSE))
ISODD
Number IsitOdd
1 TRUE =ISODD(C4)
2 FALSE =ISODD(C5)
2.5 FALSE =ISODD(C6)
2.6 FALSE =ISODD(C7)
3.5 TRUE =ISODD(C8)
3.6 TRUE =ISODD(C9)
Hello #VALUE! =ISODD(C10)
1Feb98 TRUE =ISODD(C11)
1Feb96 FALSE =ISODD(C12)
What Does It Do ?
Thisfunctiontestsanumbertodeterminewhetheritisodd.
AnoddnumberisshownasTRUEanevennumberisshownasFALSE.
Notethatdecimalfractionsareignored.
Notethatdatescanbeoddoreven.
Notethattextentriesresultinthe#VALUE!error.
Syntax
=ISODD(CellToTest)
Formatting
Nospecialformattingisrequired.
ISREF
TRUE =ISREF(A1)
FALSE =ISREF(B99)
FALSE =ISREF(Hello)
FALSE =ISREF(10)
FALSE =ISREF(NOW())
FALSE =ISREF("A1")
FALSE =ISREF(XX99)
What Does It Do ?
ThisfunctionshowsTRUEifgivenacelladdress,orFALSEforanyothertypeofvalue.
Itsabitofanoddone,andisnormallyusedinmacrosratherthanontheworksheet.
Syntax
=ISREF(ValueToTest)
TheValueToTestcanbeanytypeofdata,butwhenusedontheworksheet,itcannotbea
referencetothecontentsofanothercell,asthereferencewillitselfbeevaluatedbythefunction.
Formatting
Nospecialformattingisneeded.
ISTEXT
CellToTest Result
Hello TRUE =ISTEXT(D4)
1 FALSE =ISTEXT(D5)
25Dec98 FALSE =ISTEXT(D6)
FALSE =ISTEXT(D7)
What Does It Do ?
Thisfunctionstestsanentrytodeterminewhetheritistext.
IftheentryistextisshowsTRUE.
IftheentryisanyothertypeitshowsFALSE.
Syntax
=ISTEXT(CellToTest)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyapersonneldepartmenttolookupthesalaryofanemployee.
TheemployeecanbeenteredasaNameorasaNumericvalue.
The=ISTEXT()functionhasbeenusedtoidentifythetypeofentrymade,andthen
the=IF()decideswhichVLOOKUPtoperform.
TypeEmployeeNameorID: 3
TheSalaryis:
8,000
=IF(ISTEXT(E33),VLOOKUP(E33,D27:E31,2,FALSE),VLOOKUP(E33,C27:E31,3,FALSE))
LARGE
Values HighestValue 800 =LARGE(C4:C8,1)
120 2ndHighestValue 250 =LARGE(C4:C8,2)
800 3rdHighestValue 120 =LARGE(C4:C8,3)
100 4thHighestValue 120 =LARGE(C4:C8,4)
120 5thHighestValue 100 =LARGE(C4:C8,5)
250
What Does It Do ?
Thisfunctionexaminesalistofvaluesandpicksthevalueatauserspecifiedposition
inthelist.
Syntax
=LARGE(ListOfNumbersToExamine,PositionToPickFrom)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtocalculatethetop3salesfiguresbetweenJan,FebandMar.
Note
AnotherwaytofindtheHighestandLowestvalueswouldhavebeentouse
the=MAX()and=MIN()functions.
What Does It Do ?
ThisfunctioncalculatetheLeastCommonMultiple,whichisthesmallestnumber
thatcanbedividedbyeachofthegivennumbers.
Syntax
=LCM(Number1,Number2,Number3...throughtoNumber29)
Formatting
Nospecialformattingisneeded.
LEFT
NumberOf
Characters
Text Required LeftString
AlanJones 1 A =LEFT(C4,D4)
AlanJones 2 Al =LEFT(C5,D5)
AlanJones 3 Ala =LEFT(C6,D6)
Cardiff 6 Cardif =LEFT(C7,D7)
ABC123 4 ABC1 =LEFT(C8,D8)
What Does It Do ?
Thisfunctiondisplaysaspecifiednumberofcharactersfromthelefthandsideofa
pieceoftext.
Syntax
=LEFT(OriginalText,NumberOfCharactersRequired)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtoextractthefirstnameofapersonfromtheirfullname.
The=FIND()functionwasusedtolocatepositionofthespacebetweenthefirstandsecondname.
Thelengthofthefirstnameisthereforethepositionofthespaceminusonecharacter.
The=LEFT()functioncannowextractthefirstnamebasedonthepositionofthespace.
FullName FirstName
AlanJones Alan =LEFT(C27,FIND("",C27)1)
BobSmith Bob =LEFT(C28,FIND("",C28)1)
CarolWilliams Carol =LEFT(C29,FIND("",C29)1)
LEN
Text Length
AlanJones 10 =LEN(C4)
BobSmith 9 =LEN(C5)
CarolWilliams 14 =LEN(C6)
Cardiff 7 =LEN(C7)
ABC123 6 =LEN(C8)
What Does It Do ?
Thisfunctioncountsthenumberofcharacters,includingspacesandnumbers,inapieceoftext.
Syntax
=LEN(Text)
Formatting
NoSpecialformattingisneeded.
Example
Thisexampleshowshowthe=LEN()functionisusedinaformulawhichextractsthe
secondnamefromatextentrycontainingbothfirstandsecondnames.
OriginalText
CarolWilliams 6 =FIND("",C24)
Thisisthepositionofthespace.
CarolWilliams 8 =LEN(C24)FIND("",C24)
Thisisthelengthofthesecondname.
Calculatedbytakingtheoveralllengthofthecomplete
nameandsubtractingthepositionofthespace.
=RIGHT(C24,LEN(C24)FIND("",C24))
Thisisjustthesecondname.
Calculatedbyusingthe=RIGHT()functiontoextract
therightmostcharactersuptothelengthof
thesecondname.
LOOKUP (Array)
Name Jan Feb Mar
Alan 10 80 97
Bob 20 90 69
Carol 30 100 45
David 40 110 51
Eric 50 120 77
Francis 60 130 28
Gail 70 140 73
TypeaNameinthiscell: Eric
TheMarchvalueforthispersonis: 77 =LOOKUP(F12,D4:G10)
What Does It Do ?
Thisfunctionlooksforapieceofinformationinalist,andthenpicksanitemfromthe
lastcellintheadjacentroworcolumn.
Italwayspicksthedatafromtheendoftheroworcolumn,soitisnogoodifyouneed
topickdatafrompartwayacrossalist,(useVLOOKUPorHLOOKUP).
Thewayinwhichthefunctiondecideswhethertopickfromtheroworcolumnisbased
onthesizeofthetable.
Ifthetablehasmorerowsthancolumns: thefunctionwilllookdowntheleftmostcolumn
tryingtofindamatchforthepieceofinformation
youaskedittolookfor.
Whenamatchisfound,thefunctionwilllook
acrosstotherightmostcolumntopickthe
lastentryontherow.
Ifthetablehasthesameamountofrowsandcolumns:
thefunctionwilllookdowntheleftmostcolumnand
workinjustthesamewayasifthetablehadmore
rowsthancolumns,asinthedescriptionabove.
Ifthetablehasmorecolumnsthanrows: thefunctionwilllookacrossthetoprowtrying
tofindamatchforthepieceofinformationyou
haveaskedittolookfor.
Whenamatchisfound,thefunctionwillthenlook
LOOKUP (Array)
downtothebottomcellofthecolumntopick
thelastentryofthecolumn.
Syntax
=LOOKUP(WhatToLookFor,RangeToLookIn)
TheWhatToLookForshouldbeasingleitem.
TheRangeToLookincanbeeitherhorizontalorvertical.
Becarefulnottoincludeunnecessaryheadingintherangeasthesewillcauseerrors.
Example 1 Example 2
Inthistabletherearemore Inthistabletherearemorecolumnsthanrows,so
rowsthancolumns,sothe therowheadingofJanisnotincludedinthe
columnheadingofJanis lookuprange.
notincludedinthelookup
range. Alan Bob Carol David
Jan Jan 100 100 100 100
Alan 100
Bob 100
Carol 100
David 100
Eric 100
Fred 100
Formatting
Nospecialformattingisneeded.
Problems
Thelistofinformationtobelookedthroughmustbesortedinascendingorder,otherwiseerrors
willoccur,eitheras#N/Aorincorrectresults.
Table1showstheNamecolumnsortedalphabetically,theresultsofusing=LOOKUP()will
becorrect.
Table2showsthesamedata,butnotsorted.Sometimestheresultswillbecorrect,butother
timestheresultwillbean#N/Aerrororincorrectfigure.
Table 1 Table 2
Name Jan Feb Mar Name Jan Feb Mar
Alan 10 80 97 David 40 110 51
Bob 20 90 69 Eric 50 120 77
LOOKUP (Array)
Carol 30 100 45 Alan 10 80 97
David 40 110 51 Bob 20 90 69
Eric 50 120 77 Carol 30 100 45
Francis 60 130 28 Francis 60 130 28
Gail 70 140 73 Gail 70 140 73
Value: 77 Value: 45
=LOOKUP(C88,B80:E86) =LOOKUP(H88,G80:J86)
LOOKUP (Vector)
Name Jan Feb Mar
Alan 10 80 97
Bob 20 90 69
Carol 30 100 45
David 40 110 51
Eric 50 120 77
Francis 60 130 28
Gail 70 140 73
TypeaNameinthiscell: Eric
What Does It Do ?
Thisfunctionlooksforapieceofinformationinalist,andthenpicksanitemfrom
asecondrangeofcells.
Syntax
=LOOKUP(WhatToLookFor,RangeToLookIn,RangeToPickFrom)
TheWhatToLookForshouldbeasingleitem.
TheRangeToLookincanbeeitherhorizontalorvertical.
TheRangeToPickFrommusthavethesamenumberofcellsinitastheRangeToLookin.
Becarefulnottoincludeunnecessaryheadingintherangesasthesewillcauseerrors.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingexampleshowshowthe=LOOKUP()functionwasusedtomatchanametyped
incellG41againstthelistofnamesinC38:C43.Whenamatchisfoundthe=LOOKUP()then
picksfromthesecondrangeE38:J38.
IfthenameCarolisused,thematchismadeinthethirdcellofthelistofnames,andthen
thefunctionpicksthethirdcellfromthelistofvalues.
RangeToLookIn RangeToPickFrom
Alan 5 10 15 20 25 30
Bob
Carol
David Typeaname: Carol
LOOKUP (Vector)
Eric Value: 15
Fred =LOOKUP(G41,C38:C43,E38:J38)
Problems
Thelistofinformationtobelookedthroughmustbesortedinascendingorder,otherwiseerrors
willoccur,eitheras#N/Aorincorrectresults.
LOWER
UpperCaseText LowerCase
ALANJONES alanjones =LOWER(C4)
BOBSMITH bobsmith =LOWER(C5)
CAROLWILLIAMS carolwilliams =LOWER(C6)
CARDIFF cardiff =LOWER(C7)
ABC123 abc123 =LOWER(C8)
What Does It Do ?
Thisfunctionconvertsallcharactersinapieceoftexttolowercase.
Syntax
=LOWER(TextToConvert)
Formatting
Nospecialformattingisneeded.
MATCH
Names Values
Bob 250
Alan 600
David 1000
Carol 4000
ThepositionofAlanis: 2 Valueposition: 3
=MATCH(E9,E4:E7,0) =MATCH(I9,I4:I7,1)
What Does It Do ?
Thisfunctionlooksforaniteminalistandshowsitsposition.
Itcanbeusedwithtextandnumbers.
Itcanlookforanexactmatchoranapproximatematch.
Syntax
=MATCH(WhatToLookFor,WhereToLook,TypeOfMatch)
TheTypeOfMatcheither0,1or1.
Using0willlookforanexactmatch.Ifnomatchisfoundthe#NAerrorwillbeshown.
Using1willlookforanexactmatch,orthenextlowestnumberifnoexactmatchexists.
Ifthereisnomatchornextlowestnumbertheerror#NAisshown.
Thelistofvaluesbeingexaminedmustbesortedforthistoworkcorrectly.
Using1willlookforanexactmatch,orthenexthighestnumberifnoexactmatchexists.
Ifthereisnoexactmatchornexthighestnumbertheerror#NAisshown.
Thelistmustbesortedforthistoworkproperly.
Examples 1
Usingthe0optionsuitableforanexactmatch.
TheAscendinglistgivestheexactmatch.
TheDescendinglistgivestheexactmatch.
TheWrong Valuelistcannotfindanexactmatch,sothe#NAisshown.
20 20 25
2 3 #N/A
=MATCH(G45,G40:G43,0)
MATCH
Example 2
Usingthe1optionsuitableforaascendinglisttofindanexactornextlowestmatch.
TheAscendinglistgivestheexactmatch.
TheDescendinglistgivesthe#NAerror.
TheWrong Valuelistfindsthenextlowestnumber..
20 20 25
2 #N/A 2
=MATCH(G62,G57:G60,1)
Example 3
Usingthe1optionsuitableforadescendinglisttofindanexactornexthighestmatch.
TheAscendinglistgivesthe#NAerror.
TheDescendinglistgivestheexactmatch.
TheWrong Valuelistfindsthenexthighestnumber.
20 20 25
#N/A 3 2
=MATCH(G79,G74:G77,1)
MATCH
Example 4
Thetablesbelowwereusedtobyabuscompanytakingbookingforbustours.
Theyneedtoallocateabuswithenoughseatsfortheallthepassengers.
Thelistofbussizeshasbeenenteredinalist.
Thenumberofpassengersonthetouristhenentered.
The=MATCH()functionlooksdownthelisttofindthebuswithenoughseats.
Ifthenumberofpassengersisnotanexactmatch,thenextbiggestbuswillbepicked.
Afterthe=MATCH()functionhasfoundthebus,the=INDEX()functionhasbeenused
tolookdownthelistagainandpickouttheactualbussizerequired.
BusSize Passengersonthetour: 23
Bus1 54 Bussizeneeded: 50
Bus2 50 =INDEX(D95:D99,MATCH(H94,D95:D99,1),0)
Bus3 22
Bus4 15
Bus5 6
Example 5
Thetablesbelowwereusedbyaschooltocalculatetheexamgradesforpupils.
Thelistofgradebreakpointswasenteredinalist.
Thepupilsscoreswereenteredinanotherlist.
Thepupilsscoresarecomparedagainstthebreakpoints.
Ifanexactmatchisnotfound,thenextlowestbreakpointisused.
The=INDEX()functionthenlooksdowntheGradelisttofindthegrade.
Dates Maximum
1Jan98 25Dec98 31Mar98 27Dec98 4Jul98 27Dec98 =MAX(C7:G7)
What Does It Do ?
Thisfunctionpicksthehighestvaluefromalistofdata.
Syntax
=MAX(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Inthefollowingexamplethe=MAX()functionhasbeenusedtofindthehighestvaluefor
eachregion,monthandoverall.
10 20 40 40 40 40 =MEDIAN(C8:G8)
20 20 40 20 20 =MEDIAN(C13:F13)
What Does It Do ?
Thisfunctionfindsthemedianvalueofagroupofvalues.
Themedianisnottheaverage,itisthehalfwaypointwherehalfthenumbersinthegroupare
largerthanitandhalfthenumbersarelessthanit.
Ifthereisnoexactmediannumberinthegroup,thetwonearestthehalfwaypointare
addedandtheiraverageisusedasthemedian.
Syntax
=MEDIAN(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
MID
Start HowMany
Text Position Characters MidString
ABCDEDF 1 3 ABC =MID(C4,D4,E4)
ABCDEDF 2 3 BCD =MID(C5,D5,E5)
ABCDEDF 5 2 ED =MID(C6,D6,E6)
What Does It Do ?
Thisfunctionpicksoutapieceoftextfromthemiddleofatextentry.
Thefunctionneedstoknowatwhatpointitshouldstart,andhowmanycharacterstopick.
Ifthenumberofcharacterstopickexceedswhatisavailable,onlytheavailablecharacters
willbepicked.
Syntax
=MID(OriginalText,PositionToStartPicking,NumberOfCharactersToPick)
Formatting
Nospecialformattingisneeded.
Example 1
Thefollowingtableusesthe=MID()functiontoextractapostcodefromabranchIDused
byacompany.
ItisassumedthatallbranchID'sfollowthesameformatwiththelettersidentifyingthe
postalregionbeinginthe5thand6thpositions.
BranchID PostalRegion
DRSCF476 CF =MID(C35,5,2)
DRSWA842 WA =MID(C36,5,2)
HLTNP190 NP =MID(C37,5,2)
Example 2
MID
Thisexampleshowshowtoextractanitemwhichisofvariablelength,whichisinside
apieceoftextwhichhasnostandardformat,otherthantherequiredtextisalways
betweentwoslash/symbols.
FullBranchCode PostalRegion
DRS/STC/872 STC
HDRS/FC/111 FC
S/NORTH/874 NORTH
HQ/K/875 K
SPECIAL/UK&FR/876 UK&FR
=MID(C50,FIND("/",C50)+1,FIND("/",C50,FIND("/",C50)+1)FIND("/",C50)1)
Findthefirst/,plus1fortheStartofthecode.
Findthesecond/,occurringafterthefirst/
Calculatethelengthofthetexttoextract,bysubtractingtheposition
ofthefirst/fromthepositionofthesecond/
MIN
Values Minimum
120 800 100 120 250 100 =MIN(C4:G4)
Dates Maximum
1Jan98 25Dec98 31Mar98 27Dec98 4Jul98 1Jan98 =MIN(C7:G7)
What Does It Do ?
Thisfunctionpicksthelowestvaluefromalistofdata.
Syntax
=MIN(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Inthefollowingexamplethe=MIN()functionhasbeenusedtofindthelowestvaluefor
eachregion,monthandoverall.
Syntax
=MINUTE(Number)
Formatting
Theresultwillbeshownasanormalnumberbetween0and59.
Example
The=REPT()functionhasbeenusedtomakeadigitaldisplayforthecurrenttime.
Thetimefunctionsof=HOUR(),=MINUTE()and=SECOND()havebeenusedinconjunction
withthe=NOW()asthebasisforthenumberofrepeats.
ToupdatetheclockpressthefunctionkeyF9.
Clock
Hour ||||||||||||||||||18
Minute ||||||||||||||||||||||||||||||||32
Second |||||||||||||||||||||||||||||||||||||37
=REPT("|",HOUR(NOW()))&""&TEXT(HOUR(NOW()),"00")
=REPT("|",MINUTE(NOW()))&""&TEXT(MINUTE(NOW()),"00")
=REPT("|",SECOND(NOW()))&""&TEXT(SECOND(NOW()),"00")
Related Information
Toconvertatimeinhh:mmformattodecimalformat.
Enteratimeinhh:mmformat: 2:45
Toconvertatimeindecimalformattohh:mmformat.
Enteratimeindecimalformat: 3.75
Thethreeformulaabovehavealsobeenformattedashh:mmusing
theFormat,Cells,Number,Timecommand.
MMULT
What Does It Do ?
Thisfunctionmultipliesonerangeofvalueswithanotherrangeofvalues.
Therangesdonothavetobeofequalsize.
Thedimensionsoftheresultrangeisindirectproportiontodimensionsofthetwoinputranges.
ItisanArrayfunctionandmustbeenteredusingtheCtrl+Shift+Entercombination.
Syntax
=MMULT(Range1,Range2)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableswereusedbyacompanyproducingboxesofchocolates.
ThetypesofchocolateproducedwereMilk,DarkandWhite.
ThecompanyboxedthechocolatesinthreedifferingmixturesofMilk,DarkandWhite.
IntherunuptoChristmascustomersorderedvariousquantitiesofeachbox.
Thechocolatecompanynowneededtoknowwhatquantityofeachtypeofchocolatetoproduce.
The=MMULT()functionwasusedtomultiplythecontentsofboxesbythecustomerorders.
Theresultofthe=MMULT()isthetotalnumberofeachtypeofchocolatetoproduce.
Chocolatesinthebox
Size Milk Dark White
Giant 50 50 50
Standard 30 20 10
Economy 20 5 5
CustomersOrders
Giant Standard Economy
300 400 500
QuantityToProduce
Milk Dark White
37,000 25,500 21,500
{=MMULT(C32:E32,C26:E28)}
In all three cells
Example 2
Thefollowingtableswereusedbythechocolatecompanytocalculatetheamountof
ingredientsneededtoproducebatchesofchocolate.
Thecompanyhasfourfactories,eachofwhichhastoorderenoughButter,EggsandSugar
toensuretheycanmeetproductiontargets.
Range1containstheplannedproductionofMilkandDarkchocolateforeachfactory.
Range2containstheamountButter,EggsandSugarneededtomake1unitofMilkorPlain.
TheResultrangeshowsthequantitiesofeachingredientthatwillhavetobeorderedto
meettheproductiontarget.
NotethedepthoftheResultisthesameasthedepthofRange1,andthewidthof
theResultisthesameasthewidthofRange2.
Range1 Range2
Production Milk Dark Ingredients Butter Eggs Sugar
Factory1 20 0 Milk 1 3 10
Factory2 20 1 Dark 2 2 5
Factory3 10 5
Factory4 20 10
Result
IngredientsToOrder Butter Eggs Sugar
Factory1 20 60 200
Factory2 22 62 205
Factory3 20 40 125
Factory4 40 80 250
{=MMULT(C69:D72,G69:I70)}
MMULT
In all cells
Hint
Togetafeelforhowthe=MMULT()functionoperates,setallvaluesinRange1andRange2
tozero0,thenchangeasinglevalueineach.
MOD
Number Divisor Remainder
12 5 2 =MOD(C4,D4)
20 7 6 =MOD(C5,D5)
18 3 0 =MOD(C6,D6)
9 2 1 =MOD(C7,D7)
24 7 3 =MOD(C8,D8)
What Does It Do ?
Thisfunctioncalculatestheremainderafteranumberhasbeendividedbyanothernumber.
Syntax
=MOD(Number,Divisor)
Formatting
Nospecialformattingisneeded.
MODE
Value1 Value2 Value3 Value4 Value5 Mode
20 50 10 10 40 10 =MODE(C4:G4)
40 20 40 10 40 40 =MODE(C6:G6)
10 10 99 20 20 10 =MODE(C8:G8)
20 20 99 10 10 20 =MODE(C9:G9)
10 20 20 99 10 10 =MODE(C10:G10)
10 20 30 40 50 #N/A =MODE(C12:G12)
What Does It Do ?
Thisfunctiondisplaysthemostfrequentlyoccurringnumberinagroupofnumbers.
Forittoworkcorrectlytheremustbeatleasttwonumberswhicharethesame.
Ifallthevaluesinthegroupareuniquethefunctionshowstheerror#N/A.
Whenthereismorethanonesetofduplicates,thenumberclosesttothebeginning
ofthegroupwillbeused.(Whichisnotreallyanaccurateanswer!)
Syntax
=MODE(Range1,Range2,Range3...throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableshowsgarmentssoldinaclothesshop.
Theshopkeeperwantstokeeptrackofthemostcommonlysoldsize.
The=MODE()functionhasbeenusedtocalulatethis.
Note
Ifthe=AVERAGE()functionhadbeenusedtheanswerwouldhavebeen: 9.7
Thisfigureisofnobenefittotheshopkeeperastherearenogarmetsofthissize!
MONTH
OriginalDate Month
1Jan98 1 =MONTH(C4)
1Jan98 January =MONTH(C5)
Syntax
=MONTH(Date)
Formatting
Normallytheresultwillbeanumber,butthiscanbeformattedtoshowtheactual
monthbyusingFormat,Cells,Number,Customandusingthecodemmmormmmm.
Example
The=MONTHfunctionhasbeenusedtocalculatethenameofthemonthforyourbirthday.
Pleaseenteryourdateofbirthintheformatdd/mm/yy 3/25/1962
Youwerebornin January =MONTH(F20)
MROUND
Rounded
Number Multiple Value
110 50 100 =MROUND(C4,D4)
120 50 100 =MROUND(C5,D5)
150 50 150 =MROUND(C6,D6)
160 50 150 =MROUND(C7,D7)
170 50 150 =MROUND(C8,D8)
What Does It Do ?
Thisfunctionroundsanumberupordowntothenearestmultiplespecifiedbytheuser.
Syntax
=MROUND(NumberToRound,MultipleToUse)
Formatting
Nospecialformattingisneeded.
N
Original Converted
1 1 =N(C4)
31/2 3.5 =N(C5)
3.5 3.5 =N(C6)
3.50% 0.035 =N(C7)
25Dec98 36154 =N(C8)
TRUE 1 =N(C9)
FALSE 0 =N(C10)
Hello 0 =N(C11)
0 =N(C12)
What Does It Do ?
Thisfunctionconvertsanumericentrytoitsmathematicalvalue.
Anythingwhichwillnotconvertisshownas0zero.
Exceldoesnotreallyneedthisfunction,duetothefactthatExcelcalculatesinthisway
naturally.Thefunctionisincludedforcompatibilitywithotherspreadsheetprograms.
Syntax
=N(NumericEntry)
Formatting
Nospecialformattingisneeded.
NA
#N/A =NA()
Value Test
10 11 =IF(ISBLANK(C6),NA(),C6+1)
#N/A =IF(ISBLANK(C7),NA(),C7+1)
30 31 =IF(ISBLANK(C8),NA(),C8+1)
Sales
North 100
South #N/A =NA()
East #N/A =NA()
West 200
Total #N/A =SUM(D11:D14)
What Does It Do ?
ThisfunctionisaplacemarkerusedtoindicatethatrequiredinformationisNotAvailable.
Itcanbetypedirectlyintoacellas=NA()oritcanbeusedaspartofacalculation.
Whenthe=NA()isused,anycalculationswhichdependuponthecellwillalsoshow#NA.
Itisusedtoindicatethatallthedatahasnotyetbeenenteredintothespreadsheet.
Syntax
=NA()
Formatting
Nospecialformattingisrequired.
Example
ThefollowingtablewasusedbyacompanytocalculatethemonthlyWageofanemployee.
TheSalaryandTaxpercentageareentered.
TheTaxisthendeductedfromtheSalarytocalculatetheWage.
Table1showsthatwhentheTaxisnotentered,theWageisstillcalculated.
OnalargespreadsheetthismaygounnoticedandthewrongWagepaid.
Table1
Salary Tax% Pay
Alan 1000 25% 750 =C39C39*D39
Bob 1000 1000 =C40C40*D40
Carol 1000 20% 800 =C41C41*D41
NA
Table2showshowthe=NA()hasbeeninsertedintheunknownTaxtoactasa
reminderthattheTaxstillneedstobeentered.
Table2
Salary Tax% Pay
Alan 1000 25% 750 =C49C49*D49
Bob 1000 #N/A #N/A =C50C50*D50
Carol 1000 20% 800 =C51C51*D51
NETWORKDAYS
StartDate EndDate WorkDays
1Mar98 7Mar98 5 =NETWORKDAYS(C4,D4)
25Apr98 30Jul98 69 =NETWORKDAYS(C5,D5)
24Dec98 5Jan99 9 =NETWORKDAYS(C6,D6)
Syntax
=NETWORKDAYS(StartDate,EndDate,Holidays)
Holidays:Thisisalistofdateswhichwillbeexcludedfromthecalculation,suchasXmas
andBankholidays.
Formatting
Theresultwillbeshownasanumber.
Note
Thecalculationdoesnotincludethelastday.Theresultofusing1Jan98and5Jan98will
givearesultof4.Tocorrectthisadd1totheresult.=NETWORKDAYS(Start,End,Holidays)+1
Example
ThefollowingexampleshowshowalistofHolidayscanbecreated.
Holidays
BankHoliday 1May98
Xmas 25Dec98
NewYear 1Jan97
NewYear 1Jan98
NewYear 1Jan99
Northerndata.
Usedbytheexampleforthe=INDIRECT()function.
Alan
Jan Feb Mar Total
Alan 10 20 30 60
Bob 40 50 60 150
Carol 70 80 90 240
Total 120 150 180 450
NOT
CellsToTest Result
10 20 TRUE =NOT(C4>D4)
10 20 TRUE =NOT(C5=D5)
10 20 FALSE =NOT(C6<D6)
1Jan98 1Feb98 TRUE =NOT(C7>D7)
Hello Goodbye TRUE =NOT(C8=D8)
Hello Hello FALSE =NOT(C9=D9)
What Does It Do ?
Thisfunctionperformsatesttoseeifthetestfails.(Atypeofreverselogic).
Ifthetestfails,theresultisTRUE.
Ifthetestismet,thentheresultisFALSE.
Syntax
=NOT(TestToPerform)
TheTestToPerformcanbereferencetocellsoranothercalculation.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyalibrarytotrackbooksborrowed.
ThedatethebookwasTakenoutisentered.
TheperiodoftheLoanisentered.
Thedatethebookwasreturnedisentered.
The=NOT()functionhasbeenusedtocalculatewhetherthebookwasreturnedwithin
thecorrecttime,byaddingtheLoanvaluetotheTakendate.
IfthebookwasnotreturnedontimetheresultOverdueisshown,otherwiseOKisshown.
Syntax
=NOW()
Formatting
Theresultwillbeshownasadateandtime.Ifitisformattedtoshowasanumber
theintegerpartisusedforthedateandthedecimalportionrepresentthetime.
ODD
RoundedTo
Number NextOdd
2 3 =ODD(C4)
2.4 3 =ODD(C5)
2.9 3 =ODD(C6)
3 3 =ODD(C7)
3.4 5 =ODD(C8)
3.9 5 =ODD(C9)
What Does It Do ?
Thisfunctionroundsanumberuptothenexthighestwholeoddnumber.
Syntax
=ODD(NumberToBeRounded)
Formatting
Nospecialformattingisneeded.
OR
Payment Handling
OrderNo. Cost Type Charge
AB001 1000 Cash =IF(OR(E4="Visa",E4="Delta"),5,0)
AB002 1000 Visa 5 =IF(OR(E5="Visa",E5="Delta"),5,0)
AB003 2000 Cheque =IF(OR(E6="Visa",E6="Delta"),5,0)
AB004 5000 Delta 5 =IF(OR(E7="Visa",E7="Delta"),5,0)
Syntax
=OR(Test1,Test2)
Notethattherecanbeupto30possibletests.
Formatting
WhenusedbyitselfitwillshowTRUEorFALSE.
Example
Thefollowingtableshowsalistoforderstakenbyacompany.
Ahandlingchargeof5ismadeonallorderspaidbyVisaorDeltacards.
The=OR()functionhasbeenusedtodeterminewhetherthechargeneedstobeapplied.
Payment Handling
OrderNo. Cost Type Charge
AB001 1000 Cash =IF(OR(E27="Visa",E27="Delta"),5,0)
AB002 1000 Visa 5
AB003 2000 Cheque
AB004 5000 Delta 5
Ordering Stock
Thisisanexampleofaspreadsheettocalculatethebesttimeintervaltoorderstock.
Scenario
Agaragefitsexhaustsystems.
Themanagerorderstheexhaustsonaregularbasis.
Eachtimeanorderismadefornewstock,thereisafixedadministrativecost.
Theexhaustsarekeptinstockuntilneeded.
Keepingtheexhaustsinstockincursacostduetocapitaltiedupandwarehousecosts.
ThesupplieroftheExhaustsgivesadiscountonlargeorders.
Objective
FindthetimeintervaltoorderstockwhichwillresultinthelowestAdminandWarehousecosts.
Input Data
CostofasingleExhaustsystem : 75
CostofkeepingExhaustinstock. (Asa%ofthestock value): 12%
QuantityofExhaustsusedperday: 10
Admincost eachtimenewExhaustsareordered: 25
AveragequantityofExhaustsinstock (As%oforderedquantity): 0.5
OrderingIntervalstoevaluate.(ExpressedinDays): 2
SuppliersfirstPriceBreakandDiscount%offered: 200 1%
SupplierssecondPriceBreakandDiscount%offered: 750 5%
Output
Annual
Ordering Annual Ware TheBest
Interval Quantity Order Order Orders Admin house Annual Ordering
InDays PerOrder Value Discount PerYear Cost Costs Total Interval
1 10 750 365 9,125 45 9,170
2 20 1,500 183 4,575 90 4,665
4 40 3,000 92 2,300 180 2,480
6 60 4,500 61 1,525 270 1,795
8 80 6,000 46 1,150 360 1,510
10 100 7,500 37 925 450 1,375
12 120 9,000 31 775 540 1,315
14 140 10,500 27 675 630 1,305
16 160 12,000 23 575 720 1,295
18 180 13,500 21 525 810 1,335
20 200 15,000 150 19 475 900 1,225 Best
22 220 16,500 165 17 425 990 1,250
24 240 18,000 180 16 400 1,080 1,300
26 260 19,500 195 15 375 1,170 1,350
28 280 21,000 210 14 350 1,260 1,400
30 300 22,500 225 13 325 1,350 1,450
32 320 24,000 240 12 300 1,440 1,500
34 340 25,500 255 11 275 1,530 1,550
36 360 27,000 270 11 275 1,620 1,625
38 380 28,500 285 10 250 1,710 1,675
40 400 30,000 300 10 250 1,800 1,750
42 420 31,500 315 9 225 1,890 1,800
44 440 33,000 330 9 225 1,980 1,875
46 460 34,500 345 8 200 2,070 1,925
48 480 36,000 360 8 200 2,160 2,000
50 500 37,500 375 8 200 2,250 2,075
52 520 39,000 390 8 200 2,340 2,150
54 540 40,500 405 7 175 2,430 2,200
56 560 42,000 420 7 175 2,520 2,275
58 580 43,500 435 7 175 2,610 2,350
60 600 45,000 450 7 175 2,700 2,425
Things To Try
ChangetheDiscount%to0%and0%.
ChangetheOrderingIntervalto1or30.
ChangetheCostoftheExhaustmakingitcheaperormoreexpensive.
ChangetheQuantityusedperdaytoalargerorsmallernumber.
Explanation
ColumnA Ordering Interval In Days
Thefirstofthesecellshasthevalue1enteredinit.
Thisisthesmallestorderingperiod,whichwouldrequirestocktobeorderedeveryday.
ThesecondcellpickstheorderingintervalfromtheInputDatatable.
Thethirdandsubsequentcellsaddtheorderingintervaltothepreviouscelltocreate
alistofvaluesofthesameinterval.
Calculation: OrderingInterval*QuantityUsedPerDay
Calculation: QuantityOrdered*CostOfExhaust
Calculation: OrderValue*SupplierDiscount
Thesupplierdiscountiscalculatedusingthe=IF()andthe=AND()functions.
IftheOrderQuantityisequaltoorabovethefirstPriceBreak,butbelow
thesecondPriceBreak,thenthefirstPriceBreakdiscountisused.
=C29*IF(AND(B29>=$G$24,B29<$G$25),$H$24,IF(B29>=$G$25,$H$25,0))
IftheOrderQuantityisequaltoorabovethesecondPriceBreak,
thesecondPriceBreakdiscountisused.
=C29*IF(AND(B29>=$G$24,B29<$G$25),$H$24,IF(B29>=$G$25,$H$25,0))
IftheOrderQuantitydoesnotqualifyforadiscount,zerodiscountisused.
=C29*IF(AND(B29>=$G$24,B29<$G$25),$H$24,IF(B29>=$G$25,$H$25,0))
Calculation: 365/OrderingInterval
Thiscalculationmaygiveresultswhicharedecimal,suchas2.3
Thisdecimalwillcauseproblems,duetothefactthatthenumberof
ordersmustalwaysbeawholenumber.
The=CEILING()functionhasbeenusedto'roundup'anydecimalsto
thenexthighestwholenumber.
=CEILING(365/A29,1)
ColumnF Annual Admin Costs
Thisistheadministrationcostsinvolvedinmakingtheorders.
Calculation: OrdersPerYear*AdminCost
=E29*$G$20
Calculation: QuantityOrdered*AverageStockLevel)*ExhaustCost*WarehousingCost
=(B29*$G$21)*$G$17*$G$18
Calculation: AnnualAdminCosts+AnnualWarehouseCostsOrderDiscount
=F29+G29D29
What Does It Do ?
Thisfunctioncalculatesthemaximumnumberofpermutationsgivenafixednumberofitems.
Theinternalorderissignificant,soABandBAwillbeconsideredastwopossiblepermutations.
Itcouldbeusedtocalculatethepossiblenumberof4digitpasswordsfromthedigits0to9.
Syntax
=PERMUT(PoolToPickFrom,ItemsInAGroup)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtocalculatethetotalnumberof8letterpasswordswhichcan
becreatedbyusingall26lettersofthealphabet.
LetterInAlphabet 26
PasswordSize 8
Permutations 62,990,928,000
InthecaseofatwoletterpasswordmadefromtheletterA,B,CandD,thefollowing
twelvepermutationswouldbepossible.
ABCD
Password1 AB Password7 BA
Password2 AC Password8 CA
Password3 AD Password9 DA
Password4 BC Password10 CB
Password5 BD Password11 DB
Password6 CD Password12 DC
PI
p
3.14159265358979 =PI()
What Does It Do ?
ThisfunctionisequaltothevalueofPi.
Itiscorrectto15decimalplaces.
Itdoesnotneedanyinput,itisaselfcontainedfunction.
Syntax
=PI()
Formatting
Nospecialformattingisneeded.
Example
Tocalculatetheareaofacircle.
Radius Area
5 78.54 =PI()*(C21^2)
25 1963.50
POWER
Number Power Result
3 2 9 =POWER(C4,D4)
3 4 81 =POWER(C5,D5)
5 2 25 =POWER(C6,D6)
5 4 625 =POWER(C7,D7)
What Does It Do ?
Thisfunctionraisesanumbertoauserspecifiedpower.
Itisthesameasusingthe^operator,suchas3^4,whichresultis81.
BoththePOWER()functionandthe^operatorarethesameasusing3*3*3*3.
Syntax
=POWER(NumberToBeRaised,Power)
Formatting
Nospecialformattingisneeded.
Example
Tocalculatetheareaofacircle.
Radius Area
5 78.54 =PI()*POWER(C22,2)
25 1963.50
PRODUCT
Numbers Product
2 3 6 =PRODUCT(C4,D4)
5 10 50 =PRODUCT(C5:D5)
3 7 210 =PRODUCT(C6:D6,10)
6300 =PRODUCT(C4:D6)
What Does It Do ?
Thisfunctionmultiplesagroupofnumberstogether.
Itisthesameasusing2*3*5*10*3*7,whichresultsin6300.
Syntax
=PRODUCT(Number1,Number2,Number3...throughtoNumber30)
or
=PRODUCT(RangeOfNumbers)
or
=PRODUCT(Number1,Range,Number2...)
Formatting
Nospecialformattingisneeded.
PROPER
OriginalText Proper
alanjones AlanJones =PROPER(C4)
bobsmith BobSmith =PROPER(C5)
caRolwILLIAMS CarolWilliams =PROPER(C6)
cardiff Cardiff =PROPER(C7)
ABC123 Abc123 =PROPER(C8)
What Does It Do ?
Thisfunctionconvertsthefirstletterofeachwordtouppercase,andallsubsequentletters
areconvertedtolowercase.
Syntax
=PROPER(TextToConvert)
Formatting
Nospecialformattingisneeded.
QUARTILE
Values QuarterNo. Quartile
1 0 1 =QUARTILE(C4:C8,E4)
25 1 25 =QUARTILE(C4:C8,E5)
50 2 50 =QUARTILE(C4:C8,E6)
75 3 75 =QUARTILE(C4:C8,E7)
100 4 100 =QUARTILE(C4:C8,E8)
What Does It Do ?
Thisfunctionexaminesagroupofvaluesandthenshowsthevalueswhichareofthe
upperlimitsofthe1st,2nd,3rdand4thquartersofthedata.
TheQuartileof0(zero)isactuallylowestvalue,whichcanbeobtainedusingthe=MIN()function.
TheQuartileof4isactuallyhighestvalue,whichcanbeobtainedusingthe=MAX()function.
Syntax
=QUARTILE(RangeToBeExamined,QuartileValue)
TheQuartileValuecanonlybe0,1,2,3or4.
Formatting
Nospecialformattingisneeded.
QUOTIENT
Number Divisor Result
12 5 2 =QUOTIENT(C4,D4)
20 3 6 =QUOTIENT(C5,D5)
46 15 3 =QUOTIENT(C6,D6)
What Does It Do ?
Thisfunctioncalculatesthenumberoftimesanumbercanbedividedbyanothernumber.
Itignoresanyremainder,onlyshowingthewholenumber.
Syntax
=QUOTIENT(NumberToBeDivided,Divisor)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingexamplewasusedbyadrinksmerchanttocalculatethenumberof
crateswhichcouldbepackedusingbottlesinstock.
Themerchantcanonlysellfullcrates.
Table1calculatesthecratesbysimpledivision.Thishowevershows
decimalfractionswhicharenotneeded.
Table1
Bottles Bottles
Item ToPack PerCrate CratesNeeded
Wine 126 12 10.5 =D28/E28
Champagne 200 8 25
Rum 15 4 3.75
Beer 250 20 12.5
Table2usesthe=QUOTIENT()functiontoremovethedecimalfractionto
givethecorrectresult.
Table2
Bottles Bottles
Item ToPack PerCrate CratesNeeded
Wine 126 12 10 =QUOTIENT(D39,E39)
QUOTIENT
Champagne 200 8 25
Rum 15 6 2
Beer 250 20 12
RAND
Randomgreaterthanorequalto0butlessthan1.
0.294867244 =RAND()
Randomgreaterthanorequalto0butlessthan10
1.350840602 =RAND()*10
Randombetween5and10.
9.099109763 =RAND()*(105)+5
What Does It Do ?
Thisfunctioncreatesarandomnumber>=0but<1.
Thenumberwillchangeeachtimetheworksheetrecalculates,orwhenF9ispressed.
Syntax
=RAND()
Formatting
Nospecialformattingisneeded.
Examples
Thefollowingexamplesshowhowthe=RAND()functionhasbeenusedtorandomly
sortlistofinformation.
AlistofcardshasbeenenteredincolumnC,and=RAND()incolumnD.
ByclickinginsidetherandomnumbersandthenusingData,SortortheSortbutton
thecardswillbeshuffled.
Thesametechniquehasbeenusedtogeneratealistofsixwinninglotterynumbers.
What Does It Do ?
Thisfunctionproducesarandomwholenumberbetweentwospecifiednumbers.
TherandomnumberwillchangeeachtimethespreadsheetisrecalculatedorF9ispressed.
Syntax
=RANDOMBETWEEN(LowLimit,HighLimit)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableshowshowthe=RANDBETWEEN()hasbeenusedtogeneratesix
numberstousefortheNationalLottery.
Notethatthefunctiondoesnotchecktoensureallnumbersareunique,thesamenumber
couldbegeneratedtwiceormore.
TheWinning
LotteryNumbers Ticket!
1 49 #NAME? =RANDBETWEEN($C$24,$D$24) Number1
#NAME? =RANDBETWEEN($C$24,$D$24) Number2
PressfunctionKey #NAME? =RANDBETWEEN($C$24,$D$24) Number3
F9torecalculate. #NAME? =RANDBETWEEN($C$24,$D$24) Number4
#NAME? =RANDBETWEEN($C$24,$D$24) Number5
#NAME? =RANDBETWEEN($C$24,$D$24) Number6
#NAME? =RANDBETWEEN($C$24,$D$24) Bonusball
Duplicates!Spinagain
{=IF(SUM(1/COUNTIF(E24:E30,E24:E30))<>7,"Duplicates!Spinagain","AllOK")}
Thisformulaisusedtodeterminewhetherallthenumbersaredifferent.
ItisenteredasanarrayusingCtrl+Shift+Enter.
RANK
RankingPosition
Values HightoLow
7 4 =RANK(C4,C4:C8)
4 5 =RANK(C5,C4:C8)
25 1 =RANK(C6,C4:C8)
8 3 =RANK(C7,C4:C8)
16 2 =RANK(C8,C4:C8)
RankingPosition
Values LowtoHigh
7 2 =RANK(C11,C11:C15,1)
4 1 =RANK(C12,C11:C15,1)
25 5 =RANK(C13,C11:C15,1)
8 3 =RANK(C14,C11:C15,1)
16 4 =RANK(C15,C11:C15,1)
RankingPosition
Values HightoLow
10 5 =RANK(C18,C18:C22)
30 2 =RANK(C19,C18:C22)
20 4 =RANK(C20,C18:C22)
30 2 =RANK(C21,C18:C22)
40 1 =RANK(C22,C18:C22)
What Does It Do ?
Thisfunctioncalculatesthepositionofavalueinalistrelativetotheothervaluesinthelist.
Atypicalusagewouldbetorankthetimesofathletesinaracetofindthewinner.
Therankingcanbedoneonanascending(lowtohigh)ordescending(hightolow)basis.
Ifthereareduplicatevaluesinthelist,theywillbeassignedthesamerank.Subsequentranks
wouldnotfollowonsequentially,butwouldtakeintoaccountthefactthattherewereduplicates.
Ifthenumbers30,20,20and10wereranked,30isrankedas1,both20'sarerankedas2,and
the10wouldberankedas4.
Value Rank
30 1 =RANK(B34,B34:B37)
20 2 =RANK(B35,B34:B37)
RANK
20 2 =RANK(B36,B34:B37)
10 4 =RANK(B37,B34:B37)
Syntax
=RANK(NumberToRank,ListOfNumbers,RankOrder)
TheRankOrdercanbe0zeroor1.
Using0willranklargernumbersatthetop.(Thisisoptional,leavingitouthasthesameeffect).
Using1willranksmallnumbersatthetop.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtorecordthetimesforathletescompetinginarace.
The=RANK()functionwasthenusedtofindtheirracepositionsbaseduponthefinishingtimes.
What Does It Do ?
Thisfunctionreplacesaportionoftextwithanewpieceoftext.
Youneedtospecifywherethereplacementshouldstart,howmanycharactersto
removeandwhatthenewreplacementtextshouldbe.
Syntax
=REPLACE(OriginalText,StartPosition,NumberOfCharactersToReplace,NewText)
Formatting
Nospecialformattingisneeded.
REPT
TextTo NumberOf Repeated
Repeat Repeats Text
A 3 AAA =REPT(C4,D4)
AB 3 ABABAB =REPT(C5,D5)
10 =REPT(C6,D6)
| 10 |||||||||| =REPT(C7,D7)
What Does It Do ?
Thisfunctionrepeatsapieceoftextaspecifiednumberoftimes.
Youneedtospecifythetexttoberepeatedandhowmanytimestorepeatit.
Syntax
=REPT(TextToRepeat,Repetitions)
Themaximumnumberofrepetitionsis200.
Formatting
Nospecialformattingisneeded.
Example 1
Thefollowingtablewasusedtodisplayasimplehistogramofsalesfigures.
The=REPT()functionusesthevalueofSales,butthisisdividedby100toscaledownthe
numberofrepetitionstobelowthemaximumof200.
Month Sales
Jan 1,000 ||||||||||||||||||||
Feb 5,000 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Mar 3,000 ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Apr 2,000 ||||||||||||||||||||||||||||||||||||||||
=REPT("||",D29/100)
Example 2
The=REPT()functionhasbeenusedtomakeadigitaldisplayforthecurrenttime.
Thetimefunctionsof=HOUR(),=MINUTE()and=SECOND()havebeenusedinconjunction
withthe=NOW()asthebasisforthenumberofrepeats.
ToupdatetheclockpressthefunctionkeyF9.
Clock
Hour ||||||||||||||||||18
Minute ||||||||||||||||||||||||||||||||32
REPT
Second |||||||||||||||||||||||||||||||||||||37
=REPT("|",HOUR(NOW()))&""&TEXT(HOUR(NOW()),"00")
=REPT("|",MINUTE(NOW()))&""&TEXT(MINUTE(NOW()),"00")
=REPT("|",SECOND(NOW()))&""&TEXT(SECOND(NOW()),"00")
RIGHT
NumberOf
Original Characters Right
Text Required String
AlanJones 1 s =RIGHT(C4,D4)
AlanJones 2 es =RIGHT(C5,D5)
AlanJones 3 nes =RIGHT(C6,D6)
Cardiff 6 ardiff =RIGHT(C7,D7)
ABC123 4 C123 =RIGHT(C8,D8)
What Does It Do ?
Thisfunctiondisplaysaspecifiednumberofcharactersfromtherighthandsideofa
pieceoftext.
Syntax
=RIGHT(OriginalText,NumberOfCharactersRequired)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtoextractthesecondnameofapersonfromtheirfullname.
The=FIND()functionlocatesthepositionofthespacebetweenthefirstandsecondname.
Thelengthofthesecondnameiscalculatedbysubtractingthepositionofthespacefrom
theoveralllengthofthefullname.
The=RIGHT()functioncanthenextractthesecondname.
FullName SecondName
AlanJones Jones =RIGHT(C28,LEN(C28)FIND("",C28))
BobSmith Smith =RIGHT(C29,LEN(C29)FIND("",C29))
CarolWilliams Williams =RIGHT(C30,LEN(C30)FIND("",C30))
ROMAN
Number Roman
1 I =ROMAN(C4)
2 II =ROMAN(C5)
3 III =ROMAN(C6)
5 V =ROMAN(C7)
10 X =ROMAN(C8)
1998 MCMXCVIII =ROMAN(C9)
1998 MCMXCVIII =ROMAN(C10,0)
1998 MLMVLIII =ROMAN(C11,1)
1998 MXMVIII =ROMAN(C12,2)
1998 MVMIII =ROMAN(C13,3)
1998 MVMIII =ROMAN(C14,4)
1998 MCMXCVIII =ROMAN(C15,TRUE)
1998 MVMIII =ROMAN(C16,FALSE)
What Does It Do ?
ThisfunctionproducesanumbershownasRomannumeralsinvariousformats.
Syntax
=ROMAN(NormalNumber,RomanNumberFormat)
TheRomanNumberFormatcanbeanyofthefollowing.
0isClassic.Thisisusedifnoformatisspecified.
1ismoreConcise.
2isevenmoreConcise.
3isevenmoreConcisestill.
4isSimplified.
TRUEisClassic
FALSEisSimplified
Formatting
Nospecialformattingisneeded.
Note
ThereisnofunctiontodotheoppositecalculationofRomantonormal.
ROUND
PlacesTo Rounded
Number Round Number
1.47589 0 1 =ROUND(C4,D4)
1.47589 1 1.5 =ROUND(C5,D5)
1.47589 2 1.48 =ROUND(C6,D6)
13643.47589 1 13640 =ROUND(C7,D7)
13643.47589 2 13600 =ROUND(C8,D8)
13643.47589 3 14000 =ROUND(C9,D9)
What Does It Do ?
Thisfunctionroundsanumbertoaspecifiedamountoddecimalplaces.
If0isusedthenumberisroundedtothenearestwholenumber.
Ifanegativeamountofroundingisusedthefigurestotheleftofthedecimalpointarerounded.
Syntax
=ROUND(NumberToRound,DecimalPlacesToUse)
Formatting
Nospecialformattingisneeded.
ROUNDDOWN
PlacesTo Rounded
Number Round Down
1.47589 0 1 =ROUNDDOWN(C4,D4)
1.47589 1 1.4 =ROUNDDOWN(C5,D5)
1.47589 2 1.47 =ROUNDDOWN(C6,D6)
13643.48 1 13640 =ROUNDDOWN(C7,D7)
13643.48 2 13600 =ROUNDDOWN(C8,D8)
13643.48 3 13000 =ROUNDDOWN(C9,D9)
What Does It Do ?
Thisfunctionroundsanumberdowntoaspecifiedamountofdecimalplaces.
If0isusedthenumberisroundeddowntothenearestwholenumber.
Ifanegativeamountofroundingisusedthefigurestotheleftofthedecimalpointarerounded.
Syntax
=ROUNDDOWN(NumberToRound,DecimalPlacesToUse)
Formatting
Nospecialformattingisneeded.
ROUNDUP
PlacesTo Rounded
Number Round Up
1.47589 0 2 =ROUNDUP(C4,D4)
1.47589 1 1.5 =ROUNDUP(C5,D5)
1.47589 2 1.48 =ROUNDUP(C6,D6)
13643.48 1 13650 =ROUNDUP(C7,D7)
13643.48 2 13700 =ROUNDUP(C8,D8)
13643.48 3 14000 =ROUNDUP(C9,D9)
What Does It Do ?
Thisfunctionroundsanumberuptoaspecifiedamountofdecimalplaces.
If0isusedthenumberisroundeduptothenearestwholenumber.
Ifanegativeamountofroundingisusedthefigurestotheleftofthedecimalpointarerounded.
Syntax
=ROUNDUPNumberToRound,DecimalPlacesToUse)
Formatting
Nospecialformattingisneeded.
SECOND
Number Second
06/May/0918:32:37 37 =SECOND(C4)
12:00:00PM 0 =SECOND(C5)
0.50 0 =SECOND(C6)
0.51 24 =SECOND(C7)
1.51 24 =SECOND(C8)
Syntax
=SECOND(Number)
Formatting
Theresultwillbeshownasanormalnumberbetween0and59.
Example
Thefollowingtablewasusedbyatelephonecompnaytocalculatethecostofacall.
Thetelephonecompanyonlydealsinsecondswhichareamultipleof5.
Thesecondsinacallareroundeduptothenearestmultipleof5beforethebilliscalculated.
TheDurationofthecallisentered.
The=MINUTES()functioncalculatesthetotalnumberofminutes.
The=SECOND()functioncalculatesthetotalnumberofseconds.
The=CEILING()functionroundsthesecondsuptothenearestmulipleof5.
TheCostofthecallisthencalculated.
CostPerSecond: 0.01
BilledDuration
Duration Minutes Seconds Cost
0:01:08 1 10 0.70
0:02:03 2 5 1.25
0:01:47 1 50 1.10
=CEILING(SECOND(C36),5)
SIGN
Positiveor
Value Negative
10 1 =SIGN(C4)
20 1 =SIGN(C5)
0 0 =SIGN(C6)
10 1 =SIGN(C7)
20 1 =SIGN(C8)
What Does It Do ?
Thisfunctiontestsavaluetodeterminewhetheritispositiveornegative.
Ifthevalueispositivetheresultis1.
Ifthevalueisnegativetheresultis1.
Ifthevalueiszero0theresultis0.
Syntax
=SIGN(CellToTest)
TheCellToTestcanbeacelloracalculation.
Formatting
Nospecialformattingisneeded.
SLN
Cost 12,000
Salvage 2,000
Life 4
StraightLineDepreciation 2,500 =SLN(F3,F4,F5)
PurchaseValueOfANewCar 20,000
SecondHandValue 8,000
NumberOfYearsOwnership 6
AnnualStraightLineDepreciation 2,000 =SLN(F9,F10,F11)
What Does It Do ?
ThisfunctioncalculatestheStraightLineDepreciationofanitem.
(AlsoknownasFixedInstalmentmethod).
TheStraightLineDepreciationishowmuchthevalueofanitemreducedduringaspecific
periodoftime.Theresultisauniformdepreciationvalue.
Anexamplewouldbeifyouboughtanewcarfor20,000,thenkeptitfor6years.
Attheendofyourownershipyousellthecarfor8,000.
Thedifferencebetweentheoriginalandthetradeinpriceis20,0008,000whichis12,000.
Becauseyouownedthecarfor6years,theSLNiscalculatedas12,000/6whichis2,000.
Syntax
=SLN(OriginalCost,SellingPrice,LengthOfOwnership)
TheLengthOfOwnershipcanbeanytimeperiod,days,monthsoryears.
However,theSLNwhichiscalculatedwill,beforthattime,specifying2yearsownership
as24monthswillgiveanSLNpermonth.
Formatting
Nospecialformattingisneeded.
SMALL
Values LowestValue 100 =SMALL(C4:C8,1)
120 2ndLowestValue 120 =SMALL(C4:C8,2)
800 3rdLowestValue 120 =SMALL(C4:C8,3)
100 4thLowestValue 250 =SMALL(C4:C8,4)
120 5thLowestValue 800 =SMALL(C4:C8,5)
250
What Does It Do ?
Thisfunctionexaminesalistofvaluesandpicksthevalueatauserspecifiedposition
inthelist.
Syntax
=SMALL(ListOfNumbersToExamine,PositionToPickFrom)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedtocalculatethebottom3salesfiguresbetweenJan,FebandMar.
Note
AnotherwaytofindtheHighestandLowestvalueswouldhavebeentouse
the=MAX()and=MIN()functions.
What Does It Do ?
Thisfunctioncalculatesthesamplepopulationstandarddeviationofalistofvalues.
Asamplepopulationisusedwhenthelistofvaluesrepresentsasampleofapopulation.
Syntax
=STDEV(Range1,Range2,Range3throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thetablebelowwasusedbyacompanyinterestedinbuyinganewmachine
topackwashingpowder.
Threemachineswereshortlistedandallowtorunforaday.
Attheendofthedayfourboxesofsoappowderwerepickedatrandomfromtheproduction
ofeachmachine.
Theboxeswereweighedandthe=STDEV()functionusedastheseboxesonlyrepresented
asampleofthecompletedaysproduction.
Themachinewiththesmallestdeviationwasthemostconsistent.
SoapPowderBoxFillingMachineTestResults
Test1 Test2 Test3 Test4 Variance
Machine1 1.4 1.5 1.6 1.5 0.0816 =STDEV(D34:G34)
Machine2 1.5 1.5 1.4 1.5 0.0500 =STDEV(D35:G35)
Machine3 1.5 1.6 1.7 1.8 0.1291 =STDEV(D36:G36)
Themachinewiththesmallestdeviationis: Machine2
=INDEX(C34:C36,MATCH(MIN(H34:H36),H34:H36,0))
STDEV
Explanation of formula:
Thisfindsthelowestvalue. =MIN(H34:H36)
Thisfindsthepositionofthelowestvalue. =MATCH(MIN(H34:H36),H34:H36,0)
ThislooksdowntheMachinecolumnto =INDEX(C34:C36,MATCH(MIN(H34:H36),H34:H36,0))
findthemachinename.
STDEVP
Values Values Values
10 10 10
10 10 11
9 11 9
10 10 12
What Does It Do ?
Thisfunctioncalculatesthestandarddeviationofalistofvalues.
Theresultiscalculatedonthebasisthatthevaluesrepresenttheentirepopulation.
Syntax
=STDEVP(Range1,Range2,Range3throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thetablebelowwasusedbyacompanyinterestedinbuyinganewmachine
topackwashingpowder.
Atrialrunofjustfourboxespermachinewereproduced.
Theboxeswereweighedandthe=STDEVP()functionusedastheseboxes
representedtheentiretestrun.
Themachinewiththesmallestvariancewasthemostconsistent.????????????????????
SoapPowderBoxFillingMachineTestResults
Test1 Test2 Test3 Test4 Variance
Machine1 1.4 1.5 1.6 1.5 0.0707 =STDEVP(D32:G32)
Machine2 1.5 1.5 1.4 1.5 0.0433 =STDEVP(D33:G33)
Machine3 1.5 1.6 1.7 1.8 0.1118 =STDEVP(D34:G34)
Themachinewiththesmallestvarianceis:Machine2
=INDEX(C32:C34,MATCH(MIN(H32:H34),H32:H34,0))
Explanation of formula:
STDEVP
Thisfindsthelowestvalue. =(MIN(H32:H34)
Thisfindsthepositionofthelowestvalue. =MATCH(MIN(H32:H34),H32:H34,0)
ThislooksdowntheMachinecolumnto =INDEX(C32:C34,MATCH(MIN(H32:H34),H32:H34,0))
findthemachinename.
SUBSTITUTE
OldText NewText
OriginalText ToRemove ToInsert UpdatedText
ABCDEF CD hello ABhelloEF =SUBSTITUTE(B4,C4,D4)
ABCDABCD CD hello ABhelloABhello =SUBSTITUTE(B5,C5,D5)
NorthernRegion Region Area NorthernArea =SUBSTITUTE(B6,C6,D6)
SandandCement and & S&&Cement =SUBSTITUTE(B7,C7,D7)
What Does It Do ?
Thisfunctionreplacesaspecifiedpieceoftextwithadifferentpieceoftext.
Itcaneitherreplacealloccurrencesofthetext,oraspecificinstance.
Thefunctioniscasesensitive.
Syntax
=SUBSTITUTE(OriginalText,TextToRemove,TextToInsert,InstanceToUse)
TheInstanceToUseisoptional,ifitisomittedallinstanceswillbesubstituted.
Formatting
Nospecialformattingisneeded.
Note
Tocopewithupperorlowercaseinthesubstitutionyoucanuseothertextfunctions
suchas=UPPER(),=LOWER()or=PROPER()toensurethatthesubstitutionwilltakeplace.
Table1showshowdifferingtextcasesaltertheresultofthesubstitution.
Table1
OldText NewText
OriginalText ToRemove ToInsert UpdatedText
NorthernRegion Region Area NorthernArea
Northernregion Region Area Northernregion
NorthernRegion region Area NorthernRegion
NorthernRegion Region area Northernarea
SUBSTITUTE
NorthernRegion region area NorthernRegion
=SUBSTITUTE(B39,C39,D39)
Table2showshowthe=PROPER()functionhasbeenusedtotakeaccountofthemixedcases.
Table2
OldText NewText
OriginalText ToRemove ToInsert UpdatedText
NorthernRegion Region Area NorthernArea
Northernregion Region Area NorthernArea
NorthernRegion region Area NorthernArea
NorthernRegion Region area NorthernArea
NorthernRegion region area NorthernArea
=SUBSTITUTE(PROPER(B50),PROPER(C50),PROPER(D50))
SUM
Horizontal
100 200 300 600 =SUM(C4:E4)
Vertical
100
200
300
600 =SUM(C7:C9)
SingleCells
100 300 600 =SUM(C13,D14,E13)
200
MultipleRanges
100 400
200 500
3000 600
4800 =SUM(C17:C19,E17:E19)
Functions
100 400
200 500
300 600
800 =SUM(AVERAGE(C23:C25),MAX(E23:E25))
What Does It Do ?
Thisfunctioncreatesatotalfromalistofnumbers.
Itcanbeusedeitherhorizontallyorvertically.
Thenumberscanbeinsinglecells,rangesarefromotherfunctions.
Syntax
=SUM(Range1,Range2,Range3...throughtoRange30).
Formatting
Nospecialformattingisneeded.
Note
SUM
Manypeopleusethe=SUM()functionincorrectly.
ThisexampleshowshowtheSUMhasbeencombinedwithplus+symbols.
Theformulaisactuallydoingmoreworkthanneeded.
Itshouldhavebeenenteredaseither=C48+C49+C50or=SUM(C48:C50).
100
200
300
600 =SUM(C48+C49+C50) Wrong!
=SUM(C48:C50) Correct
=C48+C49+C50 Correct
SUM (Running Total)
Running
Month Sales Total
Jan 10 10 =SUM($D$7:D7)
Feb 50 60 =SUM($D$7:D8)
Mar 30 90 =SUM($D$7:D9)
Apr 20 110 =SUM($D$7:D10)
May 110 =SUM($D$7:D11)
Jun 110 =SUM($D$7:D12)
Jul 110 =SUM($D$7:D13)
Aug 110 =SUM($D$7:D14)
Sep 110 =SUM($D$7:D15)
Oct 110 =SUM($D$7:D16)
Nov 110 =SUM($D$7:D17)
Dec 110 =SUM($D$7:D18)
Typetheformula=SUM($D$7:D7)incellE7andthencopydownthetable.
Itworksbecausethefirstreferenceusesdollarsymbols$tokeep$D$7static
astheformulaiscopieddown.Eachoccurrenceofthe=SUM()thenaddsall
thenumbersfromthefirstcelldown.
Thefunctioncanbetidieduptoshow0zerowhenthereisnoadjacentvalue
byusingthe=IF()function.
Running
Month Sales Total
Jan 10 10 =SUM(IF(D7,$D$7:D7,0))
Feb 50 60 =SUM(IF(D8,$D$7:D8,0))
Mar 30 90 =SUM(IF(D9,$D$7:D9,0))
Apr 20 110 =SUM(IF(D10,$D$7:D10,0))
May 0 =SUM(IF(D11,$D$7:D11,0))
Jun 0 =SUM(IF(D12,$D$7:D12,0))
Jul 0 The=SUM()onlytakesplacewhen
Aug 0 thereisdataincolumnD.
Sep 0 Otherwisethevalue0zeroisentered.
Oct 0
Nov 0
SUM (Running Total)
Dec 0
SUM and the =OFFSET function
Sometimesitisnecessarytobaseacalculationonasetofcellsindifferentlocations.
Anexamplewouldbewhenatotalisrequiredfromcertainmonthsoftheyear,suchas
thelast3monthsinrelationtothecurrentdate.
Onesolutionwouldbetoretypethecalculationeachtimenewdataisentered,butthis
wouldbetimeconsumingandopentohumanerror.
Abetterwayistoindicatethestartandendpointoftherangetobecalculatedby
usingthe=OFFSET()function.
The=OFFSET()picksoutacellacertainnumberofcellsawayfromanothercell.
Bygivingthe=OFFSET()theaddressofthefirstcellintherangewhichneedsto
betotalled,wecanthenindicatehowfarawaytheendcellshouldbeandthe=OFFSET()
willgiveustheaddressofcellwhichwillbetheendoftherangetobetotalled.
The=OFFSET()needstoknowthreethings;
1.Acelladdresstouseasthefixedpointfromwhereitshouldbasetheoffset.
2.Howmanyrowsitshouldlookupordownfromthestartingpoint.
3.Howmanycolumnsitshouldlookleftorrightfromthestartingpoint.
Thefollowingexamplesuse=OFFSET()topickboththestartandendoftherange
SUM and the =OFFSET function
whichneedstobetotalled.
Example
Thefollowingtableshowsfivemonthsofdata.
Tocalculatethetotalofaspecificgroupofmonthsthe=OFFSET()functionhasbeenused.
TheStartandEnddatesenteredincellsF71andF72areusedastheoffsettoproduce
arangewhichcanbetotalled.
TypeintheStartmonth. Feb-98
TypeintheEndmonth. Mar-98
13 5 3 10 800 900
=SUM(OFFSET(D79,0,MONTH(F71)):OFFSET(D79,0,MONTH(F72)))
SUM and the =OFFSET function
Explanation
Thefollowingformularepresentabreakdownofwhatthe=OFFSETfunctiondoes.
Theformuladisplayedbelowareonlydummies,buttheywillupdateasyouenter
datesintocellsF71andF72.
Formula 1 =SUM(OFFSET(D79,0,MONTH(F71)):OFFSET(D79,0,MONTH(F72)))
Thisistheactualformulaenteredbytheuser.
Formula 2 =SUM(OFFSET(D79,0,MONTH(2)):OFFSET(D79,0,MONTH(3)))
Thisshowshowthe=MONTHfunctioncalculatesthemonthnumber.
Inthisexamplethevaluesofthemonthsare2and3forFebandMar.
Thesevaluesarethe'offsets'relativetocellD79.
Formula 3 =SUM(OFFSET(D79,0,2):OFFSET(D79,0,3))
Thisshowswherethemonthnumbersareusedinthe=OFFSETfunction.
Formula 4 =SUM(F79:G79)
Thisshowshowthe=OFFSETeventuallyequatestocelladdresses
tobeusedasarangeforthe=SUMfunction.
SUMIF
Item Date Cost
Brakes 1Jan98 80
Tyres 10May98 25
Brakes 1Feb98 80
Service 1Mar98 150
Service 5Jan98 300
Window 1Jun98 50
Tyres 1Apr98 200
Tyres 1Mar98 100
Clutch 1May98 250
What Does It Do ?
Thisfunctionaddsthevalueofitemswhichmatchcriteriasetbytheuser.
Syntax
=SUMIF(RangeOfThingsToBeExamined,CriteriaToBeMatched,RangeOfValuesToTotal)
=SUMIF(C4:C12,"Brakes",E4:E12) ThisexaminesthenamesofproductsinC4:C12.
ItthenidentifiestheentriesforBrakes.
ItthentotalstherespectivefiguresinE4:E12
=SUMIF(E4:E12,">=100") ThisexaminesthevaluesinE4:E12.
Ifthevalueis>=100thevalueisaddedtothetotal.
Formatting
Nospecialformattingisneeded.
SUMPRODUCT
Item Sold price
Tyres 5 100
Filters 2 10
Bulbs 3 2
What Does It Do ?
Thisfunctionusesatleasttwocolumnsofvalues.
Thevaluesinthefirstcolumnaremultipledwiththecorrespondingvalueinthesecondcolumn.
Thetotalofallthevaluesistheresultofthecalculation.
Syntax
=SUMPRODUCT(Range1,Range,Range3throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtablewasusedbyadrinksmerchanttokeeptrackofstock.
Themerchantneededtoknowthetotalpurchasevalueofthestock,andthepotential
valueofthestockwhenitissold,takingingintoaccountthemarkuppercentage.
The=SUMPRODUCT()functionisusedtomultiplytheCasesInStockwiththeCasePriceto
calculatewhatthemerchantspentinbuyingthestock.
The=SUMPRODUCT()functionisusedtomultiplytheCasesInStockwith
theBottlesInCaseandtheBottleSettingPrice,tocalculatethepotentialvalueofthe
stockifitisallsold.
What Does It Do ?
Thisfunctioncalculatesthedepreciationofanitemthroughoutitslife,usingthesumofthe
yearsdigits.
Thedepreciationisgreatestintheearlierpartoftheitemslife.
9,000
1 17% 1,500
2 33% 3,000
3 50% 4,500
Asthegreaterpartofthedepreciationisallocatedtotheearliestyearsthevaluesare
inverted,year1is$4500,year2is3000andyear1is1500.
Example 1
PurchasePriceOfACar: 10,000
SalvageValue: 1,000
ExpectedLifeinYears: 3
SYD
As%OfTotalDepreciation
DepreciationinYear1: 4,500 ===> 0.5
DepreciationinYear2: 3,000 ===> 0.333333
DepreciationinYear3: 1,500 ===> 0.166667
=SYD(E39,E40,E41,3)
1.AddtogetherthedigitsoftheLifetogettheSumOfTheYearsDigits,1+2+3=6.
2.SubtracttheSalvagefromthePurchasePricetogetTotalDeprectation,100001000=9000.
3.DividetheTotalDeprectationbytheSumOfTheYearsDigits,9000/6=1500.
4.Inverttheyeardigits,1,2,3becomes3,2,1.
5.Multiply3,2,1by1500toget4500,3000,1500,thesevaluesarethedepreciation
valuesforeachofthethreeyearsinthelifeoftheitem.
Example 2
Thesameexampleusing4years.
PurchasePriceOfACar: 10,000
SalvageValue: 1,000
ExpectedLifeinYears: 4
As%OfTotalDepriciation
DepreciationinYear1: 3,600 0.4
DepreciationinYear2: 2,700 0.3
DepreciationinYear3: 1,800 0.2
DepreciationinYear4: 900 0.1
TotalDepreciation: 9,000 100%
Example 3
Thisexamplewilladjustitselftoaccommodateanynumberofyearsbetween1and10.
PurchasePriceOfACar: 10,000
SalvageValue: 1,000
ExpectedLifeinYears(1to10): 7
As%OfTotalDepriciation
Year 1 2,250 25%
Year 2 1,929 21%
Year 3 1,607 18%
Year 4 1,286 14%
Year 5 964 11%
Year 6 643 7%
Year 7 321 4%
SYD
Year
Year
Year
9,000 100%
Syntax
=SYD(OriginalCost,SalvageValue,Life,PeriodToCalculate)
Formatting
Nospecialformattingisneeded.
T
CellToTest Result
Hello Hello =T(D4)
10 =T(D5)
1Jan98 =T(D6)
=T(D7)
What Does It Do ?
Thisfunctionexaminesanentrytodeterminewhetheritistextornot.
Ifthevalueistext,thenthetextistheresultofthefunction
Ifthevalueisnottext,theresultisablank.
ThefunctionisnotspecificallyneededbyExcel,butisincludedforcompatibilitywith
otherspreadsheetprograms.
Syntax
=T(CellToTest)
Formatting
Nospecialformattingisneeded.
TEXT
Original Converted
Number ToText
10 10.00 =TEXT(C4,"0.00")
10 10.00 =TEXT(C5,"0.00")
10 10 =TEXT(C6,"0")
10 10 =TEXT(C7,"0")
10.25 10.3 =TEXT(C8,"0.0")
10.25 10.3 =TEXT(C9,"0.0")
What Does It Do ?
Thisfunctionconvertsanumbertoapieceoftext.
Theformattingforthetextneedstobespecifiedinthefunction.
Syntax
=TEXT(NumberToConvert,FormatForConversion)
Formatting
Nospecialformattingisrequired.
TIME
Hour Minute Second Time
14 30 59 14:30:59 =TIME(C4,D4,E4)
14 30 59 2:30:59PM =TIME(C5,D5,E5)
14 30 59 0.60485 =TIME(C6,D6,E6)
Syntax
=TIME(Hour,Minute,Second)
Formatting
Theresultwillbeshownasatimewhichcanbeformattedeitheras12or24hourstyle.
Ifanormalnumberformatisappliedadecimalfractionisshownwhichrepresentsthe
timeasafractionoftheday.
TIMEVALUE
Text Time
14:30:59 0.604849537 =TIMEVALUE(C4)
14:30:59 14:30:59 =TIMEVALUE(C5)
14:30:59 2:30:59PM =TIMEVALUE(C6)
Syntax
=TIMEVALUE(Text)
Formatting
Theresultwillbeshownasanumberrepresentingthetimeafractionoftheday.
Formattingcanbeappliedforeitherthe12or24hourclocksystem.
TODAY
TodayIs
6May09 =TODAY()
Syntax
=TODAY()
Formatting
TheresultwillnormallybedisplayedusingtheDDMMMYYformat.
Example
ThefollowingexampleshowshowtheTodayfunctionisusedtocalculatethenumber
ofdayssinceaparticularday.
Date DaysSince
1Jan97 4508 =TODAY()C20
10Aug97 4287 =TODAY()C21
Notethattheresultisactuallythenumberofdaysbeforetodaysdate.Tocalculate
aresultwhichincludesthecurrentdateanextra1willneedtobeadded.
Date DaysSince
1Jan97 4509 =TODAY()C28+1
10Aug97 4288 =TODAY()C29+1
Example
Thefollowingexampleshowsthenumberofdaysfromtodayuntiltheyear2000.
Year2000 DaysUntil
01Jan2000 3413 =C36TODAY()
TRANSPOSE
Jan Feb
Alan 10 30
Bob 40 50
Carol 70 80
Total 120 160
{=TRANSPOSE(C3:E7)}
Asanarrayformulainallthesecells
What Does It Do ?
Thisfunctioncopiesdatafromarange,andplacesinitinanewrange,turningitso
thatthedataoriginallyincolumnsisnowinrows,andthedataoriginallyinrows
isincolumns.
Thetransposerangemustbethesamesizeastheoriginalrange.
Thefunctionneedstobeenteredasanarrayformula.
Toenteranarrayformulayoumustfirsthighlightallthecellswheretheformulaisrequired.
Nexttypetheformula,suchas=TRANSPOSE(A1:A5).
FinallypressCtrl+Shift+Entertoconfirmit.
Ifchangesneedtobemadetotheformula,theentirearrayhastobehighlighted,theedits
canthenbemadeandtheCtrl+Shift+Enterusedtoconfirmit.
Syntax
=TRANSPOSE(Range)
Formatting
Nospecialformattingisneeded.
TREND WHAT IS CONST b ?
HistoricalData PredictedValues
Month Sales Month Sales
1 1,000 7 4,940 {=TREND(C8:C13,B8:B13,E8:E13)}
2 2,000 8 5,551 {=TREND(C5:C10,B5:B10,E5:E10)}
3 2,500 9 6,163 {=TREND(C5:C10,B5:B10,E5:E10)}
4 3,500 10 6,774 {=TREND(C5:C10,B5:B10,E5:E10)}
5 3,800 11 7,386 {=TREND(C5:C10,B5:B10,E5:E10)}
6 4,000 12 7,997 {=TREND(C5:C10,B5:B10,E5:E10)}
What Does It Do ?
Thisfunctionpredictsvaluesbaseduponthreesetsofrelatedvalues.
ThepredictionisbasedupontheLinearTrendoftheoriginalvalues.
ThefunctionisanarrayfunctionandmustbeenteredusingCtrl+Shift+Enter.
Syntax
=TREND(KnownYs,KnownXs,RequiredXs,Constant)
TheKnownYsistherangeofvalues,suchasSalesFigures.
TheKnownXsistheintervalsusedwhencollectingthedata,suchasMonths.
TheRequiredXsistherangeforwhichyouwanttomaketheprediction,suchasMonths.
Formatting
Nospecialformattingisneeded.
Example
Thefollowingtableswereusedbyacompanytopredictwhentheywouldstartto
makeaprofit.
Theirbankmanagerhadtoldthecompanythatunlesstheycouldshowaprofitbythe
endofthenextyear,thebankwouldnolongerprovideanoverdraftfacility.
Toprovetothebankthat,baseduponthepastyearsperformance,thecompanywould
starttomakeaprofitattheendofthenextyear,the=TREND()functionwasused.
Thehistoricaldataforthepastyearwasentered,months1to12.
Themonthstopredictwereentered,13to24.
The=TREND()functionshowsthatitwillbemonth22beforethecompanymakeaprofit.
HistoricalData PredictedValues
Month Profit Month Profit
1 5,000 13 2,226 {=TREND(C41:C52,B41:B52,E41:E52)}
TREND WHAT IS CONST b ?
2 4,800 14 1,968 The
3 4,600 15 1,709 same
4 4,750 16 1,451 function
5 4,800 17 1,193 used
6 4,500 18 935 in
7 4,000 19 676 all
8 3,800 20 418 cells
9 3,300 21 160 as
10 2,000 22 98 an
11 2,500 23 356 array
12 2,800 24 615 formula
What Does It Do ?
Thisfunctionremovesunwantedspacesfromapieceoftext.
Thespacesbeforeandafterthetextwillberemovedcompletely.
Multiplespaceswithinthetextwillbetrimmedtoasinglespace
Syntax
=TRIM(TextToTrim)
Formatting
Nospecialformattingisneeded.
TRUNC
Precision
For Truncated
Number Truncation Number
1.47589 0 1 =TRUNC(C4,D4)
1.47589 1 1.4 =TRUNC(C5,D5)
1.47589 2 1.47 =TRUNC(C6,D6)
1.47589 1 1.4 =TRUNC(C7,D7)
1.47589 2 1.47 =TRUNC(C8,D8)
13643.48 1 13640 =TRUNC(C9,D9)
13643.48 2 13600 =TRUNC(C10,D10)
13643.48 3 13000 =TRUNC(C11,D11)
What Does It Do ?
Thisfunctionremovesthedecimalpartofanumber,itdoesnotactuallyroundthenumber.
Syntax
=TRUNC(NumberToTuncate,Precision)
Formatting
Nospecialformattingisneeded.
UPPER
OriginalText UpperCase
alanjones ALANJONES =UPPER(C4)
bobsmith BOBSMITH =UPPER(C5)
carOlwiLLiamS CAROLWILLIAMS =UPPER(C6)
cardiff CARDIFF =UPPER(C7)
abc123 ABC123 =UPPER(C8)
What Does It Do ?
Thisfunctionconvertsallcharactersinapieceoftexttouppercase.
Syntax
=UPPER(TextToConvert)
Formatting
Nospecialformattingisneeded.
Example
SeetheexampleforFREQUENCY.
VALUE
TextContainingANumber Value
Annualturnoverwas5000 5000 =VALUE(MID(C4,SEARCH("",C4),99))
Therewasa2%increaseinsales. 0.02
Therewasa50%increaseinsales. 0.5
A100%increasewasachieved. 1
Onlya2%increaseinsales. 2%
Approx50%increaseinsales. 50%
Therewasa100%increaseinsales. 100% * See explanation below.
=VALUE(MID(SUBSTITUTE(C11,"",""),SEARCH("???%",SUBSTITUTE(C11,"","")),4))
What Does It Do ?
Thisfunctionconvertsapieceoftextwhichresemblesanumberintoanactualvalue.
Ifthenumberinthemiddleofalongpieceoftextitwillhavetobeextractedusingother
textfunctionssuchas=SEARCH(),=MID(),=FIND(),=SUBSTITUTE,=LEFT()or=RIGHT().
Syntax
=VALUE(TextToConvert)
Formatting
Nospecialformattingisneeded.
Theresultwillbeshownasavalue,basedupontheoriginaltext.
Ifthesignisincludedinthetextitwillbeignored.
Ifthe%signisincludedinthetext,theresultwillbeadecimalfractionwhichcanthen
beformattedasapercentage.
Iftheoriginaltextformatappearsasatimehh:mmtheresultwillbeatime.
Thesamewillbetrueforotherrecognisedformats.
Therewasa2%increaseinsales. 0.02
Therewasa50%increaseinsales. 0.5
Therewasa100%increaseinsales. 1
=VALUE(MID(SUBSTITUTE(C52,"",""),SEARCH("???%",SUBSTITUTE(C52,"","")),4))
VAR
Values Values Values
10 10 10
10 10 11
9 11 9
10 10 12
What Does It Do ?
Thisfunctioncalculatesthesamplepopulationvarianceofalistofvalues.
Asamplepopulationisusedwhenthelistofvaluesrepresentsasampleofapopulation.
Syntax
=VAR(Range1,Range2,Range3throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thetablebelowwasusedbyacompanyinterestedinbuyinganewmachine
topackwashingpowder.
Threemachineswereshortlistedandallowtorunforaday.
Attheendofthedayfourboxesofsoappowderwerepickedatrandomfromtheproduction
ofeachmachine.
Theboxeswereweighedandthe=VAR()functionusedastheseboxesonlyrepresented
asampleofthecompletedaysproduction.
Themachinewiththesmallestvariancewasthemostconsistent.
SoapPowderBoxFillingMachineTestResults
Test1 Test2 Test3 Test4 Variance
Machine1 1.4 1.5 1.6 1.5 0.0067 =VAR(D34:G34)
Machine2 1.5 1.5 1.4 1.5 0.0025 =VAR(D35:G35)
Machine3 1.5 1.6 1.7 1.8 0.0167 =VAR(D36:G36)
Themachinewiththesmallestvarianceis: Machine2
=INDEX(C34:C36,MATCH(MIN(H34:H36),H34:H36,0))
VAR
Explanation of formula:
Thisfindsthelowestvalue. =MIN(H34:H36)
Thisfindsthepositionofthelowestvalue. =MATCH(MIN(H34:H36),H34:H36,0)
ThislooksdowntheMachinecolumnto =INDEX(C34:C36,MATCH(MIN(H34:H36),H34:H36,0))
findthemachinename.
VARP
Values Values Values
10 10 10
10 10 11
9 11 9
10 10 12
What Does It Do ?
Thisfunctioncalculatesthevarianceofalistofvalues.
Thevarianceiscalculatedonthebasisthatthevaluesrepresenttheentirepopulation.
Syntax
=VARP(Range1,Range2,Range3throughtoRange30)
Formatting
Nospecialformattingisneeded.
Example
Thetablebelowwasusedbyacompanyinterestedinbuyinganewmachine
topackwashingpowder.
Atrialrunajustfourboxespermachinewereproduced.
Theboxeswereweighedandthe=VARP()functionusedastheseboxes
representedtheentiretestrun.
Themachinewiththesmallestvariancewasthemostconsistent.
SoapPowderBoxFillingMachineTestResults
Test1 Test2 Test3 Test4 Variance
Machine1 1.4 1.5 1.6 1.5 0.0050 =VARP(D32:G32)
Machine2 1.5 1.5 1.4 1.5 0.0019 =VARP(D33:G33)
Machine3 1.5 1.6 1.7 1.8 0.0125 =VARP(D34:G34)
Themachinewiththesmallestvarianceis: Machine2
=INDEX(C32:C34,MATCH(MIN(H32:H34),H32:H34,0))
Explanation of formula:
VARP
Thisfindsthelowestvalue. =(MIN(H32:H34)
Thisfindsthepositionofthelowestvalue. =MATCH(MIN(H32:H34),H32:H34,0)
ThislooksdowntheMachinecolumnto =INDEX(C32:C34,MATCH(MIN(H32:H34),H32:H34,0))
findthemachinename.
VLOOKUP
The column numbers are not needed.
they are part of the illustration.
col 1 col 2 col 3 col 4 col 5 col 6
Jan 10 20 30 40 50
Feb 80 90 100 110 120
Mar 97 69 45 51 77
Typeamonthtolookfor: Feb
Whichcolumnneedstobepickedout: 4
Theresultis: 100
=VLOOKUP(G11,C6:H8,G12,FALSE)
What Does It Do ?
Thisfunctionscansdowntherowheadingsatthesideofatabletofindaspecifieditem.
Whentheitemisfound,itthenscansacrosstopickacellentry.
Syntax
=VLOOKUP(ItemToFind,RangeToLookIn,ColumnToPickFrom,SortedOrUnsorted)
TheItemToFindisasingleitemspecifiedbytheuser.
TheRangeToLookInistherangeofdatawiththerowheadingsatthelefthandside.
TheColumnToPickFromishowfaracrossthetablethefunctionshouldlooktopickfrom.
TheSorted/Unsortediswhetherthecolumnheadingsaresorted.TRUEforyes,FALSEforno.
Formatting
Nospecialformattingisneeded.
VLOOKUP
Example 1
Thistableisusedtofindavaluebasedonaspecifiednameandmonth.
The=VLOOKUP()isusedtoscandowntofindthename.
Theproblemariseswhenweneedtoscanacrosstofindthemonthcolumn.
Tosolvetheproblemthe=MATCH()functionisused.
The=MATCH()looksthroughthelistofnamestofindthemonthwerequire.Itthencalculates
thepositionofthemonthinthelist.Unfortunately,becausethelistofmonthsisnotaswide
asthelookuprange,the=MATCH()numberis1lessthanwerequire,soandextra1is
addedtocompensate.
The=VLOOKUP()nowusesthis=MATCH()numbertolookacrossthecolumnsand
picksoutthecorrectcellentry.
The=VLOOKUP()usesFALSEattheendofthefunctiontoindicatetoExcelthatthe
rowheadingsarenotsorted.
Typeanametolookfor: eric
Typeamonthtolookfor: mar
Theresultis: 69
=VLOOKUP(F56,C50:F54,MATCH(F57,D49:F49,0)+1,FALSE)
VLOOKUP
Example 2
Thisexampleshowshowthe=VLOOKUP()isusedtopickthecostofasparepartfor
differentmakesofcars.
The=VLOOKUP()scansdownrowheadingsincolumnFforthesparepartenteredincolumnC.
Whenthemakeisfound,the=VLOOKUP()thenscansacrosstofindtheprice,usingthe
resultofthe=MATCH()functiontofindthepositionofthemakeofcar.
Thefunctionsusetheabsoluterangesindicatedbythedollarsymbol.Thisensuresthat
whentheformulaiscopiedtomorecells,therangesfor=VLOOKUP()and=MATCH()do
notchange.
AllthecalculationstakeplaceintheOrdersTable.
ThenameoftheItemistypedincolumnCoftheOrdersTable.
TheUnitCostoftheitemisthenlookedupintheUnitCostTable.
TheFALSEoptionhasbeenusedattheendofthefunctiontoindicatethattheproduct
namesdownthesideoftheUnitCostTablearenotsorted.
UsingtheFALSEoptionforcesthefunctiontosearchforanexactmatch.Ifamatchis
notfound,thefunctionwillproduceanerror.
=VLOOKUP(C126,C114:D116,2,FALSE)
ThediscountisthenlookedupintheDiscountTable
IftheQuantityOrderedmatchesavalueatthesideoftheDiscountTablethe=VLOOKUPwill
lookacrosstofindthecorrectdiscount.
TheTRUEoptionhasbeenusedattheendofthefunctiontoindicatethatthevalues
downthesideoftheDiscountTablearesorted.
UsingTRUEwillallowthefunctiontomakeanapproximatematch.IftheQuantityOrdereddoes
notmatchavalueatthesideoftheDiscountTable,thenextlowestvalueisused.
Tryingtomatchanorderof125willdropdownto100,andthediscountfrom
the100rowisused.
=VLOOKUP(D126,F114:I116,MATCH(C126,G113:I113,0)+1,TRUE)
DiscountTable
UnitCostTable Brick Wood Glass
Brick 2 1 0% 0% 0%
Wood 1 100 6% 3% 12%
Glass 3 300 8% 5% 15%
OrdersTable
Item Units UnitCost Discount Total
Brick 100 2 6% 188
Wood 200 1 3% 194
Glass 150 3 12% 396
Brick 225 2 6% 423
VLOOKUP
Wood 50 1 0% 50
Glass 500 3 15% 1,275
Formulafor:
UnitCost =VLOOKUP(C126,C114:D116,2,FALSE)
Discount =VLOOKUP(D126,F114:I116,MATCH(C126,G113:I113,0)+1,TRUE)
Total =(D126*E126)(D126*E126*F126)
WEEKDAY
Date Weekday
Thu01Jan98 5 =WEEKDAY(C4)
Thu01Jan98 5 =WEEKDAY(C5)
Thu01Jan98 5 =WEEKDAY(C6,1)
Thu01Jan98 4 =WEEKDAY(C7,2)
Thu01Jan98 3 =WEEKDAY(C8,3)
Syntax
=WEEKDAY(Date,Type)
Type:Thisisusedtoindicatetheweekdaynumberingsystem.
1:willsetSundayas1throughtoSaturdayas7
2:willsetMondayas1throughtoSundayas7.
3:willsetMondayas0throughtoSundayas6.
Ifnonumberisspecified,Excelwilluse1.
Formatting
Theresultwillbeshownasanormalnumber.
Toshowtheresultasthenameoftheday,useFormat,Cells,Customandset
theTypetodddordddd.
Example
Thefollowingtablewasusedbyahotelwhichrentedafunctionroom.
Thehotelchargeddifferentratesdependinguponwhichdayoftheweekthebookingwasfor.
TheBookingDateisentered.
TheActualDayiscalculated.
TheBookingCostispickedfromalistofratesusingthe=LOOKUP()function.
BookingRates
DayOfWeek Cost
1 50
2 25
3 25
WEEKDAY
4 30
5 40
6 50
7 100
WORKDAY
StartDate Days Result
1Jan98 28 35836 =WORKDAY(D4,E4)
1Jan98 28 10Feb98 =WORKDAY(D5,E5)
Syntax
=WORKDAY(StartDate,Days,Holidays)
Formatting
Theresultwillnormallybeshownasanumberwhichcanbeformattedtoa
normaldatebyusingFormat,Cells,Number,Date.
Example
Thefollowingexampleshowshowthefunctioncanbeusedtocalculatedeliverydates
baseduponaninitialOrderDateandestimatedDeliveryDays.
Syntax
=YEAR(Date)
Formatting
Theresultisshownasanumber.
YEARFRAC
StartDate EndDate Fraction
1Jan98 1Apr98 0.25 =YEARFRAC(C4,D4)
1Jan98 31Dec98 1 =YEARFRAC(C5,D5)
1Jan98 1Apr98 25% =YEARFRAC(C6,D6)
Syntax
=YEARFRAC(StartDate,EndData,Basis)
Basis:Definesthecalendarsystemtobeusedinthefunction.
0:oromittedUSAstyle30dayspermonthdividedby360.
1:29or30or31dayspermonthdividedby365.
2:29or30or31dayspermonthdividedby360.
3:29or300r31dayspermonthdividedby365.
4:European29or30or31daysdividedby360.
Formatting
Theresultwillbeshownasadecimalfraction,butcanbeformattedasapercent.
Example
Thefollowingtablewasusedbyacompanywhichhiredpeopleonshorttermcontracts
forapartoftheyear.
TheProRataSalarywhichrepresentstheannualsalaryisentered.
TheStartandEnddatesofthecontractareentered.
The=YEARFRAC()functionisusedtocalculateActualSalaryfortheportionoftheyear.
Note
Theextra1hasbeenaddedtotheEnddatetocompensateforthefactthatthe=YEARFRAC()
functioncalculatesfromtheStartdateupto,butnotincluding,theEnddate.
Project Dates House Building
TargetDelivery Tue27Jan98 TargetBudget 12,000
Days
JobStage StartDate Required EndDate DailyCost Total
Survey Mon05Jan98 5 Fri09Jan98 200 1,000
Foundation Mon12Jan98 4 Thu15Jan98 1,000 4,000
Walls Fri16Jan98 3 Tue20Jan98 800 2,400
Roof Wed21Jan98 6 Wed28Jan98 400 2,400
Electrics Thu29Jan98 4 Tue03Feb98 300 1,200
TotalDays 22