Vous êtes sur la page 1sur 382

PUBLISHED BY

Microsoft Press
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright 2004 by Curtis Frye
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form
or by any means without the written permission of the publisher.
Library of Congress Cataloging-in-Publication Data
Frye, Curtis, 1968-
Microsoft Office Excel 2003 Step by Step / Curtis Frye.
p. cm.
Includes index.
ISBN 0-7356-1518-7
1. Microsoft Excel (Computer file) 2. Business--Computer programs. 3. Electronic
spreadsheets. I. Title.
HF5548.4.M523F8 2003
005.369-dc21 2003052689
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QWE 8 7 6 5 4 3
Distributed in Canada by H.B. Fenn and Company Ltd.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further informa-
tion about international editions, contact your local Microsoft Corporation office or contact Microsoft
Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress.
Send comments to mspinput@microsoft.com.
FoxPro, FrontPage, IntelliMouse, Microsoft, Microsoft Press, MSN, the Office logo, Outlook, PivotChart,
PivotTable, PowerPoint, Visual Basic, Visual FoxPro, and Windows are either registered trademarks or
trademarks of Microsoft Corporation in the United States and/or other countries. Other product and
company names mentioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, domain names, e-mail addresses, logos, people, places,
and events depicted herein are fictitious. No association with any real company, organization, product,
domain name, e-mail address, logo, person, place, or event is intended or should be inferred.
Acquisitions Editor: Alex Blanton
Project Editor: Aileen Wrothwell
Body Part No. X09-71434
Contents
Contents
WhatsNewinMicrosoftExcel2003
GettingHelp
GettingHelpwithThisBookandItsCD-ROM
GettingHelpwithMicrosoftExcel2003
UsingtheBooksCD-ROM
SystemRequirements
InstallingthePracticeFiles
UsingthePracticeFiles
UninstallingthePracticeFiles
ConventionsandFeatures
MicrosoftOfficeSpecialistSkillsStandards
MicrosoftOfficeSpecialistSkillStandards
MicrosoftOfficeSpecialistExpertSkillStandards
TakingaMicrosoftOfficeSpecialistCertificationExam
AbouttheMicrosoftOfficeSpecialistProgram
SelectingaMicrosoftOfficeSpecialistCertificationLevel
MicrosoftOfficeSpecialistSkillsStandards
TheExamExperience
Test-TakingTips
ForMoreInformation
QuickReference
Chapter1 GettingtoKnowExcel
Chapter2 SettingUpaWorkbook
Chapter3 PerformingCalculationsonData
Chapter4 ChangingDocumentAppearance
Chapter5 FocusingonSpecificDataUsingFilters
Chapter6 CombiningDatafromMultipleSources
Chapter7 ReorderingandSummarizingData
Chapter8 AnalyzingAlternativeDataSets
Chapter9 CreatingDynamicListswithPivotTables
Chapter10 CreatingCharts
Chapter11 Printing
Chapter12 AutomatingRepetitiveTaskswithMacros
Chapter13 WorkingwithOtherMicrosoftOfficePrograms
vii
ix
ix
ix
xi
xi
xii
xii
xiv
xv
xvii
xvii
xviii
xxi
xxi
xxi
xxii
xxii
xxiv
xxv
xxvii
xxvii
xxix
xxxiii
xxxv
xxxviii
xl
xlii
xliii
xlvi
xlviii
li
liv
lvii
iii
Contents
Chapter14 WorkingwithDatabaseData
Chapter15 PublishingInformationontheWeb lx
Chapter16 CollaboratingwithColleagues
lviii
lxiv
1 GettingtoKnowExcel 1
IntroducingExcel 1
WorkingwithanExistingDataList 3
ZeroingInonDatainaList 5
CreatingaWorkbook 11
CheckingandCorrectingData 17
2 SettingUpaWorkbook 24
MakingWorkbooksEasiertoWorkWith 25
MakingDataEasiertoRead 31
AddingaGraphictoaDocument 34
3 PerformingCalculationsonData 40
NamingGroupsofData 42
CreatingFormulastoCalculateValues 44
FindingandCorrectingErrorsinCalculations 50
4 ChangingDocumentAppearance 56
ChangingtheAppearanceofData 58
ApplyinganExistingFormattoData 62
MakingNumbersEasiertoRead 64
ChangingDatasAppearanceBasedonItsValue 69
MakingPrintoutsEasiertoFollow 73
PositioningDataonaPrintout 76
5 FocusingonSpecificDataUsingFilters 82
LimitingtheDataThatAppearsontheScreen 84
PerformingCalculationsonFilteredData 89
DefiningaValidSetofValuesforaRangeofCells 91
6 CombiningDatafromMultipleSources 96
UsingaDataListasaTemplateforOtherLists 98
WorkingwithMoreThanOneSetofData 101
iv
Contents
LinkingtoDatainOtherWorkbooks 107
SummarizingMultipleSetsofData 110
GroupingMultipleDataLists 114
7 ReorderingandSummarizingData 118
SortingaDataList 120
OrganizingDataintoLevels 124
8 AnalyzingAlternativeDataSets 130
DefiningandEditingAlternativeDataSets 132
DefiningMultipleAlternativeDataSets 135
VaryingYourDatatoGetaDesiredResult 138
FindingOptimalSolutionswithSolver 141
AnalyzingDatawithDescriptiveStatistics 146
9 CreatingDynamicListswithPivotTables 150
CreatingDynamicListswithPivotTables 152
EditingPivotTables 159
CreatingPivotTablesfromExternalData 166
10 CreatingCharts 172
CreatingaChart 174
CustomizingChartLabelsandNumbers 180
FindingTrendsinYourData 183
CreatingaDynamicChartUsingPivotCharts 185
CreatingDiagrams 190
11 Printing 196
PrintingDataLists 197
PrintingPartofaDataList 205
PrintingaChart 209
12 AutomatingRepetitiveTaskswithMacros 214
IntroducingMacros 216
CreatingandModifyingMacros 220
CreatingaToolbartoHoldMacros 223
CreatingaMenutoHoldMacros 226
RunningaMacroWhenaWorkbookIsOpened 230
v
Contents
13 WorkingwithOther
MicrosoftOfficePrograms 232
IncludinganOfficeDocumentinanExcelWorksheet
StoringanExcelDocumentasPartofAnotherOfficeDocument
CreatingaHyperlink
PastingaChartintoAnotherDocument
14 WorkingwithDatabaseData 246
LookingUpInformationinaDataList
RetrievingDatafromaDatabase
SummarizingListData
15 PublishingInformationontheWeb 262
SavingaWorkbookfortheWeb
PublishingWorksheetsontheWeb
PublishingaPivotTableontheWeb
RetrievingDatafromtheWeb
AcquiringWebDatawithSmartTags
WorkingwithStructuredData
UseProfessionalXMLDataCapabilities
16 CollaboratingwithColleagues 286
SharingaDataList
ManagingComments
TrackingandManagingColleaguesChanges
IdentifyingWhichRevisionstoKeep
ProtectingWorkbooksandWorksheets
AuthenticateWorkbooks
Glossary
Index
234
237
239
243
248
251
257
264
266
270
272
275
277
279
288
291
293
296
298
303
309
313
vi
Newin
Office2003
WhatsNewinMicrosoft
Excel2003
YoullnoticesomechangesassoonasyoustartMicrosoftExcel2003.Thetoolbars
andmenubarhaveanewlook,andtherearesomenewtaskpanesavailableonthe
rightsideofyourscreen.Butthefeaturesthatareneworgreatlyimprovedinthis
versionofExcelgobeyondjustchangesinappearance.Somechangeswontbe
apparenttoyouuntilyoustartusingtheprogram.
Newin
Tohelpyouquicklyidentifyfeaturesthatareneworgreatlyenhancedwiththisver-
Office2003
sion,thisbookusestheiconinthemarginwhenevernewfeaturesarediscussedor
shown.Ifyouwanttolearnaboutonlythenewfeaturesoftheprogram,youcan
skimthroughthebook,completingonlythosetopicsthatshowthisicon.
Thefollowingtableliststhenewfeaturesthatyoumightbeinterestedin,aswellas
thechaptersinwhichthosefeaturesarediscussed.
Tolearnhowto Usingthisnewfeature See
Useonlinesupporttools Researchtools Chapter1,page17
UseprofessionalXMLdata XMLSourcetaskpane Chapter15,page283
capabilities
Createadatamap XMLSourcetaskpane Chapter15,page284
DefineXMLelements XMLSourcetaskpane Chapter15,page285
DefineXMLviewingoptions XMLSourcetaskpane Chapter15,page286
FormoreinformationabouttheExcelproduct,seehttp://www.microsoft.com/office/excel/.
vii
GettingHelp
Everyefforthasbeenmadetoensuretheaccuracyofthisbookandthecontentsof
itsCD-ROM.Ifyoudorunintoproblems,pleasecontacttheappropriatesourcefor
helpandassistance.
GettingHelpwithThisBookandItsCD-ROM
IfyourquestionorissueconcernsthecontentofthisbookoritscompanionCD-ROM,
pleasefirstsearchtheonlineMicrosoftKnowledgeBase,whichprovidessupportinfor-
mationforknownerrorsinorcorrectionstothisbook,atthefollowingWebsite:
http://mspress.microsoft.com/supportsearch.asp
IfyoudonotfindyouranswerattheonlineKnowledgeBase,sendyourcomments
orquestionstoMicrosoftPressTechnicalSupportat:
mspinput@microsoft.com
GettingHelpwithMicrosoftExcel2003
IfyourquestionisaboutaMicrosoftsoftwareproduct,includingExcel,andnotaboutthe
contentofthisMicrosoftPressbook,pleasesearchtheMicrosoftKnowledgeBaseat:
http://support.microsoft.com/directory
IntheUnitedStates,Microsoftsoftwareproductsupportissuesnotcoveredbythe
MicrosoftKnowledgeBaseareaddressedbyMicrosoftProductSupportServices.The
MicrosoftsoftwaresupportoptionsavailablefromMicrosoftProductSupportServices
arelistedat:
http://support.microsoft.com/directory
OutsidetheUnitedStates,forsupportinformationspecifictoyourlocation,please
refertotheWorldwideSupportmenuontheMicrosoftProductSupportServicesWeb
siteforthesitespecifictoyourcountry:
http://support.microsoft.com/directory
ix
UsingtheBooksCD-ROM
TheCD-ROMinsidethebackcoverofthisbookcontainsallthepracticefilesyoull
useasyouworkthroughtheexercisesinthebook.Byusingpracticefiles,youwont
wastetimecreatingsamplesandtypingspreadsheetdatainstead,youcanjump
rightinandconcentrateonlearninghowtouseMicrosoftOfficeExcel2003.
Important ThisbookdoesnotcontaintheExcel2003software.Youshouldpur-
chaseandinstallthatprogrambeforeusingthisbook.
MinimumSystemRequirements
Tousethisbook,youwillneed:
Computer/Processor
ComputerwithaPentium133-megahertz(MHz)orhigherprocessor
Operating System
MicrosoftWindows2000withServicePack3(SP3)orMicrosoftWindowsXPor
lateroperatingsystem
Memory
64MBofRAM(128MBrecommended)plusanadditional8MBofRAMfor
eachprogramintheMicrosoftOfficeSystem(suchasWord)running
simultaneously
Hard Disk
Harddiskspacerequirementswillvarydependingonconfiguration;custom
installationchoicesmayrequiremoreorlessharddiskspace.
245MBofavailableharddiskspacewith115MBontheharddiskwhere
theoperatingsystemisinstalled.
Anadditional4MBofharddiskspaceisrequiredforinstallingtheprac-
ticefiles.
Drive
CD-ROMdrive
Display
SuperVGA(800600)orhigher-resolutionmonitorwith256colorsorhigher
xi
UsingtheBooksCD-ROM
Peripherals
MicrosoftMouse,MicrosoftIntelliMouse,orcompatiblepointingdevice
Applications
MicrosoftOfficeExcel2003,MicrosoftOfficePowerPoint2003,MicrosoftOutlook
ExpressorMicrosoftOfficeOutlook2003,InternetExplorerversion5orlater
InstallingthePracticeFiles
Youneedtoinstallthepracticefilesonyourharddiskbeforeyouusetheminthe
chaptersexercises.FollowthesestepstopreparetheCDsfilesforyouruse:
1 InserttheCD-ROMintotheCD-ROMdriveofyourcomputer.
TheStepbyStepCompanionCDEndUserLicenseAgreementappears.
Important Ifthelicenseagreementscreendoesnotappear,startWindows
Explorer.Intheleftpane,locatetheiconforyourCD-ROMdriveandclicktheicon.
Intherightpane,double-clickthefilenamedStartCDorStartCD.exe.
Itisnecessarytoacceptthetermsofthelicenseagreementinordertousethe
practicefiles.Afteryouacceptthelicenseagreement,theStepbyStepCompanion
CDmenuappears.
2 ClickInstallPracticeFiles.
3 ClickNextonthefirstscreen,andthenclickYestoacceptthelicenseagreement
onthenextscreen.
4 Ifyouwanttoinstallthepracticefilestoalocationotherthanthedefaultfolder
(C:\SBS\Excel),clicktheBrowsebutton,selectthenewdriveandpath,andthen
clickOK.
5 ClickNextontheSelectFeaturesscreenandthenclickNextontheStartCopying
Filesscreentoinstalltheselectedpracticefiles.
6 Afterthepracticefileshavebeeninstalled,clickFinish.
Withintheinstallationfolderaresubfoldersforeachchapterinthebook.
7 RemovetheCD-ROMfromtheCD-ROMdrive,andreturnittotheenvelopeatthe
backofthebook.
xii
UsingtheBooksCD-ROM
UsingthePracticeFiles
Eachtopicinthechapterexplainshowandwhentouseanypracticefiles.Thefileor
filesthatyoullneedareindicatedatthebeginningoftheprocedureinbluetype,as
shownhere:
Open:SampleFilefromtheSBS\Excel\SampleFolderfolder.
UsuallyyouwillbeinstructedtoopenthepracticefilesfromwithinExcel.However,
youcanalsoaccessthefilesdirectlyfromWindowsbyclickingStart,AllPrograms,
MicrosoftPress,Excel2003StepbyStep.Locatethefileinthechaptersubfolderand
double-clicktoopenit.
Thefollowingtablelistseachchapterspracticefiles.
Chapter Folder Files
1 GettingToKnowXL FileOpen,ZeroIn,DataEntry,and
Replace
2 SettingUpWorkbook Easier,DataRead,andAddPicture
3 PerformingCalculations NameRange,Formula,andFindErrors
4 ChangingDocAppearance Formats,CreateNew,EasyRead,
Conditional,Follow,andMargins
5 UsingFilters Filter,Calculations,andValidate
6 MultipleSources TemplateStart,January,February,
March,Linking,2001Q1,Consolidate,
TotalByHour2001,Y2001Q1,and
Y2001ByMonth
7 ReorderingAndSummarizing SortingandLevels
8 AnalyzingAlternativeDataSets Defining,Multiple,GoalSeek,Solver,
andDescriptive
9 PivotTable CreatePivot,EditPivot,Export,and
External
10 Charts CreateChart,Customize,TrendLine,
Dynamic,andDiagrams
11 Printing Printing,Part,andPrintChart
(continued)
xiii
UsingtheBooksCD-ROM
Chapter Folder Files
12 Macros View,Record,Toolbar,Menu,and
RunOnOpen
13 OtherPrograms Include,YearEndSummary,Worksheet,
SalesByCategory,Hyperlink,
ProductList,PasteChart,and
ChartTarget
14 Database Lookup,Query,Products,andSummary
15 Web Saving,Publish,Pivot,WebData,Smart,
andStructured
16 Collaborating Sharing,Comments,Tracking,
MergeTarget,Owner,Buyer,Protection,
andSignature
UninstallingthePracticeFiles
Afteryoufinishworkingthroughthisbook,youshoulduninstallthepracticefilesto
freeupharddiskspace.
1 OntheWindowstaskbar,clicktheStartbutton,pointtoSettings,andthenclick
ControlPanel.
2 Double-clicktheAddorRemoveProgramsicon.
3 ClickMicrosoftOfficeExcel2003StepbyStep,andclickChange/Remove.
4 ClickOKwhentheconfirmationdialogboxappears.
Important Ifyouneedadditionalhelpinstallingoruninstallingthepractice
files,pleaseseethesectionGettingHelpearlierinthisbook.Microsoftsproduct
supportdoesnotprovidesupportforthisbookoritsCD-ROM.
xiv
Microsoft
Office
Specialis
Newin
Office2003
ConventionsandFeatures
YoucansavetimewhenyouusethisbookbyunderstandinghowtheStepbyStep
seriesshowsspecialinstructions,keystopress,buttonstoclick,andsoon.
Convention Meaning
1
Numberedstepsguideyouthroughhands-onexercisesin
2
eachtopic.
Aroundbulletindicatesanexercisethathasonlyonestep.
Thisiconatthebeginningofachapterliststhefilesthatthe
lessonwilluseandexplainsanyfilepreparationthatneedsto
takeplacebeforestartingthelesson.
OPEN:PracticeFile Practicefilesthatyoullneedtouseinatopicsprocedureare
shown.
ThisiconindicatesasectionthatcoversaMicrosoftOffice
Microsoft
Office
Specialist(MOS)examobjective.
Specialistt
Newin
Thisiconindicatesaneworgreatlyimprovedfeatureinthis
Office2003
versionofMicrosoftExcel.
Tip
Thissectionprovidesahelpfulhintorshortcutthatmakes
workingthroughataskeasier.
Important
Thissectionpointsoutinformationthatyouneedtoknowto
completetheprocedure.
Troubleshooting
Thissectionshowsyouhowtofixacommonproblem.
Whenabuttonisreferencedinatopic,apictureofthebutton
appearsinthemarginareawithalabel.
Save
J+D
Aplussign(+)betweentwokeynamesmeansthatyou
mustpressthosekeysatthesametime.Forexample,
PressJ+DmeansthatyouholddowntheAltkeywhile
youpressTab.
(continued)
xv
ConventionsandFeatures
Convention Meaning
Boldfacetype Programfeaturesthatyouclickorpressareshowninblack
boldfacetype.
Blue italic type Termsthatareexplainedintheglossaryattheendofthe
bookareshowninblueitalictypewithinthechapter.
Bluetype Textthatyouaresupposedtotypeappearsinblueboldface
typeintheprocedures.
xvi
Microsoft
Office
Specialis
MicrosoftOfficeSpecialist
SkillsStandards
EachMicrosoftOfficeSpecialistcertificationhasasetofcorrespondingskillstandards
thatdescribeareasofindividual,MicrosoftOfficeprogramuse.Youshouldmaster
eachskillstandardtofullyprepareforthecorrespondingMicrosoftOfficeSpecialist
certificationexam.
ThisbookwillfullyprepareyoufortheMicrosoftOfficeSpecialistcertificationat
eithertheSpecialistortheExpertlevel.Throughoutthisbook,contentthatpertainsto
aMicrosoftOfficeSpecialistskillsstandardisidentifiedwiththefollowingMicrosoft
OfficeSpecialistlogointhemargin:
Microsoft
Office
Specialistt
MicrosoftOfficeSpecialistSkillStandards
SkillNumber SkillSetandSkills Page
XL03S-1 CreatingDataandContent
XL03S-1-1 Enterandeditcellcontent 11,17
XL03S-1-2 Navigatetospecificcellcontent 17,291
XL03S-1-3 Locate,select,andinsertsupporting 17
information
XL03S-1-4 Insert,position,andsizegraphics 34
XL03S-2 AnalyzingData
XL03S-2-1 FilterlistsusingAutoFilter 84
XL03S-2-2 Sortlists 120
XL03S-2-3 Insertandmodifyformulas 44
XL03S-2-4 Usestatistical,dateandtime,financial,and 44
logicalfunctions
XL03S-2-5 Create,modify,andpositiondiagramsand 174,190
chartsbasedonworksheetdata
(continued)
xvii
MicrosoftOfficeSpecialistSkillsStandards
SkillNumber SkillSetandSkills Page
XL03S-3 FormattingDataandContent
XL03S-3-1 Applyandmodifycellformats 58
XL03S-3-2 Applyandmodifycellstyles 62
XL03S-3-3 Modifyrowandcolumnformats 25,58
XL03S-3-4 Formatworksheets 101
XL03S-4 Collaborating
XL03S-4-1 Insert,view,andeditcomments 291
XL03S-5 ManagingWorkbooks
XL03S-5-1 Createnewworkbooksfromtemplates 98
XL03S-5-2 Insert,delete,andmovecells 25
XL03S-5-3 Createandmodifyhyperlinks 239
XL03S-5-4 Organizeworksheets 25,101
XL03S-5-5 Previewdatainotherviews 101,197
XL03S-5-6 Customizewindowlayout 32,98
XL03S-5-7 Setuppagesforprinting 73,76
XL03S-5-8 Printdata 197
XL03S-5-9 Organizeworkbooksusingfilefolders 3,266
XL03S-5-10 Savedatainappropriateformatsfordifferent 3
uses
MicrosoftOfficeSpecialistExpertSkillStandards
SkillNumber SkillSetandSkills Page
XL03E-1 OrganizingandAnalyzingData
XL03E-1-1 Usesubtotals 89
XL03E-1-2 Defineandapplyadvancedfilters 84
XL03E-1-3 Groupandoutlinedata 124
XL03E-1-4 Usedatavalidation 91
XL03E-1-5 Createandmodifylistranges 280
XL03E-1-6 Add,show,close,edit,merge,and 132
summarizescenarios
xviii
MicrosoftOfficeSpecialistSkillsStandards
SkillNumber SkillSetandSkills Page
XL03E-1-7 Performdataanalysisusingautomatedtools 138,141,146
XL03E-1-8 CreatePivotTableandPivotChartreports 154,185
XL03E-1-9 Uselookupandreferencefunctions 248
XL03E-1-10 Usedatabasefunctions 257
XL03E-1-11 Traceformulaprecedents,dependents,and 50
errors
XL03E-1-12 Locateinvaliddataandformulas 91
XL03E-1-13 Watchandevaluateformulas 50
XL03E-1-14 Define,modify,andusenamedranges 42
XL03E-1-15 StructureworkbooksusingXML 277
XL03E-2 FormattingDataandContent
XL03E-2-1 Createandmodifycustomdataformats 64
XL03E-2-2 Useconditionalformatting 69
XL03E-2-3 Formatandresizegraphics 34
XL03E-2-4 Formatchartsanddiagrams 174,180,190
XL03E-3-1 Protectcells,worksheets,andworkbooks 298
XL03E-3-2 Applyworkbooksecuritysettings 298,303
XL03E-3-3 Shareworkbooks 288
XL03E-3-4 Mergeworkbooks 296
XL03E-3-5 Track,accept,andrejectchangesto 293
workbooks
XL03E-4 ManagingDataandWorkbooks
XL03E-4-1 ImportdatatoExcel 234,272
XL03E-4-2 ExportdatafromExcel 234,237
XL03E-4-3 PublishandeditWebworksheetsand 266
workbooks
XL03E-4-4 Createandedittemplates 98
XL03E-4-5 Consolidatedata 110
XL03E-4-6 Defineandmodifyworkbookproperties 3
(continued)
XL03E-3 Collaborating
xix
MicrosoftOfficeSpecialistSkillsStandards
SkillNumber SkillSetandSkills Page
XL03E-5 CustomizingExcel
XL03E-5-1 Customizetoolbarsandmenus 223,226
XL03E-5-2 Create,edit,andrunmacros 216,220
XL03E-5-3 ModifyExceldefaultsettings 25,57,98
xx
TakingaMicrosoftOffice
SpecialistCertificationExam
Asdesktopcomputingtechnologyadvances,moreemployersrelyontheobjectivity
andconsistencyoftechnologycertificationwhenscreening,hiring,andtraining
employeestoensurethecompetenceoftheseprofessionals.Asajobseekeror
employee,youcanusetechnologycertificationtoprovethatyouhavetheskillsbusi-
nessesneed,andcansavethemthetroubleandexpenseoftraining.MicrosoftOffice
SpecialististheonlyMicrosoftcertificationprogramdesignedtoassistemployeesin
validatingtheirMicrosoftOfficeskills.
AbouttheMicrosoftOfficeSpecialistProgram
AMicrosoftOfficeSpecialistisanindividualwhohasdemonstrated,worldwidestan-
dardsofMicrosoftOfficeskillviaacertificationexaminoneormoreoftheMicrosoft
OfficedesktopprogramsincludingMicrosoftWord,Excel,PowerPoint,Outlook,
Access,andProject.MicrosoftOfficeSpecialistcertificationsareavailableattheSpe-
cialistandExpertskilllevels.Visithttp://www.microsoft.com/officespecialisttolocate
skillstandardsforeachcertificationandanAuthorizedTestingCenterinyourarea.
WhatDoesThisLogoMean?
ThisMicrosoftOfficeSpecialistlogomeansthiscoursewarehasbeenapprovedby
theMicrosoftOfficeSpecialistProgramtobeamongthefinestavailableforlearning
Excel2003.Italsomeansthatuponcompletionofthiscourseware,youmaybepre-
paredtobecomeaMicrosoftOfficeSpecialist.
SelectingaMicrosoftOfficeSpecialist
CertificationLevel
InselectingtheMicrosoftOfficeSpecialistcertification(s)levelthatyouwouldliketo
pursue,youshouldassessthefollowing:
TheOfficeprogram(program)andversion(s)ofthatprogramwithwhichyou
arefamiliar
Thelengthoftimeyouhaveusedtheprogram
Whetheryouhavehadformalorinformaltrainingintheuseofthatprogram
xxi
TakingaMicrosoftOfficeSpecialistCertificationExam
CandidatesforSpecialist-levelcertificationareexpectedtosuccessfullycompletea
widerangeofstandardbusinesstasks,suchasformattingadocumentorspreadsheet.
Successfulcandidatesgenerallyhavesixormoremonthsofexperiencewiththepro-
gram,includingeitherformalinstructor-ledtrainingorself-studyusingMicrosoft
OfficeSpecialistapprovedbooks,guides,orinteractivecomputer-basedmaterials.
CandidatesforExpert-levelcertificationareexpectedtocompletemorecomplex,
business-orientedtasksutilizingtheprogramsadvancedfunctionality,suchas
importingdataandrecordingmacros.Successfulcandidatesgenerallyhaveoneor
moreyearsofexperiencewiththeprogram,includingformalinstructor-ledtrainingor
self-studyusingMicrosoftOfficeSpecialistapprovedmaterials.
MicrosoftOfficeSpecialistSkillsStandards
EveryMicrosoftOfficeSpecialistcertificationexamisdevelopedfromasetofexam
skillsstandardsthatarederivedfromstudiesofhowtheOfficeprogramisusedinthe
workplace.Becausetheseskillsstandardsdictatethescopeofeachexam,theypro-
videyouwithcriticalinformationonhowtoprepareforcertification.
SeeAlso SeeMicrosoftOfficeSpecialistSkillsStandardsonpagexviiforacompletelist
ofskillsstandardsforExcel.
MicrosoftOfficeSpecialistApprovedCourseware,includingtheMicrosoftPressStep
byStepseries,arereviewedandapprovedonthebasisoftheircoverageofthe
MicrosoftOfficeSpecialistskillsstandards.
TheExamExperience
MicrosoftOfficeSpecialistcertificationexamsforOffice2003programsare
performanced-basedexamsthatrequireyoutocomplete15to20standardbusiness
tasksusinganinteractivesimulation(thatis,digitalmodels)ofaMicrosoftOfficepro-
gram.Examquestionscanhaveone,two,orthreetaskcomponents,which,for
example,requireyoutocreateormodifyadocumentorspreadsheet:
Modifytheexistingbrochurebycompletingthefollowingthreetasks:
1 Left-aligntheheadingPremium Real Estate.
2 Insertafooterwithright-alignedpagenumbering.(Note:acceptallotherdefault
settings.)
3 SavethedocumentwiththefilenameBrokerBrochureintheMyDocumentsfolder.
Candidatesshouldalsobeawarethateachexammustbecompletedwithinanalloted
timeof45minutesandthat,intheinterestoftestsecurityandfairness,theOffice
Helpsystem(includingtheOfficeAssistant)cannotbeaccessedduringtheexam.
xxii
TakingaMicrosoftOfficeSpecialistCertificationExam
Passingstandards(thatis,minimumrequiredscore)forMicrosoftOfficeSpecialist
certificationexamsrangefrom60to85percentcorrect,dependingontheexam.
TheExamInterfaceandControls
Theexaminterfaceandcontrols,includingthetestquestion,appearacrossthebot-
tomofthescreen.
Timer Nextbutton
Counter Zoombutton Resetbutton
TheCounterislocatedintheleftcorneroftheexaminterfaceandtracksthe
numberofquestionscompletedandhowmanyquestionsremain.
TheTimerislocatedtotherightoftheCounterandstartswhenthefirstquestion
appearsonthescreen.TheTimerdisplaystheremainingexamtime.IftheTimer
isdistracting,clicktheTimertoremovethedisplay.
Important Transitiontimebetweenquestionsisnotcountedagainsttotal
allottedexamtime.
TheZoomiconislocatedtotherightoftheTimerontheexaminterface.Itlets
youincreaseordecreasethefontsizeofthequestiontextbyclickingtheplus
orminussymbol.
xxiii
TakingaMicrosoftOfficeSpecialistCertificationExam
TheResetbuttonislocatedtotheleftoftheNextbuttonandwillrestartaques-
tionifyoubelieveyouhavemadeanerror.TheResetbuttonwillnotrestartthe
entireexamnorextendthetotalallottedexamtime.
TheNextbuttonislocatedintherightcorner.Whenyoucompleteaquestion,
clicktheNextbuttontomovetothenextquestion.Itisnotpossibletomove
backtoapreviousquestionontheexam.
Test-TakingTips
Followallinstructionsprovidedineachquestioncompletelyandaccurately.
Enterrequestedinformationasitappearsintheinstructions,butwithoutdupli-
catingtheformat.Forexample,alltextandvaluesthatyouwillbeaskedto
enterwillappearintheinstructionswithboldandunderlinedtextformats(for
example,text);however,youshouldentertheinformationwithoutapplying
theseformatsunlessyouarespecificallyinstructedtodootherwise.
Closealldialogboxesbeforeproceedingtothenextexamquestionunlessyou
arespecificallyinstructedotherwise.
Thereisnoneedtoclosetaskpanesbeforeproceedingtothenextexamques-
tionunlessyouarespecificallyinstructedotherwise.
Thereisnoneedtosaveyourworkbeforemovingontothenextquestion
unlessyouarespecificallyinstructedtodootherwise.
Forquestionsthataskyoutoprintadocument,spreadsheet,chart,report,slide,
andsoon,pleasebeawarethatnothingwillactuallybeprinted.
Responsesarescoredbasedontheresultofyourwork,notthemethodyouuse
toachievethatresult(unlessaspecificmethodisindicatedintheinstructions),
andnotthetimeyoutaketocompletethequestion.Extrakeystrokesormouse
clicksdonotcountagainstyourscore.
Ifyourcomputerbecomesunstableduringtheexam(forexample,iftheexam
doesnotrespondorthemousenolongerfunctions)orifapoweroutage
occurs,contactatestingcenteradministratorimmediately.Theadministrator
willrestartthecomputerandreturntheexamtothepointwheretheinterrup-
tionoccurredwithyourscoreintact.
Certification
Attheconclusionoftheexam,youwillreceiveascorereport,whichyoucanprint
withtheassistanceofthetestingcenteradministrator.Ifyourscoremeetsorexceeds
thepassingstandard(thatis,minimumrequiredscore),youwillalsobemaileda
printedcertificatewithinapproximately14days.
xxiv
TakingaMicrosoftOfficeSpecialistCertificationExam
CollegeCreditRecommendation
TheAmericanCouncilonEducation(ACE)hasissuedaone-semester-hourcollege
creditrecommendationforeachMicrosoftOfficeSpecialistcertification.Tolearn
more,visitwww.microsoft.com/traincert/mcp/officespecialist/credit.asp.
ForMoreInformation
TolearnmoreaboutMicrosoftOfficeSpecialistcertification,visitwww.microsoft.com/
officespecialist.
xxv
QuickReference
Chapter1 GettingtoKnowExcel
Page4 Toopenaworkbook
1 OntheStandardtoolbar,clicktheOpenbutton.
2 ClicktheLookIndownarrow,andselecttheharddiskwhereyoustoredthefile.
3 Locateanddouble-clickthetargetfoldertodisplayitscontents.
4 Double-clickthetargetfiletoopenit.
Page5 Tosaveaworkbook
1 OntheStandardtoolbar,clicktheSavebutton.
2 Navigatetothefolderwhereyouwanttosavetheworkbook.
3 IntheFilenamebox,deletetheexistingfilenameandtypethenameforyourfile.
4 ClickSave.
Page5 Tosaveaworkbookwithadifferentfilename,location,andformat
1 OntheFilemenu,clickSaveAs.
2 Navigatetothefolderwhereyouwanttosavetheworkbook.
3 IntheFilenamebox,deletetheexistingfilenameandtypethenameforyourfile.
4 ClicktheSaveastypedownarrowtoexpandthelist,andclickthedesiredtype.
5 ClickSave.
Page5 Tosetworkbookproperties
1 OntheFilemenu,clickProperties.
2 OntheSummarytabpage,typevaluesforworkbookpropertiesintheboxes.
3 ClicktheCustomtab.
4 Clickthepropertyforwhichyouwanttoassignavalue,andtypethevalueinthe
Valuebox.
5 ClickOK.
Page8 Tomovetoaworksheet
InthelowerleftcorneroftheMicrosoftExcelwindow,clicktheappropriate
sheettab.
xxvii
QuickReference
Page8 Toselectoneormorecells
Clickthefirstcelltobeselected,anddragtothelastcelltobeselected.
Page6 Toselectanoncontiguousgroupofcells
WhileholdingdowntheHkey,clickthecellstobeselected.
Page10 Toselectoneormorecolumnsorrows
1 Clickthecolumnorrowheadforthecolumnorrowtobeselected.
2 Ifnecessary,dragtotheroworcolumnheadattheedgeofthegrouptobe
selected.
Page13 Tocreateanewworkbook
OntheStandardtoolbar,clicktheNewbutton.
Page14 Toenterdatamanually
1 Clickthecellinwhichyouwanttoenterthedata.
2 Typethedata,andpressF.
Page14 Toquicklyenteraseriesofdata
1 Clickthefirstcellinwhichyouwanttoenterdata.
2 Typeavalue,andpressF.
3 Inthenewcell,typethesecondvalueintheseries.
4 Grabthefillhandle,anddragittothelastcelltobefilledwithdata.
Page16 Toenterdatainmultiplecells
1 Clickacell,andtypethedatatoappearinmultiplecells.
2 Selectthecellsinwhichyouwantthedataintheactivecelltoappear.
3 PressH+F.
Page17 Tofindspecificdata
1 OntheEditmenu,clickFind.
2 IntheFindwhatbox,typethewordortextyouwanttofind,andthenclickFind
Next.
3 ClickFindNextagaintofindsubsequentoccurrencesofthetext.
Page18 Toreplacespecificdata
1 OntheEditmenu,clickReplace.
2 IntheFindwhatbox,typethewordortextyouwanttoreplace.
xxviii
QuickReference
3 IntheReplacewithbox,typethewordortextyouwanttosubstituteforthetextin
theFindwhatbox.
4 ClickFindNext.
5 ClickReplacetoreplacethevalueinthehighlightedcell.
Page5 Toreplacecelldatamanually
1 Clickthecellwiththedatatobereplaced.
2 Typethenewdata,andpressF.
Page6 Tomodifycelldatamanually
1 Clickthecellwiththedatatobemodified.
2 Clickanywhereintheformulabar.
3 Editthecellcontentsintheformulabar,andpressF.
Page20 Tochangeanaction
1 ClicktheUndobuttontoremovethelastchange.
2 ClicktheRedobuttontoreinstatethelastchangeyouremoved.
Page20 Tocheckspelling
OntheStandardtoolbar,clicktheSpellingbutton.
Page21 ToimprovewordchoiceusingtheThesaurus
1 OntheToolsmenu,clickResearch.
2 IntheResearchtaskpane,typethewordtolookupintheSearchForbox.
3 ClicktheReferencedownarrow,selectThesaurus:English(U.S.)fromthelist,and
clicktheStartSearchingbutton.
Page21 Touseonlineresearchtools
1 OntheToolsmenu,clickResearch.
2 IntheResearchtaskpane,typethewordtolookupintheSearchForbox.
3 ClicktheReferencedownarrow,selectthesourceinwhichyouwanttoresearch
fromthelist,andclicktheStartSearchingbutton.
Chapter2 SettingUpaWorkbook
Page29 Tonameaworksheet
1 Inthelowerleftcorneroftheworkbookwindow,right-clickthedesiredsheettab.
2 Fromtheshortcutmenuthatappears,clickRename.
3 Typethenewnamefortheworksheet,andpressF.
xxix
QuickReference
Page29 Torepositionaworksheet
Clickthesheettaboftheworksheetyouwanttomove,anddragittothenew
positiononthetabbar.
Page26 Tochangethedefaultnumberofworksheets
1 OntheToolsmenu,clickOptions.
2 IntheOptionsdialogbox,clicktheGeneraltab,and,intheSheetsInNewWork-
bookbox,typethenumberofworksheetsyouwantinyournewworkbooks.
3 ClickOK.
Page29 Toadjustcolumnwidth
Positionthemousepointeroveranedgeofthecolumnheadofthecolumntobe
resized,anddragtheedgetotheside.
Page29 Toadjustrowheight
Positionthemousepointeroveranedgeoftherowheadintherowtobe
resized,anddragtheedgeupordown.
Page30 Tomergecells
1 Selectthecellstobemerged.
2 OntheFormattingtoolbar,clicktheMergeandCentertoolbarbutton.
Page26 Toaddcellstoaworksheet
1 OntheInsertmenu,clickCells.
2 IntheInsertdialogbox,selecttheoptionbuttonindicatingwhethertoshiftthecells
surroundingtheinsertedcelldown(ifyourdataisarrangedasacolumn)ortothe
right(ifyourdataisarrangedasarow).
3 ClickOK.
Page28 Tomovecellswithinaworksheet
1 SelectthecellsandclicktheCuttoolbarbutton.
2 OntheInsertmenu,clickCutCells.
3 IntheInsertPastedialogbox,selecttheoptionbuttonindicatingwhethertoshift
thecellssurroundingtheinsertedcelldown(ifyourdataisarrangedasacolumn)
ortotheright(ifyourdataisarrangedasarow).
4 ClickOK.
xxx
QuickReference
Page28 Todeletecellsfromaworksheet
1 Selectthecellstodeleteand,ontheEditmenu,clickDelete.
2 IntheDeletedialogbox,selecttheoptionbuttonindicatingwhethertoshiftthe
cellssurroundingthedeletedcellsup(ifyourdataisarrangedasacolumn)orto
theleft(ifyourdataisarrangedasarow).
3 ClickOK.
Page30 Toaddaroworcolumn
1 Clickanycellintherowbelowwhichyouwantthenewrowtoappear,orclickany
cellinthecolumntotherightofwhichyouwantthenewcolumntoappear.
2 OntheInsertmenu,clickRowsorColumns.
Page30 Tohidearoworcolumn
1 Selectanycellintheroworcolumntobehidden.
2 OntheFormatmenu,pointtoRoworColumnandthenclickHide.
Page31 Tounhidearoworcolumn
OntheFormatmenu,pointtoRoworColumnandthenclickUnhide.
Page33 Topreventtextspillover
1 Clickthedesiredcell.
2 OntheFormatmenu,clickCells.
3 Ifnecessary,clicktheAlignmenttab.
4 SelecttheWrapTextcheckbox,andclickOK.
Page33 Tocontrolhowtextappearsinacell
1 Clickthedesiredcell.
2 OntheFormatmenu,clickCells.
3 UsethecontrolsintheFormatCellsdialogboxtochangetheappearanceofthecell
text.
Page34 Tofreezecolumnheadings
1 Clickthefirstcellintherowbelowtherowsyouwanttofreeze.
2 OntheWindowmenu,clickFreezePanes.
Page34 Tounfreezecolumnheadings
OntheWindowmenu,clickUnfreezePanes.
xxxi
QuickReference
Page35 Toaddapicturetoaworksheet
1 Clickthecellintowhichyouwanttoaddthepicture.
2 OntheInsertmenu,pointtoPictureandthenclickFromFile.
3 Navigatetothefolderwiththepicturefile,andthendouble-clickthefilename.
Page36 Tochangeapicturesproperties
1 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
2 UsethecontrolsintheFormatPicturedialogboxtochangethepictures
properties.
Page37 Tocontrolcontrastofanimage
1 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
2 ClickthePicturetab.
3 IntheImageControlsectionofthedialogbox,clearthecontentsoftheContrast
box,andtypethenewcontrastvalue.
Page37 Tocontrolthebrightnessofanimage
1 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
2 ClickthePicturetab.
3 IntheImageControlsectionofthedialogbox,clearthecontentsoftheBrightness
box,andtypethenewbrightnessvalue.
Page37 Toscaleandresizegraphics
1 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
2 ClicktheSizetab.
3 SelecttheLockAspectRatiocheckboxifyouwanttomaintaintherelationship
betweentheimagesheightanditswidth.
4 TypethepercentagevalueyouwouldlikethenewimagetobeintheHeightbox.
5 ClickOK.
Page37 Torotateanimage
1 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
2 ClicktheSizetab.
xxxii
QuickReference
3 TypethenumberofdegreestorotatetheimageintheRotationbox.
Page37 Tocropanimage
1 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
2 ClickthePicturetab.
3 IntheCropFromsectionofthetabpage,typetheamountoftheimageyouwantto
cropintheTop,Bottom,Left,andRightboxes.
Page37 Toaddabackgroundimagetoaworksheet
1 OntheFormatmenu,pointtoSheet,andclickBackground.
2 IntheSheetBackgrounddialogbox,clicktheimagethatyouwanttoserveasthe
backgroundpatternforyourworksheet,andclickOK.
Chapter3 PerformingCalculationsonData
Page42 Tonamearangeofcells
1 Selectthecellstobeincludedintherange.
2 ClickintheNamebox.
3 Typethenameoftherange,andpressF.
Page43 Tonamearangeofcellsusingadjacentcelllabels
1 Ensurethatthedesirednameforthecellrangeisinthetopmostorleftmostcellof
therange.
2 Selectthecellstobepartoftherange.
3 OntheInsertmenu,pointtoNameandthenclickCreate.
4 Selectthecheckboxindicatingthelocationofthecellwiththenamefortherange,
andthenclickOK.
Page48 Towriteaformula
1 Clickthecellintowhichtheformulawillbewritten.
2 Typeanequalsign,andthentypetheremainderoftheformula.
Page48 Toenterarangeintoaformula
1 Clickthecellintowhichtheformulawillbewritten.
2 Typeanequalsign,andthentypethefirstpartoftheformula.
3 Selectthecellstobeusedintheformula.
4 Finishtypingtheformula.
xxxiii
QuickReference
Page49 Tocopyaformulatoanothercell
1 Clickthecellcontainingtheformula.
2 OntheStandardtoolbar,clicktheCopybutton.
3 Clickthecellintowhichtheformulawillbepasted.
4 OntheStandardtoolbar,clickthePastebutton.
Page49 Tocreateaformulawithafunction
1 Clickthecellwhereyouwanttocreatetheformula.
2 OntheInsertmenu,clickFunction.
3 Clickthefunctionyouwanttouse,andthenclickOK.
4 Typetheargumentsforthefunctionintheargumentboxes,andthenclickOK.
Page50 Tocreateaformulawithaconditionalfunction
1 Clickthecellwhereyouwanttocreatetheformula.
2 OntheInsertmenu,clickFunction.
3 IntheSelectAFunctionlist,clickIF,andthenclickOK.
4 IntheLogical_testbox,typethetesttouse.
5 IntheValue_if_truebox,typethevaluetobeprintedifthelogicaltestevaluatesto
true.(Encloseatextstringinquotes.)
6 IntheValue_if_falsebox,typethevaluetobeprintedifthelogicaltestevaluatesto
false.(Encloseatextstringinquotes.)
Page53 Totraceprecedentsordependents
1 Clickthecellfromwhichtotraceprecedentsordependents.
2 OntheToolsmenu,pointtoFormulaAuditingandthenclickTracePrecedentsor
TraceDependents.
Page54 Toremovetracerarrows
OntheToolsmenu,pointtoFormulaAuditingandthenclickRemoveAllArrows.
Page54 TousetheErrorCheckingtool
1 Clickthecellcontainingtheerror.
2 OntheToolsmenu,clickErrorChecking.
3 UsethecontrolsintheErrorCheckingdialogboxtoexaminetheformulacontaining
theerror.
xxxiv
QuickReference
Page54 Toevaluateaformula
1 Clickthecellcontainingtheformula.
2 OntheToolsmenu,pointtoFormulaAuditingandthenclickEvaluateFormula.
3 UsethecontrolsintheEvaluateFormuladialogboxtoexaminetheformulacontain-
ingtheerror.
Page53 Towatchhowthevalueinacellchanges
1 Clickthecellyouwanttowatch.
2 OntheToolsmenu,pointtoFormulaAuditingandthenclickShowWatchWindow.
3 ClickAddWatch.
4 ClickAdd.
Page55 Todeleteawatch
1 Ifnecessary,ontheToolsmenu,pointtoFormulaAuditingandthenclickShow
WatchWindow.
2 Inthewatchwindow,clickthewatchyouwanttodelete.
3 ClickDeleteWatch.
Chapter4 ChangingDocumentAppearance
Page61 Tochangethedefaultfontsettings
1 OntheToolsmenu,clickOptions.
2 ClicktheGeneraltab.
3 ClicktheStandardFontdownarrow,andselectthefonttouse.
4 ClicktheSizedownarrow,andselectthesizeforthedefaultfont.
Page60 Tochangecellformatting
1 Clickthecellyouwanttochange.
2 OntheFormattingtoolbar,clickthebuttoncorrespondingtotheformattingyouwant
toapply.
Page61 Toaddcellborders
1 OntheFormattingtoolbar,clicktheBordersbuttonsdownarrowandthen,fromthe
listthatappears,clickDrawBorders.
2 Clickthecelledgeonwhichyouwanttodrawaborder.
3 Dragthemousepointertodrawaborderaroundagroupofcells.
xxxv
QuickReference
Page61 Toaddcellshading
1 Clickthecelltobeshaded.
2 OntheFormattingtoolbar,clicktheFillColorbutton.
3 IntheFillColorcolorpalette,clickthedesiredsquare,andthenclickOK.
Page61 Tochangeroworcolumnalignment
1 Clicktheheaderoftheroworcolumnyouwanttochange.
2 OntheFormattingtoolbar,clickthebuttoncorrespondingtothealignmentyouwant
toapply.
Page63 Tocreateastyle
1 OntheFormatmenu,clickStyle.
2 IntheStylenamebox,deletetheexistingvalueandthentypeanameforthenew
style.
3 ClickModify,anddefinethestylewiththecontrolsoftheFormatCellsdialogbox.
4 ClickOKintheFormatCellsdialogboxandtheStylesdialogbox.
Page64 Tocopyaformat
1 Clickthecellwiththeformattobecopied.
2 OntheStandardtoolbar,clicktheFormatPainterbutton.
3 Clickthecellorcellstowhichthestyleswillbecopied.
Page64 ToapplyanAutoFormat
1 SelectthecellstowhichyouwanttoapplytheAutoFormat.
2 OntheFormatmenu,clickAutoFormat.
3 SelecttheAutoFormatyouwanttoapply,andthenclickOK.
Page66 Toformatanumber
1 Clickthecellwiththenumbertobeformatted.
2 OntheFormatmenu,clickCells.
3 Ifnecessary,clicktheNumbertab.
4 IntheCategorylist,clickthegeneralcategoryfortheformatting.
5 IntheTypelist,clickthespecificformat,andthenclickOK.
Page58 Toformatanumberasadollaramount
1 Clickthecellwiththenumbertobeformatted.
2 OntheFormattingtoolbar,clicktheCurrencyStylebutton.
xxxvi
QuickReference
Page68 Tocreateacustomformat
1 OntheFormatmenu,clickCells.
2 IntheCategorylist,clickCustom.
3 IntheTypelist,clicktheitemtoserveasthebaseforthecustomstyle.
4 IntheTypebox,modifytheitem,andthenclickOK.
Page71 Tocreateaconditionalformat
1 Clickthecelltobeformatted.
2 OntheFormatmenu,clickConditionalFormatting.
3 Inthesecondlistbox,clickthedownarrowandthenclicktheoperatortouseinthe
test.
4 Typetheargumentstouseinthecondition.
5 ClicktheFormatbutton,andusethecontrolsintheFormatCellsdialogboxtocre-
ateaformatforthiscondition.
6 ClickOK.
Page72 Tosetmultipleconditionsforacell
1 Clickthecelltobeformatted.
2 Createaconditionalformat,andthenclickAdd.
3 Createanewconditionandformatinthespacesprovided.
Page74 Toaddaheaderorafooter
1 OntheViewmenu,clickHeaderandFooter.
2 ClicktheCustomHeaderorCustomFooterbutton.
3 Addtextorimages,andclickOK.
Page74 Toaddagraphictoaheaderorfooter
1 Createaheaderorfooter.
2 Clickanywhereinoneofthesectionboxes,andthenclicktheInsertPicturebutton.
3 Navigatetothefolderwiththeimagefile,double-clickthefilename,andthen
clickOK.
Page78 Tochangemargins
1 OntheStandardtoolbar,clickthePrintPreviewbutton.
2 ClickMargins.
3 Dragthemarginlinesinthewindowtothedesiredpositions.
xxxvii
QuickReference
Page79 Tochangepagealignment
1 OntheFilemenu,clickPageSetup.
2 Ifnecessary,clickthePagetab.
3 Selecttheappropriatealignmentoption.
Chapter5 FocusingonSpecificDataUsingFilters
Page85 Tofindthetoptenvaluesinalist
1 Clickthetopcellinthecolumntofilter.
2 OntheDatamenu,pointtoFilterandthenclickAutoFilter.
3 Clickthedownarrowthatappears,andthenclick(Top10...)inthelist.
4 IntheTop10AutoFilterdialogbox,clickOK.
Page86 Tofindasubsetofdatainalist
1 Clickthetopcellinthecolumntofilter.
2 OntheDatamenu,pointtoFilterandthenclickAutoFilter.
3 Clickthedownarrowthatappears,andfromthelistofuniquecolumnvaluesthat
appears,clickthevaluetouseasthefilter.
Page87 Tocreateacustomfilter
1 Clickthetopcellinthecolumntofilter.
2 OntheDatamenu,pointtoFilterandthenclickAutoFilter.
3 Clickthedownarrow,andthenclick(Custom)inthelist.
4 IntheupperleftboxoftheCustomAutoFilterdialogbox,clickthedownarrow,and
fromthelistthatappears,clickacomparisonoperator.
5 Typetheargumentsforthecomparisonintheboxesattheupperright,and
clickOK.
Page87 Toremoveafilter
OntheDatamenu,pointtoFilterandthenclickAutoFilter.
Page87 Tofilterforaspecificvalue
1 Clickthetopcellinthecolumntofilter.
2 OntheDatamenu,pointtoFilterandthenclickAutoFilter.
3 Clickthedownarrow,andthen,fromthelistofuniquecolumnvaluesthatappears,
clickthevalueforwhichyouwanttofilter.
xxxviii
QuickReference
Page88 Toselectarandomrowfromalist
1 Inthecellnexttothefirstcellwithdatainit,type=RAND()<#%,replacing#with
thenumberthatrepresentstheapproximatepercentageofrowsyouwanttomark
asTRUE.
2 PressD.
3 ClickthecellintowhichyouenteredtheRAND()formula,grabthefillhandle,and
dragtothecellnexttothelastcellinthedatacolumn.
Page88 Toextractalistofuniquevalues
1 Clickthetopcellinthecolumntofilter.
2 OntheDatamenu,pointtoFilterandthenclickAdvancedFilter.
3 SelecttheUniquerecordsonlycheckbox,andthenclickOK.
Page90 Tofindatotal
Selectthecellswiththevaluestobesummed.Thetotalappearsonthestatus
bar,inthelowerrightcorneroftheExcelwindow.
Page90 Toeditafunction
1 Clickthecellwiththefunctiontobeedited.
2 OntheInsertmenu,clickFunction.
3 EditthefunctionintheFunctiondialogbox.
Page93 Tosetacceptablevaluesforacell
1 Clickthecelltobemodified.
2 OntheDatamenu,clickValidation.
3 IntheAllowbox,clickthedownarrow,andfromthelistthatappears,clickthetype
ofdatatobeallowed.
4 IntheDatabox,clickthedownarrow,andfromthelistthatappears,clickthecom-
parisonoperatortobeused.
5 Typevaluesintheboxestocompletethevalidationstatement.
6 ClicktheInputMessagetab.
7 IntheTitlebox,typethetitleforthemessageboxthatappearswhenthecell
becomesactive.
8 IntheInputMessagebox,typethemessagetheuserwillseeinthemessagebox.
9 ClicktheErrorAlerttab.
xxxix
QuickReference
10 IntheStylebox,clickthedownarrow,andfromthelistthatappears,choosethe
typeofboxyouwanttoappear.
11 IntheTitlebox,typethetitleforthemessageboxthatappearswhenauserenters
invaliddata.
12 TypeareminderintheErrormessageboxexplainingtherestriction.
13 ClickOK.
Page93 Toallowonlynumericvaluesinacell
1 Clickthecelltobemodified.
2 OntheDatamenu,clickValidation.
3 IntheAllowbox,clickthedownarrow,andfromthelistthatappears,clickWhole
number.
4 ClickOK.
Page94 Tocircleinvaliddatainaworksheet
1 OntheToolsmenu,pointtoFormulaAuditing,andclickShowFormulaAuditing
Toolbar.
2 OntheFormulaAuditingtoolbar,clicktheCircleInvalidDatabutton.
Page94 Tohidedatavalidationcircles
1 OntheToolsmenu,pointtoFormulaAuditing,andclickShowFormulaAuditing
Toolbar.
2 OntheFormulaAuditingToolbar,clicktheClearValidationCirclesbutton.
Chapter6 CombiningDatafromMultipleSources
Page99 Todeleteaworksheet
Onthetabbar,inthelowerleftcorneroftheworkbookwindow,right-clickthetab
ofthesheettobedeleted,andfromtheshortcutmenuthatappears,click
Delete.
Page99 Tosaveadocumentasatemplate
1 OntheFilemenu,clickSaveAs.
2 ClicktheSaveastypedownarrow,andclickTemplate(.xlt).
Page100 Toeditatemplate
1 Clickthetemplateyouwanttoedit,andclickOpen.
2 Editthetemplateasifitwereanyotherfile.
xl
QuickReference
Page101 Tochangethedefaultlocationfortemplates
1 OntheToolsmenu,clickOptions.
2 Ifnecessary,clicktheGeneraltab.
3 IntheAtstartup,openallfilesinbox,typethepathofthefolderwhereExcelshould
lookforthefiles.
4 ClickOK.
Page103 Toopenmultipleworkbooks
1 OntheStandardtoolbar,clicktheOpenbutton.
2 HolddownHwhileyouclickthefilestoopen,andthenclickOpen.
Page104 TochangehowaworkbookisdisplayedinExcel
1 Openthefilestobedisplayed.
2 OntheWindowmenu,clickArrange.
3 IntheArrangeWindowsdialogbox,clicktheoptionbuttoncorrespondingtothe
desireddisplaypatternandclickOK.
Page104 Toinsertaworksheetinanexistingworkbook
1 Onthetabbar,right-clickthetabofthesheettomove,andthen,fromtheshortcut
menuthatappears,clickMoveorCopy.
2 ClicktheTobookdownarrow,andthen,fromthelistthatappears,clickthebookto
whichyouwanttomovetheworksheet.
3 IntheBeforesheetlist,clickthesheettoappearbehindthemovedsheet.
4 AtthebottomoftheMoveorCopydialogbox,selecttheCreateacopycheckbox.
5 ClickOK.
Page106 Tochangeworksheettabcolors
1 Onthetabbar,right-clickthetabtobechanged,andthen,fromtheshortcutmenu
thatappears,clickTabColor.
2 Clickthesquareofthedesiredcolor,andclickOK.
Page108 Tolinktoacellinanotherworksheet
1 Clickthecellfromwhichtolink,andthentype=.
2 Clickthetitlebaroftheworkbookcontainingthecelltolinkto.
3 Clickthecelltolinkto.
4 Clickthetitlebaroftheworkbookfromwhichtolink,andthenpressF.
xli
1
2
3
4
5
6
7
QuickReference
Page109 Tofixabrokenlink
1 Inthealertboxthatappearswhenyouopenaworkbookwithabrokenlink,click
Update.
2 ClickEditLinks.
3 ClickChangeSource.
4 Clicktheworkbookthatisthenewsourceofthelinkedcell.
5 IntheEditLinksdialogbox,clickClose.
Page112 Toconsolidatedata
Openallofthefilestobeconsolidated.
OntheDatamenu,clickConsolidate.
OntheWindowmenu,clickthenameofafilewithdatatobeconsolidated.
Selectthecellstoconsolidate,andclickAdd.
Repeatsteps3and4tochoosecorrespondingcellsinotherworksheets.
OntheWindowmenu,clickthenameofthefilethatwillholdthedatasummary.
IntheConsolidatedialogbox,clickOK.
Page114 Tosaveworkbooksinaworkspace
1 Openthefilestobesavedintheworkspace.
2 OntheFilemenu,clickSaveWorkspace.
3 IntheFilenamebox,typethenameoftheworkspace,andclickSave.
Page115 Toopenaworkspace
1 OntheStandardtoolbar,clicktheOpenbutton.
2 Double-clicktheworkspace.
Chapter7 ReorderingandSummarizingData
Page121 Tosortadatalist
1 Selectthecolumnofcellstobesorted.
2 OntheStandardtoolbar,clicktheSortAscendingorSortDescendingbutton.
Page122 Tosortadatalistbymultiplecolumns
1 Selectthecolumnsofcellstobesorted.
2 OntheDatamenu,clickSort.
3 Ifnecessary,clicktheSortbydownarrow,andthen,fromthelistthatappears,
clickthefirstcolumntosortby.
xlii
QuickReference
4 ClicktheThenbydownarrow,andthen,fromthelistthatappears,clickthenext
columntosortby.
5 Repeatstep4withthenextThenbydownarrow.
6 ClickOK.
Page123 Tosetacustomsortorder
1 Typeacustomlistandhighlightitscells.
2 OntheToolsmenu,clickOptions.
3 ClicktheCustomListstab.
4 ClickImport,andclickOK.
Page127 Tofindasubtotal
1 Selecttherowsforwhichyouwanttocalculateasubtotal.
2 OntheDatamenu,clickSubtotals.
3 ClickOK.
Page128 Tocreateanoutline
1 Selecttherowheadsoftherowstobeincludedintheoutline.
2 OntheDatamenu,pointtoGroupandOutlineandthenclickGroup.
Page128 Tocreateanoutlinewithmultiplelevels
1 Selecttherowheadsoftherowstobeincludedinthefirst,smallerlevelofthe
outline.
2 Selecttherowheadsoftherowstobeincludedinthesecond,largerlevelofthe
outline.
Page128 Tohidelevelsofdetail
ClicktheHideDetailbuttonforthelevelyouwanttohide.
Page129 Toshowlevelsofdetail
ClicktheShowDetailbuttonforthelevelyouwanttoshow.
Chapter8 AnalyzingAlternativeDataSets
Page133 Tocreateascenario
1 OntheToolsmenu,clickScenarios.
2 IntheScenarioManagerdialogbox,clickAdd.
3 IntheScenarionamebox,typethenameofthenewscenario.
4 AttherightedgeoftheChangingcellsbox,clicktheCollapseDialogbutton.
xliii
QuickReference
5 DeletethecontentsoftheAddScenariodialogbox,andthenholddownHwhile
youclickthecellstoincludeinthescenario.
6 AttherightedgeoftheChangingcellsbox,clicktheExpandDialogbutton.
7 ClickOK.
8 IntheScenarioValuesdialogbox,enterthealternativevaluesforeachcellinthe
scenario.
9 ClickOK,clickShow,andthenclickClose.
Page134 Toeditascenario
1 OntheToolsmenu,clickScenarios.
2 IntheScenarioManagerdialogbox,clickthenameofthescenariotobeedited.
3 ClickEdit.
4 Tochangethescenarioname,editthetextintheScenarionamebox.
5 Toaddordeletecellsfromthescenario,attherightedgeoftheChangingcellsbox,
clicktheCollapseDialogbutton.
6 ClickOK.
7 IntheScenarioValuesdialogbox,enterthealternativevaluesforeachcellinthe
scenario.
8 ClickOK,andclickClose.
Page136 Tocreatemultiplescenarios
1 OntheToolsmenu,clickScenarios.
2 IntheScenarioManagerdialogbox,clickAdd.
3 IntheScenarionamebox,typethenameofthenewscenario.
4 AttherightedgeoftheChangingcellsbox,clicktheCollapseDialogbutton.
5 DeletethecontentsoftheAddScenariodialogbox,andthenholddownHwhile
youclickthecellstoincludeinthescenario.
6 AttherightedgeoftheChangingcellsbox,clicktheExpandDialogbutton.
7 ClickOK.
8 IntheScenarioValuesdialogbox,enterthealternativevaluesforeachcellinthe
scenario.
9 ClickOK.
10 Repeatsteps2through9foreachadditionalscenario.
xliv
1
2
3
4
5
6
1
2
3
4
5
6
QuickReference
Page134 Toviewscenarios
1 OntheToolsmenu,clickScenarios.
2 IntheScenarioslist,clickthenameofthescenariotoshow.
3 ClickShow.
Page137 Tosummarizescenarios
OntheToolsmenu,clickScenarios.
ClicktheSummarybutton.
IntheResultcellsbox,clicktheCollapseDialogbutton.
Selectthecellstoappearinthesummary.
IntheResultcellsbox,clicktheExpandDialogbutton.
ClickOK.
Page140 Tofindrequiredvaluesforreachingatargetvalue
Clickthecelltoholdthetargetvalue.
OntheToolsmenu,clickGoalSeek.
IntheTovaluebox,typethetargetvaluefortheactivecell.
IntheBychangingcellbox,typetheaddressofthecelltovary.
ClickOK.
IntheGoalSeekStatusdialogbox,clickOK.
Page143 ToinstallanAdd-In
1 OntheToolsmenu,clickAdd-Ins.
2 SelectthecheckboxnexttotheAdd-Inyouwanttoinstall.
3 ClickOK.
Page143 ToprocessaSolverproblem
1 OntheToolsmenu,clickSolver.
2 ClickintheSetTargetCellbox,andclickthecellyouwanttosolvefor.
3 Selecttheoptionbuttonindicatingwhetheryouwanttominimizethetargetcell
value,maximizethetargetcellvalue,orsetthecelltoaparticularvalue.
4 ClickintheByChangingCellsbox,andselectthecellsSolvershouldvarytochange
thevalueinthetargetcell.
5 ClickAddtodisplaytheAddConstraintdialogbox.
6 Clickthecelltowhichyouwanttoaddtheconstraint.
xlv
QuickReference
7 Clickthedownarrowinthemiddlebox,andselecttheoperationyouwanttousein
theconstraint.
8 ClickintheConstraintbox,andeithertypeinthevaluefortheconstraint,orclick
thecellwiththevaluetobeusedastheconstraint.
9 ClickAdd.
10 Repeatsteps6through9asnecessarytoaddfurtherconstraints.
11 ClickCanceltoreturntotheSolverdialogbox.
12 ClickSolve.
13 ClickCanceltocloseSolverwithoutsavingyourchanges,clickSaveScenarioto
savethesolutionasascenario,orclickOKtokeeptheSolversolution.
Page147 TousetheAnalysisToolPak
1 OntheToolsmenu,clickDataAnalysis.
2 Clicktheitemrepresentingthetypeofanalysisyouwanttoperform.
3 ClickOK.
4 Usethecontrolsinthedialogboxthatappearstosetupyouranalysis.
5 ClickOK.
Chapter9 CreatingDynamicListswithPivotTables
Page157 TocreateaPivotTable
1 Clickanycellinthedatalist.
2 OntheDatamenu,clickPivotTableandPivotChartReport.
3 EnsurethattheMicrosoftExcellistordatabaseoptionbuttonisselectedinthetop
pane,identifyingyourworksheetasthedatasource,andthatthePivotTableoption
buttonisselectedinthebottompane.
4 ClickNexttomovetothenextpageofthewizard.
5 EnsurethatthepropercellrangeappearsintheRangebox.
6 ClickNexttomovetothenextpageofthewizard.
7 ClickFinish.
8 FromthePivotTableFieldListdialogbox,dragthefieldsforthehorizontalaxisto
theDropColumnFieldsHerebox.
9 FromthePivotTableFieldListdialogbox,dragthefieldsfortheverticalaxistothe
DropRowFieldsHerebox.
xlvi
QuickReference
10 FromthePivotTableFieldListdialogbox,dragthedatafieldtotheDropDataField
Herebox.
11 FromthePivotTableFieldListdialogbox,dragthefieldsforthepageareatothe
DropPageFieldsHerebox.
Page164 TofilteraPivotTable
1 Clickthedownarrowattherightedgeofanyfieldheading.
2 Fromthelistofvaluesthatappears,clickthevaluetouseasthefilter.
3 Ifthelistappearsasalistofvalueswithcheckboxesnexttothevalues,selectthe
checkboxesbesidethevaluestoappearinthePivotTable.
4 ClickAllfromthelisttoremoveafilter.
Page158 ToformatPivotTabledata
1 SelectthecellsinthePivotTabledataarea.
2 OntheFormatmenu,clickCells.
3 UsethecontrolsintheFormatCellsdialogboxtoformatthecellsinthePivotTable,
andclickOK.
Page158 ToapplyapredefinedformattoaPivotTable
1 IfthePivotTabletoolbarishidden,right-clickanytoolbarandthen,fromtheshort-
cutmenuthatappears,clickPivotTable.
2 ClickanycellinthePivotTable.
3 OnthePivotTabletoolbar,clicktheFormatReportbutton.
4 ClickthedesiredAutoFormat.
Page164 ToaddafieldtoaPivotTable
1 ClickanycellinthePivotTable.
2 IfthePivotTabletoolbarishidden,right-clickanytoolbarandthen,fromtheshort-
cutmenuthatappears,clickPivotTable.
3 IfthePivotTableFieldListdialogboxishidden,onthePivotTabletoolbar,clickthe
ShowFieldListbutton.
4 FromthePivotTableFieldListdialogbox,dragthenewfieldtothedesiredareaof
thePivotTable.
Page165 TochangeaPivotTableslayout
1 OnthePivotTabletoolbar,clickPivotTableandthenclickWizard.
2 ClickLayout.
3 Dragfieldstonewareas.
xlvii
QuickReference
4 ClickOK,andclickFinish.
5 YoucanalsodragfieldsdirectlyonthePivotCharttochangethelayout.
Page166 TorefreshPivotTabledata
1 ClickanycellinthePivotTable.
2 IfthePivotTabletoolbarishidden,right-clickanytoolbarandthen,fromtheshort-
cutmenuthatappears,clickPivotTable.
3 OnthePivotTabletoolbar,clicktheRefreshExternalDatabutton.
Page166 ToshoworhideunderlyingPivotTabledata
Double-clickacolumnorrowheadinaPivotTabletocollapseorexpandtherows
orcolumnsdefinedbythecolumnhead.
Page166 TocreatealinktoaPivotTablefield
1 ClickthecellyouwanttolinktothePivotTablefield,andtype=.
2 Onthetabbar,clickthesheettaboftheworksheetwiththePivotTable.
3 ClickthePivotTablecelltosupplythedatafortheothercell.
4 PressFtoaccepttheGETPIVOTDATA formulaExcelcreates.
Page169 Toimportatextfile
1 OntheDatamenu,pointtoImportExternalDataandthenclickImportData.
2 Navigatetothefolderwiththefiletobeimported,anddouble-clickthefilename.
3 Ifnecessary,selecttheDelimitedorFixedWidthoptionbuttontoidentifyhowcol-
umnsaremarkedinthetextfile.ClickNexttoaccepttheTextImportWizardssum-
maryofthetextfilesdata,andmovetothesecondpageofthewizard.
4 Ifnecessary,selectthecheckboxnexttotheproperdelimiterforthetextfile.Click
NexttoaccepttheTextImportWizardsanalysisofthetextfilesdata,andmoveto
thethirdpageofthewizard.
5 ClickFinishtoacceptthevaluesanddatatypesasassignedbythewizard.
6 ClickOKtopastetheimporteddataintotheactiveworksheet,beginningatthe
activecell.
Chapter10 CreatingCharts
Page177 Tocreateanembeddedchart
1 Selectthecellstoprovidedataforthechart.
2 OntheStandardtoolbar,clicktheChartWizardbutton.
xlviii
QuickReference
3 IntheCharttypesection,clickthedesiredcharttype;andthen,intheChartsub-
typesection,clickthedesiredsubtype.
4 ClickNexttomovetothenextwizardpage.
5 Verifythattheaxisanddataseriesnamesarecorrect.
6 ClickNexttomovetothenextwizardpage.
7 IntheCharttitlebox,typethenameofthechartandthenpressD.
8 Typenamesforthecharttitleandaxesintheboxesprovided,andthenclickNext.
9 ClickFinishtoacceptthedefaultchoicetocreatethechartaspartoftheactive
worksheet.
Page178 Toresizeachart
Grabthesizinghandleattheedgeofthechart,anddragittoresizethechart.
Page179 Tochangeachartsbackground
1 Right-clickanywhereintheChartAreaofthechart,andthen,fromtheshortcut
menuthatappears,clickFormatChartArea.
2 IntheAreasectionoftheFormatChartAreadialogbox,clicktheFillEffectsbutton.
3 ClicktheTexturetabtodisplaytheTexturetabpage.
4 Clickthedesiredtexture.
5 ClickOKtwicetoclosetheFillEffectsdialogboxandtheFormatChartArea
dialogbox.
Page182 Tocustomizechartlabels
1 Double-clickthechartlabeltobecustomized.
2 Usethecontrolsinthedialogboxthatappearstocustomizethechartlabel.
3 Tochangethetextofachartlabel,clickthelabelandedititinthetextboxthat
appears.
Page182 Tocustomizechartnumberformats
1 Double-clicktheaxisofthechartwiththenumberstobecustomized.
2 IntheFormatAxisdialogboxthatappears,clicktheNumbertab.
3 UsethecontrolsontheNumbertabpagetoformatthechartnumbers.
4 ClickOK.
xlix
QuickReference
Page185 Toperformtrendlineanalysis
1 Inachart,right-clickadatapointinthebodyofthechartandthen,fromtheshort-
cutmenuthatappears,clickAddTrendline.
2 Ifnecessary,intheTrend/Regressiontypesection,clickLinear.
3 ClicktheOptionstab.
4 IntheForecastsection,typethenumberofhorizontalaxisunitstolookaheadin
theForwardbox.ThenclickOK.
Page188 TocreateaPivotChart
1 Clickanycellinthedatalist.
2 OntheDatamenu,clickPivotTableandPivotChartReport.
3 EnsurethattheMicrosoftExcellistordatabaseoptionbuttonisselectedinthetop
pane,identifyingyourworksheetasthedatasource,andthatthePivotChartreport
(withPivotTablereport)optionbuttonisselectedinthebottompane.
4 ClickNexttomovetothenextpageofthewizard.
5 EnsurethatthepropercellrangeappearsintheRangebox.
6 ClickNexttomovetothenextpageofthewizard.
7 ClickFinish.
8 FromthePivotTableFieldListdialogbox,dragthefieldsforthehorizontalaxisto
theDropColumnFieldsHerebox.
9 FromthePivotTableFieldListdialogbox,dragthefieldsfortheverticalaxistothe
DropRowFieldsHerebox.
10 FromthePivotTableFieldListdialogbox,dragthedatafieldtotheDropDataField
Herebox.
11 FromthePivotTableFieldListdialogbox,dragthefieldsforthepageareatothe
DropPageFieldsHerebox.
Page189 TosaveaPivotChartasacustomcharttype
1 OntheChartmenu,clickChartType.
2 Ifnecessary,clicktheCustomTypestabtodisplaytheCustomTypestabpage.
3 IntheSelectfromsection,selecttheUser-definedoptionbuttonandthenclickAdd.
4 IntheNamebox,typeanameforthecharttype.
5 IntheDescriptionbox,typeadescriptionforthecharttype.ThenclickOK.
l
QuickReference
Page190 TochangeaPivotChartscharttype
1 OpentheChartmenu,andclickChartType.
2 ClicktheStandardTypestab.
3 IntheCharttypesection,clickthedesiredcharttype.ThenclickOK.
Page192 Toaddadiagramtoaworksheet
OpentheInsertmenu,andclickDiagram.
Page194 Toreformatadiagramelement
1 Clickthediagramelementyouwanttoreformat.
2 Usethecontrolsonthediagramtypestoolbar(e.g.,theOrganizationCharttoolbar)
ortheFormattingtoolbartoreformattheelement.
Chapter11 Printing
Page202 Topreviewaworksheet
OntheStandardtoolbar,clickthePrintPreviewbutton.
Page202 Tochangeprinterorientation
1 OntheStandardtoolbar,clickthePrintPreviewbutton.
2 ClickSetup.
3 IntheOrientationpane,selecttheLandscapeorPortraitoptionbutton.
4 ClickOK.
Page202 Tozoominonpartofapage
1 OntheStandardtoolbar,clickthePrintPreviewbutton.
2 ClicktheZoombutton.
Page203 Topreviewandchangepagebreaks
1 OntheStandardtoolbar,clickthePrintPreviewbutton.
2 ClickPageBreakPreview.
3 Dragthepagebreaklinetothedesiredlocationonthepage.
4 OntheViewmenu,clickNormal.
Page204 Tochangepageprintingorder
1 OntheFilemenu,clickPageSetup.
2 ClicktheSheettabtodisplaytheSheettabpage.
3 InthePageordersection,selecttheoptionbuttonforthedesiredpageorder.
li
QuickReference
Page204 Toprintamultipageworksheet
1 OntheFilemenu,clickPrint.
2 InthePrintrangesection,selecttheAlloptionbutton.
3 ClickPrint.
Page204 Toprintnonadjacentworksheetsinaworkbook
1 Onthetabbar,holddownHwhileyouclickthesheettabsoftheworksheetsto
print.
2 OntheStandardtoolbar,clickthePrintbutton.
Page204 Tosuppresserrormessageswhenprinting
1 OntheFilemenu,clickPageSetup.
2 ClicktheSheettabtodisplaytheSheettabpage.
3 InthePrintsection,clicktheCellerrorsasboxandthen,fromthelistthatappears,
clickthedesiredrepresentation.
Page206 Toprintselectedpagesofamultipageworksheet
1 OntheFilemenu,clickPrint.
2 InthePrintrangesection,selectthePage(s)optionbutton.
3 IntheFrombox,typethefirstpagetoprint.
4 IntheTobox,typethelastpagetoprint.
5 ClickOK.
Page207 Toprintaworksheetonaspecificnumberofpages
1 OntheFilemenu,clickPageSetup.
2 ClickthePagetab.
3 IntheScalingsection,selecttheFittooptionbuttonandthentypethedesired
numberofpagesinthepage(s)widebyandtallboxes.
4 ClickOK.
Page207 Todefineaprintareaandcenteritonapage
1 Selectthecellstobeprinted.
2 OntheFilemenu,pointtoPrintAreaandthenclickSetPrintArea.
3 OntheStandardtoolbar,clickthePrintPreviewbutton.
4 ClicktheSetupbutton.
5 ClicktheMarginstabtodisplaytheMarginstabpage.
lii
QuickReference
6 IntheCenteronpagesection,selecttheHorizontallycheckboxandtheVertically
checkbox.
7 ClickOK.
Page208 Tohidecolumnsorrowsduringprinting
1 Selectthecolumnorrowheadsofthecolumnsorrowstobehidden.
2 OntheFormatmenu,pointtoColumnsorRowsandthenclickHide.
Page208 Tounhidecolumnsorrowsduringprinting
OntheFormatmenu,pointtoColumnsorRowsandthenclickUnhide.
Page206 Torepeatrowsorcolumnsatthetoporleftofprintedpages
1 OntheFilemenu,clickPageSetup.
2 ClicktheSheettabtodisplaytheSheettabpage.
3 ClicktheCollapseDialogbuttonnexttotheRowstorepeatattoporColumnsto
repeatatleftbox.
4 Selecttherowsorcolumnstorepeat.
5 ClicktheExpandDialogbutton.
6 ClickOK.
Page210 Toprintachartwithoutprintingtheworksheet
1 Clickthechart.
2 OntheFilemenu,clickPrint.
3 InthePrintwhatsection,ensurethattheSelectedChartoptionbuttonisselected.
4 ClickOKtoprintthechart.
Page210 Toprintaworksheetwithoutprintingachart
1 Right-clicktheChartAreaofthechart,andthen,fromtheshortcutmenuthat
appears,clickFormatChartArea.
2 ClickthePropertiestab.
3 ClearthePrintobjectcheckbox,andthenclickOK.
4 Clickontheworksheetsothechartisnolongerselected,andthenprintthe
worksheet.
Page212 Toprintachartatitsactualsize
1 Clickthecharttoselectit.
2 OntheStandardtoolbar,clickthePrintPreviewbutton.
liii
1
2
3
4
5
6
QuickReference
3 ClicktheSetupbutton.
4 ClicktheCharttab.
5 SelecttheCustomoptionbutton,andthenclickOK.
Chapter12 AutomatingRepetitiveTaskswithMacros
Page218 Toopenandviewamacro
Openaworkbookwithamacroattached.
ClickEnableMacrostoallowmacrostorun.
OntheToolsmenu,pointtoMacroandthenclickMacros.
IntheMacroNamepane,clickthenameofthemacrotoview.
ClickEdit.
ClickClosetoclosethemacro.
Page219 Tostepthroughamacro
1 OntheToolsmenu,pointtoMacroandthenclickMacros.
2 IntheMacroNamelist,clickthenameofthemacrotostepthrough.
3 ClickStepInto.
4 Right-clickthetaskbar,andthen,fromtheshortcutmenuthatappears,clickTile
WindowsVertically.
5 Press(toexecuteeachmacrostep.
6 Afterthelastmacrostep,intheMicrosoftVisualBasicEditor,clicktheClose
button.
Page220 Torunamacro
1 OntheToolsmenu,pointtoMacroandthenclickMacros.
2 IntheMacroNamelist,clickthenameofthemacrotorun.
3 ClickRun.
Page221 Tocreateamacro
1 OntheToolsmenu,pointtoMacroandthenclickRecordNewMacro.
2 IntheMacronamebox,deletetheexistingnameandthentypeanameforthenew
macro.
3 ClickOK.
4 Executethestepsthatmakeupthemacro.
5 OntheStopRecordingtoolbar,clicktheStopRecordingbutton.
liv
QuickReference
Page221 Tomodifyanexistingmacro
1 OntheToolsmenu,pointtoMacroandthenclickMacros.
2 IntheMacronamelist,clickthemacronameandthenclickEdit.
3 ChangetheVBAcodethatmakesupthemacro.
4 OntheVisualBasicEditorsStandardtoolbar,clicktheSavebuttontosaveyour
change.
5 ClicktheClosebutton.
Page225 Tocreateatoolbar
1 OntheToolsmenu,clickCustomize.
2 Ifnecessary,clicktheToolbarstabtodisplaytheToolbarstabpage.
3 ClickNew.
4 IntheToolbarnamebox,typethenameofthenewtoolbar.
5 ClickOK.
Page225 Toaddamacrobuttontoatoolbar
1 OntheToolsmenu,clickCustomize.
2 IntheCustomizedialogbox,clicktheCommandstab.
3 IntheCategorieslist,clickMacros.
4 DragtheCustomButtoncommandtothetargettoolbar.
5 OntheCustomMacrostoolbar,right-clicktheCustombuttonandthen,fromthe
shortcutmenuthatappears,clickName.
6 Typeanameforthebutton,andthenpressF.
7 Onthetargettoolbar,right-clickthenewbuttonandthen,fromtheshortcutmenu
thatappears,clickAssignMacro.
8 Clickthenameofthemacrotobeassignedtothebutton.
9 ClickOK.
10 IntheCustomizedialogbox,clickClose.
Page226 Todeleteacustomtoolbar
1 OntheToolsmenu,clickCustomize.
2 Ifnecessary,clicktheToolbarstab.
3 IntheToolbarslist,clickthenameofthetoolbartobedeleted.
4 ClickDelete.
lv
QuickReference
5 ClickOKinthewarningdialogboxthatappears.
6 ClickClosetoclosetheCustomizedialogbox.
Page228 Tocreateanewmenu
1 OntheToolsmenu,clickCustomize.
2 Ifnecessary,clicktheCommandstabtodisplaytheCommandstabpage.
3 IntheCategorieslist,clickNewMenu.
4 DragNewMenufromtheCommandslisttothespotonthemainmenubarwhere
youwantthenewmenutoappear.
5 Right-clicktheNewMenuheading,andthen,fromtheshortcutmenuthatappears,
clickName.
6 Typeanewnameforthemenu,andthenpressF.
7 IntheCustomizedialogbox,clickClose.
Page229 Toaddamacrotoamenu
1 OntheToolsmenu,clickCustomize.
2 Ifnecessary,clicktheCommandstabtodisplaytheCommandstabpage.
3 IntheCategorieslistoftheCustomizedialogbox,clickMacros.
4 IntheCommandslist,dragtheCustomMenuItemcommandtothenewmenu
head.Whenaboxappearsunderthemenuhead,dragCustomMenuItemontoit.
5 Onthenewmenu,right-clickCustomMenuItemandthen,fromtheshortcutmenu
thatappears,clickName.
6 Typeanamefortheitem,andthenpressF.
7 Onthenewmenu,right-clickthenewmenuitemandthen,fromtheshortcutmenu
thatappears,clickAssignMacro.
8 IntheMacronamebox,clickthenameofthemacrotoassigntothemenuitem.
9 ClickOK.
10 ClickClosetoclosetheCustomizedialogbox.
Page229 Todeleteacustommenu
1 OntheToolsmenu,clickCustomize.
2 Right-clickthemenuheadofthemenutobedeleted,andthen,fromtheshortcut
menuthatappears,clickDelete.
3 IntheCustomizedialogbox,clickClose.
lvi
1
2
3
4
5
6
1
2
3
4
5
6
QuickReference
Page230 Torunamacrowhenaworkbookisopened
1 OntheToolsmenu,pointtoMacroandthenclickRecordNewMacro.
2 IntheMacronamebox,typeanamethatbeginswithAuto_,suchasAuto_Open.
3 ClickOK.
4 Carryoutthestepstobesavedinthemacro.
5 OntheStopRecordingtoolbar,clicktheStopRecordingbutton.
Chapter13 WorkingwithOtherMicrosoftOfficePrograms
Page235 Tolinktoanexternaldocument
OntheInsertmenu,clickObject.
ClicktheCreatefromFiletabtodisplaytheCreatefromFiletabpage.
ClickBrowse.
Navigatetothetargetfolder,anddouble-clickthefiletoincludeintheworkbook.
SelecttheLinktofilecheckbox.
ClickOK.
Page236 Toeditalinkedfile
Right-clickthelinkedfile,andthen,fromtheshortcutmenuthatappears,point
toPresentationObject(inthecaseofaMicrosoftPowerPointpresentation)and
thenclickEdit.
Page238 Tostoreaworkbookaspartofanotherfile
OpentheotherOfficefile.
OntheInsertmenu,clickObject.
SelecttheCreatefromFileoptionbutton.
ClicktheBrowsebutton.
Navigatetothetargetfolder,anddouble-clicktheworkbooktoincludeinthefile.
ClickOK.
Page239 Toeditanembeddedworkbook
Right-clickthelinkedfile,andthen,fromtheshortcutmenuthatappears,point
toWorksheetObject(inthecaseofaPowerPointpresentation)andthenclick
Edit.
lvii
QuickReference
Page243 Tocreateahyperlinktoanotherlocationwithinthesamedocument
1 Right-clickthecellintowhichyouwanttoinsertthehyperlink,andthen,fromthe
shortcutmenuthatappears,clickHyperlink.
2 ClickthePlaceinThisDocumentbutton.
3 IntheOrselectaplaceinthisdocumentbox,clickthetargetforthehyperlink.
4 Ifdesired,typeacellreferenceintheTypetheCellReferencebox.
5 IntheTexttodisplaybox,typethetexttobeshownasthelink.
6 ClickOK.
Page242 Tocreateahyperlinkbetweendocuments
1 Right-clickthecellintowhichyouwanttoinsertthehyperlink,andthen,fromthe
shortcutmenuthatappears,clickHyperlink.
2 Ifnecessary,clicktheExistingFileorWebPagebutton.
3 Navigatetothefolderwiththetargetfile.
4 Clickthenameofthetargetfile.
5 IntheTexttodisplaybox,typethetexttobeshownasthelink.
6 ClickOK.
Page244 Topasteachartintoanotherdocument
1 Right-clickablankspotonthechart,andthen,fromtheshortcutmenuthat
appears,clickCopytocopythechartimagetotheClipboard.
2 Openthefileintowhichthechartwillbepasted.
3 Right-clickablankspotintheactivedocument,andfromtheshortcutmenuthat
appears,clickPaste.
Chapter14 WorkingwithDatabaseData
Page250 Tofindavalue
1 Createadatarangeinwhichtheleftmostcolumncontainsauniquevaluefor
eachrow.
2 Inacell,type=VLOOKUP(cell2,range,column,FALSE)(wherecell2isthecellfor
someonetoenteravalueforExceltofindintheleftmostcolumn,rangeisthe
rangeornameoftherange,andcolumnisthenumberofthecolumncounting
fromtheleftforthevaluetobereturned),andpressF.FALSEfindsonlyexact
matches,whileTRUEwouldfindthenearestmatchequaltoorlessthanthespeci-
fiedvalue.
3 Incell2,typethevaluetobefoundinthenamedrange,andpressF.
lviii
QuickReference
Page253 TodefineanewMicrosoftAccessdatasource
1 OntheDatamenu,pointtoImportExternalDataandthenclickNewDatabase
Query.
2 Ifnecessary,clicktheDatabasestabintheChooseDataSourcedialogbox.
3 Click<NewDataSource>,andthenclickOK.
4 Inthefirstbox,typethenameofthesource.
5 Inthesecondbox,clickthedownarrowandthen,fromthelistthatappears,click
MicrosoftAccessDriver(*.mdb).
6 ClickConnect.
7 ClickSelect.
8 Navigatetothetargetfolder,clickthetargetdatabase,andthenclickOK.
9 ClickOKagain.
10 Inthefourthbox,clickthedownarrowandthen,fromthelistthatappears,click
thedefaulttableforthedatasource.
11 ClickOK.
Page254 Tocreateadatabasequery
1 OntheDatamenu,pointtoImportExternalDataandthenclickNewDatabase
Query.
2 Ifnecessary,clicktheDatabasestabintheChooseDataSourcedialogbox.
3 Clickthenameofthedatasource,andthenclickOK.
4 Addthetablecolumnsyouwanttouseinyourquerybyclickingthecolumnname
andthenclickingAdd.
5 ClickNext.
6 IntheColumnToFilterpane,clickthenameofthecolumnbywhichyouwanttofil-
tertheresults.
7 Inthefirstcomparisonoperatorbox,clickthedownarrowandthen,fromthelist
thatappears,clickthecomparisonoperatortobeused.
8 Inthefirstvaluebox,typethefirstvaluetouseinthecomparison.
9 Ifnecessary,typeasecondvalueinthesecondvaluebox.
10 ClickNext.
11 IntheSortbybox,clickthedownarrowandthen,fromthelistthatappears,click
thenameofthecolumnbywhichtosortthequeryresults,andclickAscendingor
Descending.
lix
QuickReference
12 ClickNext.
13 ClickSaveQuery.
14 IntheFilenamebox,typeanameforthequeryandthenclickSave.
15 ClickFinish.
16 IntheImportDatadialogbox,clickOK.
Page258 Tosummarizedatawithadatabasefunction
1 Createadatalist.
2 Aboveortothesideofthedatalist,copytheheadingsfromthecolumnsinthe
datalist.
3 Inthecellsdirectlybelowthecopiedheadings,typetherulestouseascriteriato
limitthelistrowsconsideredbythedatabaseformulas.
4 Inanyblankcellaboveortothesideofthedatalist,typethedatabaseformulafol-
lowingthepatternDFUNCTION(data,<;$QD>field<;$QD>,criteria),where:
DFUNCTION isthedatabasefunction(e.g.,DSUMorDAVERAGE)
data istherangeofcellscontainingthedatalist(includingcolumn
headings)
<;$QD>field<;$QD>isthenameofthefield(enclosedinquotes)tobe
usedincalculatingtheformulasresult
criteria istherangeofcellscontainingtherules(includingcolumnhead-
ings)tobeusedinlimitingthecellsconsideredbytheformula.
Chapter15 PublishingInformationontheWeb
Page265 TosaveaworkbookasanHTMLdocument
1 OntheFilemenu,clickSaveasWebPage.
2 Ifnecessary,intheSavepane,selecttheEntireWorkbookoptionbutton.
3 EnterafilenameintheFilenamebox,andthenclickSave.
Page265 ToviewaworkbooksavedasanHTMLfile
1 StartMicrosoftInternetExplorer.
2 InInternetExplorer,opentheFilemenuandthenclickOpen.
3 ClickBrowse.
4 Navigatetothetargetfolder,andthendouble-clickthefiletobeviewed.
5 ClickOK.
lx
QuickReference
Page267 TopublishaworksheetontheWeb
1 OntheFilemenu,clickSaveasWebPage.
2 Navigatetothedirectorytowhichyouwanttopublishtheworksheet.
3 IntheSavesectionofthedialogbox,selecttheSelection:Sheetoptionbuttonto
publishtheactiveworksheetontheWeb.
4 InthePublishassectionofthedialogbox,clicktheChangebutton.
5 IntheTitlebox,typeanewtitleforthepageandthenclickOK.
Page268 ToupdateMicrosoftExcelWebpagesautomatically
1 OntheFilemenu,clickSaveasWebPage.
2 IntheSavesectionofthedialogbox,selecttheSelection:Sheetoptionbuttonto
publishtheactiveworksheetontheWeb.
3 InthePublishassectionofthedialogbox,clicktheChangebutton.
4 IntheTitlebox,typeanewtitleforthepageandthenclickOK.
5 SelecttheAutoRepublisheverytimethisworkbookissavedcheckbox.
Page268 ToeditaworkbookovertheWeb
1 OntheFilemenu,clickSaveasWebPage.
2 NavigatetotheWebdirectorytowhichyouwanttopublishtheworkbook.
3 IntheSavesectionofthedialogbox,selecttheSelection:Sheetoptionbuttonto
publishtheactiveworksheetontheWeb.
4 IntheSavesectionofthedialogbox,selecttheAddinteractivitycheckboxand
thenclickOK.
5 OpenthefileinInternetExplorer.
6 UsethetoolsontheInteractivitytoolbartoedittheworksheet.
Page271 TosaveaPivotTabletotheWeb
1 ClickanycellinthePivotTable.
2 OntheFilemenu,clickSaveasWebPage.
3 IntheSavesectionofthedialogbox,selecttheSelection:Sheetoptionbutton.
4 IntheSavesectionofthedialogbox,selecttheAddinteractivitycheckboxand
thenclickPublish.
5 Ifnecessary,clicktheChoosedownarrow,andthen,fromthelistthatappears,
clickItemsonPivot.
lxi
1
2
3
4
5
6
7
8
QuickReference
6 InthelistbelowtheChoosebox,clicktheitembeginningwithPivotTable.
7 ClickPublish.
Page272 ToworkwithaPivotTableviatheWeb
1 OpentheWebpagewiththePivotTableinInternetExplorer.
2 UsethedownarrowsandcolumnheadstomodifythePivotListsorganization.
Page274 TolinktoWebdata
1 InInternetExplorer,opentheWebpagewiththetabledatatowhichyouwant
tolink.
2 Selectthetabledata,andthenpressH+c tocopythedatatotheClipboard.
3 InExcel,clickthedesiredcell,andthen,ontheStandardtoolbar,clickthePaste
button.
4 ClickthePasteOptionsbutton,andthen,fromthelistthatappears,clickCreate
RefreshableWebQuery.
5 Clickthetableiconnexttothedatayouwanttoimport,andthenclickImport.
Page276 Toacquirereal-timedata
OntheToolsmenu,clickAutoCorrectOptions.
ClicktheSmartTagstabtodisplaytheSmartTagstabpage.
SelecttheLabeldatawithsmarttagscheckbox.
VerifythatthefivecheckboxesintheRecognizerslistareselected.
SelecttheEmbedsmarttagsinthisworkbookcheckbox.
ClickCheckWorkbook.
MovethemousepointeroveracellwiththeSmartTagindicator.
ClicktheSmartTagActionsbutton,andthen,fromthelistthatappears,clickthe
desiredaction.
9 SelecttheStartingatcelloptionbutton,verifythatthepropercellappearsinthe
Startingatcellbox,andthenclickOK.
Page278 ToexportanExceldocumentasXML
1 OntheFilemenu,clickSaveAs.
2 ClicktheSaveastypedownarrow,andthen,fromthelistthatappears,clickXML
Spreadsheet(*.xml).
3 ClickSave.
4 ClickYestoclearthemessageboxandsavetheworkbookasanXMLspreadsheet.
lxii
1
2
3
4
5
6
QuickReference
Page279 ToimportanXMLfileintoExcel
1 OntheStandardtoolbar,clicktheOpenbutton.
2 Navigatetothetargetfolder,anddouble-clickthetargetfilewiththe.xmlextension.
Page283 ToapplyanXMLdatamaptoaworksheet
OntheDatamenu,pointtoXML,andthenclickXMLSource.
ClickWorkbookMaps.
ClickAdd.
Navigatetothefolder,clickthe.xsdfilethatcontainstheschema,andclickOpen.
Ifnecessary,clicktheentryrepresentingtheschema,andclickOK.
DragtheelementsyouwanttoaddfromtheXMLSourcetaskpanetothebodyof
theworksheet.
Page284 ToimportXMLdataintoaworksheetwithadatamap
1 OntheDatamenu,pointtoXML,andthenclickImport.
2 ClickthenameofthefilethatcontainstheXMLdata,andclickImport.
Page284 TochangetheviewingoptionsofanXMLdatamap
1 Clickacellinthelistyouwanttomodify.
2 OntheDatamenu,pointtoXML,andthenclickXMLSource.
3 ClickOptionsintheXMLSourcetaskpane,andclicktheviewingoptionyouwantto
applytothelist.
Page284 ToremoveanelementfromanXMLdatamap
1 OntheDatamenu,pointtoXML,andthenclickXMLSource.
2 IntheXMLSourcetaskpane,right-clicktheelementtoremoveandclickRemove
Element.
3 ClickOKtoacknowledgethatthedeletionwillcausedatatobelost.
Page284 ToremoveanXMLdatamapassignment
1 OntheDatamenu,pointtoXML,andthenclickXMLSource.
2 IntheXMLSourcetaskpane,clickWorkbookMaps.
3 Clickthedatamaptoremove,clickDelete,andclickOKtoclearthemessagebox
thatappears.
lxiii
1
2
3
4
5
6
QuickReference
Chapter16 CollaboratingwithColleagues
Page289 Toturnworkbooksharingon
1 OntheToolsmenu,clickShareWorkbook.
2 SelecttheAllowchangesbymorethanoneuseratthesametimecheckbox,and
thenclicktheAdvancedtab.
3 ClickOKtoacceptthedefaultsettings.
4 ClickOKifamessageboxappears,andthensavetheworkbook.
Page289 Tosendaworkbooktocolleaguesbye-mail
1 FromtheMicrosoftWindowsStartmenu,openMicrosoftOutlookExpress.
2 ClicktheNewMailbutton.
3 ClicktheAttachbutton.
4 Navigatetothetargetfolder,anddouble-clickthefiletoattach.
5 ClickSend.
Page292 Toaddacomment
1 Clickthecelltowhichtoaddthecomment.
2 OntheInsertmenu,clickComment.
3 Inthecommentfield,typethecomment.
4 Clickadifferentcelltoclosethecomment.
Page292 Toviewacomment
Movethemousepointeroveracellwithacomment.
Page292 Todeleteacomment
Right-clickthecellwiththecomment,andthen,fromtheshortcutmenuthat
appears,clickDeleteComment.
Page294 Toturnonchangetracking
OntheToolsmenu,pointtoTrackChangesandthenclickHighlightChanges.
SelecttheTrackchangeswhileeditingcheckbox.
Ifnecessary,cleartheWhencheckbox.
Ifnecessary,cleartheWhocheckbox.
Ifnecessary,selecttheHighlightchangesonscreencheckbox.
ClickOK.
lxiv
QuickReference
Page296 Toacceptorrejectchangesinasingleworkbook
1 OntheToolsmenu,pointtoTrackChangesandthenclickAcceptorRejectChanges.
2 ClickOKtosavetheworkbookandclearthemessageboxthatappears.
3 VerifythattheWhencheckboxisselectedandthatNot yet reviewedappearsinthe
Whenbox.
4 ClickOK.
5 ClickAccepttoacceptthechange,orclickRejecttorejectthechange.
Page295 Toaddahistoryworksheettoaworkbook
1 OntheToolsmenu,pointtoTrackChangesandthenclickHighlightChanges.
2 SelecttheListchangesonanewsheetcheckbox.
3 ClickOK.
Page297 Tomergechangesfrommultipleworkbooks
1 OntheToolsmenu,clickCompareandMergeWorkbooks.
2 HolddownHasyouclickthefileswiththechangestobemerged,andthen
clickOK.
3 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
4 OntheToolsmenu,pointtoTrackChangesandthenclickAcceptorRejectChanges.
5 VerifythattheWhencheckboxisselectedandthatNot yet reviewedappearsinthe
Whenbox,thattheWhocheckboxiscleared,andthattheWherecheckboxis
cleared.
6 ClickOK.
Page300 Topassword-protectaworkbook
1 OntheFilemenu,clickSaveAs.
2 ClicktheToolsmenuhead,andthenclickGeneralOptions.
3 InthePasswordtoopenbox,typeapasswordandthenclickOK.
4 IntheReenterpasswordtoproceedbox,typethesamepasswordandthen
clickOK.
5 ClickSave.
6 ClickYesifamessageboxappears.
lxv
1
2
3
4
5
6
QuickReference
Page299 Toremoveapasswordfromaworkbook
1 OntheFilemenu,clickSaveAs.
2 ClicktheToolsmenuhead,andthenclickGeneralOptions.
3 InthePasswordtoopenbox,erasetheexistingpasswordandthenclickOK.
Page301 Topassword-protectaworksheet
1 Activatetheworksheettobeprotected.
2 OntheToolsmenu,pointtoProtectionandthenclickProtectSheet.
3 InthePasswordtounprotectsheetbox,typethepasswordandthenclickOK.
4 IntheConfirmPassworddialogbox,typethesamepasswordinthespaceprovided,
andthenclickOK.
Page301 Toremoveprotectionfromaworksheet
1 OntheToolsmenu,pointtoProtectionandthenclickUnprotectSheet.
2 InthePasswordbox,typethepasswordandthenclickOK.
Page301 Topassword-protectarange
Selectthecellstobeprotected.
OntheToolsmenu,pointtoProtectionandthenclickAllowUserstoEditRanges.
ClickNew.
IntheTitlebox,typethenameforthenewrange.
IntheRangepasswordbox,typeapasswordandthenclickOK.
IntheConfirmpasswordbox,typethesamepasswordandthenclickOK.
Page301 Toremoveapasswordfromacellrange
1 OntheToolsmenu,pointtoProtectionandthenclickAllowUserstoEditRanges.
2 IntheRangesbox,clicktherangetobeunprotectedandthenclickDelete.
3 ClickOK.
Page304 Tocreateaself-signeddigitalcertificate
1 OntheStartmenu,clickRun.
2 IntheOpenbox,typeC:\ProgramFiles\MicrosoftOffice\OFFICE11\Selfcert.exeand
pressF.IfOfficewasnotinstalledinthedefaultdirectory,modifythepathto
reflectthedirectoryinwhichitwasinstalled.
3 IntheCreateDigitalCertificatedialogbox,typeanameforyourcertificate.
4 ClickOK.
lxvi
QuickReference
Page305 Todigitallysignaworkbook
1 OntheToolsmenu,clickOptions.
2 IntheOptionsdialogbox,clicktheSecuritytab,andclickDigitalSignatures.
3 IntheSelectCertificatedialogbox,clickthecertificatewithwhichyouwanttosign
theworkbookandclickOK.
4 ClickOKtoclosetheDigitalSignaturesdialogbox,andagaintoclosetheOptions
dialogbox.
lxvii
Chapter 1 at a Glance
Zeroinondatainalist,
Workwithanexisting
Checkandcorrectdata,
page5
datalist,
page4
page16
Createanew
datalist,
page10
Chapter 1 at a Glance
1
GettingtoKnowExcel
Inthischapteryouwilllearnto:
Workwithanexistingdatalist.
Zeroinondatainalist.
Createadatalist.
Checkandcorrectdata.
Onethingallbusinesseshaveincommonistheneedtokeepaccuraterecords.Asthe
rangeofproducts,services,andcustomersexpands,businessesrequireacomputer-
basedsystemtokeepupwithanavalancheoffinancialandotherdata.
MicrosoftExcelisaspreadsheetprogramthatletsyouorganizeyourdataintolists
andthensummarize,compare,andpresentyourdatagraphically.Forexample,you
canhaveExcelfindthesum,average,ormaximumvalueforsalesonagivenday;
createagraphshowingwhatpercentageofsaleswereinaparticularrange;and
showhowthetotalsalescomparedwiththetotalsalesofotherdaysinthesame
week.Inshort,Excelsavesyoufromhavingtocreatethesesummariesbyhand.
TheexercisesinthisbookarebasedondataforTheGardenCompany,thefictional
businessusedintheStep by Step series.Inadditiontotakingcareoftheplantsand
gardeningsuppliesofferedbythecompany,theowner,CatherineTurner,andher
employeesneedtomaintainthedataliststhatletCatherineandTheGardenCompanys
headbuyermakeinformeddecisionsabouttheproductsthecompanycarries.
Inthischapter,youlllearnhowtoworkwithanexistingdatalistandspecificdata
withinadatalist,createadatalist,andcheckandcorrectdata.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxxviixxix.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCDtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
IntroducingExcel
WhenyoustartExcel,ablankdocumentappears.Fromthispoint,youcanadddata,
changehowthedatalooks,haveExcelsummarizedata,orfindinformationinExcels
helpfiles.ThefollowinggraphicpointsoutthemostimportantpartsofExcel:the
1
1
GettingtoKnowExcel
workbookwindow,themainmenubar,theformulabar,theStandardandFormatting
toolbars,thestatusbar,theAskAQuestionbox,andthetaskpane.
Standardtoolbar
Mainmenubar Formulabar
Workbookwindow
AskAQuestionbox
Formattingtoolbar
Taskpane
Statusbar
Important Dependingonthescreenresolutionyouhavesetonyourcomputerand
whichtoolbarbuttonsyouusemostoften,itspossiblethatnoteverybuttononevery
toolbarwillappearonyourExceltoolbars.Ifabuttonmentionedinthisbookdoesnt
appearonatoolbar,clicktheToolbarOptionsdownarrowattherightendofthattoolbar
todisplaytherestofthebuttonsavailableonthattoolbar.
ThemostbasicpartofanExceldocumentistheboxthatholdsanelementofdata
inExcel,thatboxiscalledacell.Eachcellisattheintersectionofarow(asequence
ofcellsalongahorizontalline)andacolumn(asequenceofcellsalongavertical
line);rowsareidentifiedbyanumberandcolumnsbyaletter.Therownumberand
columnletterthatdesignateaspecificcellarecalledacell reference.Forexample,the
cellintheupperleftcorneroftheworkbookwindowhasthecellreferenceA1.Asin-
glesetofcolumnsandrowsmakesupaworksheet,whichappearsasapageinan
Exceldocument.Aworkbook,inturn,isacollectionofoneormoreworksheets.
Tip WhenyoucreateanExceldocument,youcreateaworkbookwiththreeworksheets.
2
Microsoft
Office
Specialis
GettingtoKnowExcel
1
TheworkbookthatownerCatherineTurnerhasdevelopedforTheGardenCompany
hasthreeworksheets,witheachworksheetholdingdataaboutproductsavailableat
thecompanysretaillocation.ShehasnamedtheworkbookProducts,andshe
recordsdataaboutfurnitureitemsononeworksheet,gardeningsuppliesonanother
worksheet,andtoolsonathirdworksheet.Oneachworksheet,sheusesthreecol-
umnstorecordeachproductsidentificationcode,description,andprice.Thiscollec-
tionofrelatedinformationiscalledadata list.
Youcanincludemorethanthreecategoriesinaworkbookforagivensubjectby
simplycreatingadditionalworksheets;ifyouwanttostoredataaboutanentirelydif-
ferentsubject,however,youshouldcreateanewworkbook.Forexample,ifCatherine
wantedtorecordmoredataaboutdifferentcategoriesofproductssoldbyTheGarden
Company,suchasvarietiesofplants,shecouldcreateanewworksheetintheProd-
uctsworkbookandaddthedatatotheworksheet.However,ifshewantedtostore
dataonadifferentsubject,perhapshercustomersandtheircontactinformation,she
wouldcreateanewworkbook.
Tip Eachworkbookshouldcontaininformationaboutauniquesubject,suchasProd-
ucts,Customers,orSales,whileeachworksheetshouldholdinformationaboutasubset
ofitemsinthatcategory,meaningdifferenttypesofproducts,preferredcustomersvs.
non-preferredcustomers,orsalesinformationforagivenmonth.
TheExcelhelpsystemisagreatsourceofinformationabouttheprogram.Rather
thangethelpthroughtheHelpmenu,youcantypeaquestionintheAskAQuestion
boxandhaveExceldisplaythehelptopicsthatmatchyourrequest.Thebenefitof
placingtheAskAQuestionboxinthemainExcelwindowisthatyoucanquickly
andeasilygethelpwhileyourquestionisfreshinyourmind,withoutaddingany
stepsthatmightdistractyoufromyourquestion.
Thetaskpaneletsyouopenfiles,pastedatafromtheClipboard,createblankwork-
books,andcreateExcelworkbooksbasedonexistingfiles.Agreatadvantageofthe
taskpaneisthatitgroupsmanycommonactions,suchasopeningorcreatingnew
files,inoneplaceandletsyouperformthemwithasinglemouseclick.Theonly
drawbackofthetaskpaneisthatittakesupvaluablescreenspace.Fortunately,you
canshoworhidethetaskpaneeasily.OntheViewmenu,clickTaskPane;Excel
hidesthetaskpaneifitiscurrentlydisplayedorshowsitifitiscurrentlyhidden.
WorkingwithanExistingDataList
Microsoft
WhenyoustartExcel,theprogramdisplaysablankworksheetandhasthetaskpane
Office
Specialistt
openontherightsideofthescreen.Youcanbegintoenterdataintheworksheets
cellsoropenanexistingworkbook.Intheexercisesthatfollow,youllbeworkingwith
someoftheworkbooksthathavealreadybeencreatedforTheGardenCompany.After
youvemadeanydesiredchangestoaworkbook,youshouldsavetheworkbook.
3
1
GettingtoKnowExcel
Whenyousaveafile,youoverwritethepreviouscopyofthefile.Ifyouhavemade
changesthatyouwanttosavebutyouwanttokeepacopyofthefileasitwaspre-
viously,youcanusetheSaveAscommandtospecifyanameforthenewfile.
Tip Readersfrequentlyask,HowoftenshouldIsavemyfiles?Itsgoodpracticeto
saveyourchangeseveryhalfhour,oreveneveryfiveminutes,butthebesttimetosavea
fileiswheneveryouhavemadeachangeyouwouldhatetohavetomakeagain.
YoucanalsousethecontrolsintheSaveAsdialogboxtospecifyadifferentformat
forthenewfileandadifferentlocationinwhichtosavethenewversionofthefile.
Forexample,CatherineTurner,theownerofTheGardenCompany,mightwantto
saveanExcelfileinadifferentformatifsheneedstosharethefilewiththecom-
panysaccountant,whohappenstouseanotherspreadsheetprogram.
Afteryousaveafile,youcanchangeaproperty(orproperties)ofthefiletomakeit
easierforyourcolleaguestofindwhentheysearchyourcompanysnetwork.Inthe
MicrosoftWindowsoperatingsystems,youcansearchforfilesbasedonthefiles
authorortitle,orbykeywordsassociatedwiththefile.Afiletrackingsalesoffurni-
tureproductsmighthavethekeywordsfurnitureandsalesassociatedwithit.Those
propertiesareavailableontheSummarytabpageofthePropertiesdialogbox.Other
properties,suchasCheckedBy,DateCompleted,andLanguageareavailableonthe
Customtabpageofthedialogbox.
Inthisexercise,youstartExcelfromtheStartmenuandthenusetheOpendialog
boxtoopenanexistingworkbook.Onceyouhaveopenedtheworkbook,you
updatethepriceofanitemandsavetheworkbooktwice:onceasanExcelwork-
book,whereyouwillalsochangethefilesproperties,beforesavingthefileasa
Lotusfileinanewdirectory.
1 Onthetaskbar,clicktheStartbutton,pointtoPrograms,MicrosoftOffice,andthen
clickMicrosoftOfficeExcel2003.
ThemainExcelprogramwindowappears.
2 OntheStandardtoolbar,clicktheOpenbutton.
Open TheOpendialogboxappears.
Tip Whenthetaskpaneisdisplayed,youcanalsoopenafilebylookingunder
theGettingStartedheadingandeitherclickingthenameoftheworkbookyouwant
toopenorclickingMoretodisplaytheOpendialogbox.
3 ClicktheLookIndownarrow,andselecttheharddiskwhereyouinstalledtheStep
bySteppracticefiles.
Thefilesandfoldersonyourharddiskappear.
4
GettingtoKnowExcel
1
Save
UpOneLevel
4 LocatetheSBSfolder,andthendouble-clicktheExcelfolder.
ThefilesandfoldersintheExcelfolderappear.
5 Double-clicktheGettingToKnowXLfolder.
ThefilesandfoldersintheGettingToKnowXLfolderappear.
6 Double-clicktheFileOpen.xlsfile.
TheFileOpen.xlsfileopens.
7 ClickcellC16,type15.95,andpressF.
ThedataincellC16changesto$15.95.
8 OntheStandardtoolbar,clicktheSavebutton.
Excelsavesyourchanges.
9 OntheFilemenu,clickProperties.
ThePropertiesdialogboxappears.
10 Ifnecessary,clicktheSummarytab,andtypePracticeintheKeywordsbox.
11 ClicktheCustomtabandselectDatecompleted.
12 ClicktheTypedownarrowandselectDate.
13 TypethecurrentdateintheValueboxintheformmm/dd/yyyy,andclickOK.
14 OntheFilemenu,clickSaveAs.
TheSaveAsdialogboxappears.
15 ClickintheFilenamebox,deletetheexistingfilename,andtypeSaveAs.
16 ClicktheUpOneLevelbuttontomovefromtheGettingToKnowXLfoldertotheExcel
folder.
17 ClicktheSaveastypedownarrowtoexpandthelist,andclickWK4(1-2-3)(*.wk4).
18 ClicktheSavebutton.
Adialogboxappears,indicatingthatsomefeaturesmightbelost.ClickYestohave
ExcelsaveanewcopyofyourdatainaLotusfilenamedSaveAs.wk4.
CLOSE:SaveAs.wk4.
ZeroingInonDatainaList
Onceyouhaveopenedaworkbook,youcanexamineandmodifyitscontents.To
changespecificdata,suchasthepriceofapairofshears,youcanmovetothatcell
directlyandthenmakeyourchanges.Onceinthatcell,youcanmovetoanothercell
5
1
GettingtoKnowExcel
inthesameworksheetormovetoanotherworksheetintheworkbook.Movingto
anotherworksheetisaccomplishedbyclickingitssheet tab,locatedatthelowerleft
edgeoftheworkbookwindow.
Youcanmovetoaspecificcellinlotsofways,butthemostdirectmethodistoclick
thecelltowhichyouwanttomove.Thecellyouclickwillbeoutlinedinblack,and
itscontents,ifany,willappearintheformulabar.Whenacellisoutlined,itisthe
active cell,meaningthatyoucanmodifyitscontents.Youuseasimilarmethodto
selectmultiplecells(referredtoasacell range)justclickthefirstcellintherange,
anddragthemousepointerovertheremainingcellsyouwanttoselect.Onceyou
haveselectedthecellorcellsyouwanttoworkwith,youcancut,copy,delete,or
changetheformatofthecontentsofthecellorcells.Forinstance,CatherineTurner,
theownerofTheGardenCompany,mightwanttocopythepricesofherfivemost
populargardenfurniturepiecestoanewpagethatsummarizesthebest-sellingitems
ineachproductcategorythatthecompanyoffers.
Important Ifyouselectagroupofcells,thefirstcellyouclickisdesignatedthe
activecell.
Yourenotlimitedtoselectingcellsindividuallyoraspartofarange.Youcanselect
anynumberofnoncontiguouscellsbypressingHandclickingeachcellyouwantto
select.Or,youmightneedtomoveacolumnofpricedataonecolumntotherightto
makeroomforacolumnofheadingsthatindicatetowhichproductcategory(Furni-
ture,Tools,Supplies,andsoforth)itemsbelong.Tomoveanentirecolumn(orentire
columns)ofdataatatime,youclickthecolumnsheader,locatedatthetopofthe
worksheet.Clickingacolumnheaderhighlightseverycellinthatcolumnandletsyou
copyorcutthecolumnandpasteitelsewhereintheworkbook.
ThePaste Optionsbuttonappearsnexttodatayoucopyfromacellandpasteinto
anothercell.
PasteOptionsbutton
ClickingthePasteOptionsbuttondisplaysalistofactionsExcelcantakeregarding
thepastedcells.Theoptionsinthelistaresummarizedinthefollowingtable.
6
GettingtoKnowExcel
1
Option Action
KeepSourceFormatting PastethecontentsoftheClipboard(whichholdsthe
lastinformationselectedviaCutorCopy)intothetarget
cells,andformatthedataasitwasformattedinthe
originalcells.
MatchDestination PastethecontentsoftheClipboardintothetarget
Formatting cells,andformatthedatausingtheexistingformatin
thetargetcells.
ValuesandNumber PastethecontentsoftheClipboardintothetarget
Formatting cells,keepinganynumericformats.
KeepSourceColumnWidths PastethecontentsoftheClipboardintothetarget
cells,andresizethecolumnsofthetargetcellsto
matchthewidthsofthecolumnsofthesourcecells.
FormattingOnly Applytheformatofthesourcecellstothetargetcells,
butdonotcopythecontentsofthesourcecells.
LinkCells Displaythecontentsofthesourcecellsinthetarget
cells,updatingthetargetcellswheneverthecontentof
thesourcecellschanges.
ValuesOnly Pastethevaluesfromacolumnintothetargetcolumn;
usetheexistingformatofthetargetcolumn.
ValuesandSource Pasteacolumnofcellsintothetargetcolumn;apply
Formatting theformatofthecopiedcolumntothenewcolumn.
Troubleshooting IfthePasteOptionsbuttondoesntappear,youcanturnthefea-
tureonbyclickingOptionsontheToolsmenu.Inthedialogboxthatappears,clickthe
EdittabandthenselecttheShowPasteOptionsbuttonscheckbox.
Inthisexercise,youmovefromoneworksheettoanothertoexaminedataabout
productsTheGardenCompanysellsandthenselectarangeofcellswhosecontents
youwanttocopytotheSummarysheetinyourworkbook.Afteryouhavecopied
andpastedthatinformation,youselectthefirstthreecolumnsofyourSummary
worksheet,copythemtotheClipboard,andmovethecolumns(andtheircontents)
overonecolumntomakethefirstcolumnavailabletoaddtextindicatingwhich
worksheetspecificsetsofdatacamefrom.
7
1
GettingtoKnowExcel
OPEN:ZeroInfromtheSBS\Excel\GettingToKnowXLfolder.
1 InthelowerleftcorneroftheExcelwindow,clicktheFurnituresheettab.
TheFurnitureworksheetappears.
2 Onthetabbar,right-clickthearrowbuttons,andthen,fromtheshortcutmenuthat
appears,clickPassiflora.
ThePassifloraworksheetappears.
3 ClicktheToolssheettabtomaketheToolsworksheettheactiveworksheetinthe
workbook.
4 ClickcellA3.
CellA3becomestheactivecellintheworksheet.ThevalueincellA3,Product ID,
appearsintheformulabar,andthecellidentifierappearsintheNamebox.
Namebox Formulabar
Copy
Paste
Activecell
5 DragfromcellA3tocellC6.
Theselectedcellsarehighlighted.
6 OntheStandardtoolbar,clicktheCopybutton.
ThecontentsoftheselectedcellsarecopiedtotheClipboard.Theselectedcells
retaintheircontentsandaresurroundedbyamarqueeoutline(anoutlinethat
seemstomovearoundtheedgeofthecells).
7 ClicktheSummarysheettab.
8 TheSummarysheetappears.ClickcellA3,andthen,ontheStandardtoolbar,click
thePastebutton.
ThevaluesinthecellsyoucopiedappearincellsA3toC6oftheSummary
worksheet.
8
GettingtoKnowExcel
1
Tip PriortoExcel2002,youhadtoselectthecellsthatwerethedestinationfor
thevaluesyoucopied.Ifthedestinationareawasntthesamesizeasthecopied
area,Excelwouldntletthepasteproceed.InthisversionofExcel,allyouneedtodo
isclickthecellintheupperleftcornerofthegroupofcellsthatyouwanttoholdthe
dataandthenpastethedataintothesheet.Theexception,whichyouwillencounter
laterinthischapter,occurswhenyoucutandpasteentirecolumnsorrows.
9 ClicktheToolssheettab.
TheToolsworksheetappears.
10 ClicktheNamebox.
ThevalueintheNameboxishighlighted.
11 IntheNamebox,typeB9,andpressF.
CellB9ishighlightedwiththevalueLong-handled Loppers.
12 ClicktheNamebox,typeB14,andpressF.
CellB14ishighlightedwiththevaluePruning Saw.
13 ClicktheSummarysheettab.
TheSummaryworksheetappears.
9
1
GettingtoKnowExcel
14 ClickthecolumnheadingforcolumnA.
EverycellincolumnA,includingthecolumnheading,ishighlighted.
15 DragtothecolumnheadingforcolumnC.
EverycellincolumnsAthroughC,includingthecolumnheadings,ishighlighted.
16 OntheStandardtoolbar,clicktheCutbutton.
Cut 17 ClickthecolumnheadingforcolumnB,anddragtothecolumnheadingfor
columnD.
EverycellincolumnsBthroughD,includingthecolumnheadings,ishighlighted.
18 OntheEditmenu,clickPaste.
ThecontentsoftheClipboardappearincolumnsBthroughD.
19 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:ZeroIn.xls.
Tip ToselectcellA1intheactiveworksheet(thatis,toreturntothetopofa
worksheetimmediately),pressH+>.
10
GettingtoKnowExcel
1
CreatingaWorkbook
Everytimeyouwanttogatherandstoredatathatisntcloselyrelatedtoanyofyour
existingdata,youshouldcreateanewworkbook.Thedefaultnewworkbookinthe
currentversionofExcelhasthreeworksheets,althoughyoucanaddmorework-
sheetsordeleteexistingworksheetsifyouwant.Creatinganewworkbookisa
straightforwardprocessyoujustclicktheappropriatebuttononthetoolbar.
Onceyouhavecreatedaworkbook,youcanbeginenteringdata.Thesimplestway
toenterdataistoclickacellandtypeavalue,amethodthatworksverywellwhen
youreenteringafewpiecesofdatabutthatislessthanidealwhenyoureentering
longsequencesorseriesofvalues.Forexample,CatherineTurner,theownerofThe
GardenCompany,mightwanttocreateaworksheetlistinghourlycompanysalesfig-
uresforweekdaysfrom1:00p.m.to7:00p.m.Torecordthosenumbers,shewould
needtocreateaworksheetwiththefollowinglayout.
TypingthesequenceMonday, Tuesday, Wednesday, Thursday, Fridayrepeatedlycan
behandledbycopyingandpastingthefirstoccurrenceofthesequence,buttheres
aneasierwaytodoitusingAutoFill.WithAutoFill,youenterthefirstelementina
recognizedseries,grabthefill handleatthelowerrightcornerofthecell,anddrag
thefillhandleuntiltheseriesextendsfarenoughtoaccommodateyourdata.Asimi-
lartool,FillSeries,letsyouentertwovaluesinaseriesandusethefillhandleto
extendtheseriesinyourworksheet.Forexample,ifyouwanttocreateaseriesstart-
ingat2andincreasingbytwo,youwouldput2 inthefirstcelland4inthesecond
cell,selectbothcells,andthenusethefillhandletoextendtheseriestoyourdesired
endvalue.
OtherdataentrytechniquesyoulluseinthissectionareAutoComplete,whichdetects
whenavalueyoureenteringissimilartopreviouslyenteredvalues;Pick from List,
whichletsyouchooseavaluefromexistingvaluesinacolumn;andH+F,which
letsyouenteravalueinmultiplecellssimultaneously.
11
1
GettingtoKnowExcel
Thefollowingtablesummarizesthesedataentrytechniques.
Method Action
AutoFill Enterthefirstvalueinarecognizedseries,andusethe
fillhandletoextendtheseries.
FillSeries Enterthefirsttwovaluesinaseries,andusethefill
handletoextendtheseries.
AutoComplete Typethefirstfewlettersinacell,andifasimilarvalue
existsinthesamecolumn,Excelwillsuggestthe
existingvalue.
PickfromList Right-clickacell,andfromtheshortcutmenuthat
appears,choosePickfromList.Alistofexisting
valuesinthecellscolumnwillappear.
H+F
Selectarangeofcellstocontainthesamedata,type
thedataintheactivecell,andpressH+F.
Troubleshooting IfanAutoCompletesuggestiondoesntappearasyoubegin
typingacellvalue,theoptionmaybeturnedoff.ToturnonAutoComplete,choose
OptionsfromtheToolsmenu,clicktheEdittab,andselecttheEnableAutoComplete
forCellValuescheckbox.
AnotherhandyfeatureinthecurrentversionofExcelistheAutoFillOptionsbutton
thatappearsnexttodatayouaddtoaworksheetusingeitherAutoFillorFillSeries.
ClickingtheAutoFillOptionsbuttondisplaysalistofactionsExcelcantakeregarding
thecellsaffectedbyyourFilloperation.Theoptionsinthelistaresummarizedinthe
followingtable.
12
GettingtoKnowExcel
1
Option Action
CopyCells Copythecontentsoftheselectedcellstothecells
indicatedbytheFilloperation.
FillSeries FillthecellsindicatedbytheFilloperationwiththenext
itemsintheseries.
FillFormattingOnly Copytheformatoftheselectedcelltothecellsindicated
bytheFilloperation,butdonotplaceanyvaluesinthe
targetcells.
FillWithoutFormatting FillthecellsindicatedbytheFilloperationwiththenext
itemsintheseries,butignoreanyformattingappliedto
thesourcecells.
FillDays,Weekdays,etc. Thisoptionchangesaccordingtotheseriesyouextend.
Forexample,ifyouextendthecellsWed,Thu,andFri,
Excelpresentstwooptions,FillDaysandFillWeekdays,
andletsyouselectwhichyouintended.Ifyoudonotuse
arecognizedsequence,theoptiondoesnotappear.
New
Save
Troubleshooting IftheAutoFillOptionsbuttondoesntappear,youcanturnthe
featureonbyclickingOptionsontheToolsmenu.Inthedialogboxthatappears,clickthe
EdittabandthenselecttheShowPasteOptionsbuttonscheckbox.
Inthisexercise,youcreateaworkbooktotrackthenumberofcustomersofThe
GardenCompanymakingpurchasesduringatwo-hourperiodforthreedays.The
workbookwilleventuallyhavesheetsrecordingthetotalnumberofcustomersmak-
ingpurchases(byquarterhour),itemssold,andnumberofitemsinagiventransac-
tion.Youusethedataentrymethodsdescribedearlierinthissection,suchas
AutoFill,FillSeries,andH+F,tofillintheworksheets.
1 OntheStandardtoolbar,clicktheNewbutton.
Ablankworkbookappears.
2 OntheStandardtoolbar,clicktheSavebutton.
TheSavedialogboxappears.
3 Ifnecessary,navigatetotheSBS\Excel\GettingToKnowXLfolderonyourharddisk.
4 IntheFilenamebox,typeSalesTrack.
5 ClickSave.
ExcelsavesyourfileasSalesTrack.xls.
13
1
GettingtoKnowExcel
6 ClickcellB6,andtypeDay.
7 ClickcellC5,andtypeTime.
8 ClickcellB8,andtypeWed.
AblackboxappearsaroundcellB8.
9 MovethemousepointeroverthelowerrightcornerofcellB8.
Themousepointerchangestoablackplussign.
10 ClicktheblackplussignatthelowerrightcornerofcellB8,anddragittocellB10.
ExcelfillscellB9withthevalueThuandcellB10withFri.AsyoudragovercellsB9
andB10,ExceldisplaysaScreenTipindicatingwhichvaluewillappearineachcell.
ScreenTip
11 ClickcellC6,andtype9:00;thenclickcellD6,andtype9:15.
Tip YougiveExceltwovalueswhenyouuseFillSeries:thefirstvaluesetsthe
startingpointfortheseries,andthesecondsetstheincrement.Inthisexample,
9:15is15minutesgreaterthanthestartingvalueof9:00,soExceladds15min-
utestothecurrentcelltogeneratethevalueforthenextcellintheseries.
12 ClickcellC6,anddragtocellD6.
AblackboxappearsaroundcellsC6andD6.
13 MovethemousepointeroverthelowerrightcornerofcellD6.
Whenthemousepointerisoverthelowerrightcornerofthecell,itchangestoa
blackplussign.
14 ClicktheblackplussignatthelowerrightcornerofcellD6,anddragittocellJ6.
ExcelfillsthesixcellsfromE6throughJ6withthenextvaluesintheseries,namely
9:30to10:45,in15-minuteincrements.
14
GettingtoKnowExcel
1
15 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:SalesTrack.xls.
Open
16 OntheStandardtoolbar,clicktheOpenbutton.
TheOpendialogboxappears.
17 ClickDataEntry,andthenclickOpen.
DataEntry.xlsappears.
18 ClicktheSheet2sheettab.
Sheet2appears.
19 ClickcellC8andtypeBambooS,butdonotpressF.
JustafteryoutypetheS,Excelsearchestheexistingitemsinthecolumnand,find-
ingamatch,addsthehighlightedtexttakes (30 cnt) tothecontentsofthecell.
20 Toacceptthesuggestedvalue,Bamboo Stakes (30 cnt),forthecell,pressthe
Fkey.
Excelcompletesthecellentry.
15
1
GettingtoKnowExcel
Important PressingAbeforepressingF(orD)willdeletethehighlighted
textandkeepBamboo Sasthevalueofthecellyouwereediting.
21 ClickcellC9andtypeBambooT,butdonotpressF.
JustafteryoutypetheT,Exceladdsthehighlightedtextrellis.
22 PressDtoacceptthesuggestedvalue,Bamboo Trellis.
Bamboo TrellisappearsincellC9.
23 Right-clickcellC10,andontheshortcutmenuthatappears,clickPickfromList.
Alistofexistingvaluesinthecolumnappears.
24 ClickBirdNetting.
Bird Netting appearsincellC10.
25 ClicktheSheet1sheettab.
Sheet1appears.
26 DragfromcellC8tocellJ10.
ExcelhighlightsthecellsintherectangledefinedattheupperleftbycellC8andat
thelowerrightbycellJ10.NotethatcellC8isstilltheactivecell.
27 Type0,andpressH+F.
Thevalue0appearsineveryselectedcell.
28 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:DataEntry.
16
Microsoft
Office
Specialis
Newin
Office2003
GettingtoKnowExcel
1
CheckingandCorrectingData
Microsoft
Onceyouveenteredyourdata,youshouldtakethetimetocheckandcorrectit.
Office
Specialistt
Youdoneedtoverifyvisuallythateachpieceofnumericdataiscorrect,butyoucan
makesurethatthetextisspelledcorrectlybyusingExcelsspellingchecker.When
thespellingcheckerencountersaworditdoesntrecognize,itwillhighlighttheword
andoffersuggestionsrepresentingitsbestguessofthecorrectword.Youcanthen
edittheworddirectly,picktheproperwordfromthelistofsuggestions,orhavethe
spellingcheckerignorethemisspelling.Youcanalsousethespellingcheckertoadd
anywordsthatarentinthestandarddictionarysothatExcelwillrecognizethem
later,savingyoutimebynotrequiringyoutoidentifythewordsascorrecteverytime
theyoccurinyourworksheets.Onceyouvemadeachange,youcanremovethe
changeaslongasyouhaventclosedtheworkbookwhereyoumadethechange.To
undoachange,youclicktheappropriatetoolbarbuttonoropentheEditmenuand
choosetheUndocommand.Ifyoudecideyouwanttokeepachange,youcanuse
theRedocommandtorestoreit.
Ifyourenotsureofyourwordchoice,orifyouuseawordthatisalmostbutnot
Newin
Office2003
quiterightforyourmeaning,youcancheckforalternativewordsusingtheThesau-
rus.AnumberofotherResearchtoolsarealsoavailable,suchastheEncartaEncyclo-
pedia,whichyoucanrefertoasyoucreateyourworkbook.
Youcanuseadistincttextformattoidentifydatayoumightneedtochangelater.As
anexample,asalesrepresentativeforoneofTheGardenCompanyssuppliersmight
giveTheGardenCompanysowner,CatherineTurner,alistofpricesforupcoming
products,withanotethatthosepricescouldchangeatanytime.Catherinecouldfor-
matthechangeablepricesdifferentlyfromtherestofthepricesintheworksheetand
calltherepresentativetoupdateherworksheetjustbeforetheproductsbecameavail-
able.Afterreceivingthenewprices,shecoulduseFindFormatintheFindandReplace
dialogboxtolocatetheoldpricesandthenchangethembyhand.
Inthisexercise,youhavejustfoundoutthatthemanufactureroftheComfy Chair
haschangedthenameoftheproducttotheCushy Chair.YouuseFindtodetermine
whetherthereareanyoccurrencesofthewordComfy,andifthereare,youuse
ReplacetochangethemtoCushy.Afteryouhavemadethatchange,youuseFind
Formattolocatespeciallyformatteddataandchangeit.Finallyyouusethespelling
checkertoensurethatyourtextdatahasbeenenteredcorrectly.
OPEN:ReplacefromtheSBS\Excel\GettingToKnowXLfolder.
1 Ifnecessary,clicktheFurnituresheettabtodisplaytheFurnitureworksheet.
2 OntheEditmenu,clickFind.
TheFindandReplacedialogboxappearsandopenstotheFindtab.
17
1
GettingtoKnowExcel
Tip YoucanalsoopentheFindandReplacedialogboxbypressingH+f.
3 IntheFindwhatbox,typeComfy,andthenclickFindNext.
ThefirstcellcontainingComfyishighlighted.
4 IntheFindandReplacedialogbox,clickFindNextagain.
ThesecondcellcontainingComfyishighlighted.
Tip ClickingFindAllwouldgeneratealistofmatchingcellsandtheircontents
belowthedialogbox.Clickingoneofthematchesmovesyoutothatinstanceofthe
matchingwordorphrase.
5 ClicktheReplacetab.
TheFindwhatboxstillshowsthewordComfy.
6 IntheReplacewithbox,typeCushy.
7 ClickReplaceAll.
Adialogboxappears,indicatingthatExcelhascompletedtheoperationandthat
threereplacementsweremade.
8 ClickOK.
ThethreeoccurrencesofthewordComfyhavebeenswitchedtoCushy.
Important YoucanchangetheoccurrencesofthewordComfyoneatatime
byclickingtheReplacebuttoninsteadoftheReplaceAllbutton.Youmightdosoto
ensurethattherearenoinstancesinwhichyoudontwanttoreplacetheoriginal
word.
9 IntheFindandReplacedialogbox,clicktheFindtab.
TheFindtabpageappears.
10 CleartheFindwhatbox.
18
GettingtoKnowExcel
1
11 ClicktheOptionsbuttontoexpandtheoptionsontheFindtabpage.
TheFindtabpageoptionsappear.
12 ClicktheFormatbutton.
TheFindFormatdialogboxappears.
13 Ifnecessary,clicktheFonttab.
TheFonttabpageappears.
14 IntheFontstylelist,clickItalic,andthenclickOK.
TheFindFormatdialogboxdisappears.
19
1
GettingtoKnowExcel
Italic
Undo
Redo
15 IntheFindandReplacedialogbox,clickFindNext.
Excelhighlightsthefirstcellcontainingitalicizedtext.
16 IntheFindandReplacedialogbox,clickClose.
TheFindandReplacedialogboxdisappears.
17 OntheFormattingtoolbar,clicktheItalicbutton.
Excelremovesitalicsfromthetextintheselectedcell.
18 Type47.95andpressF.
Excelreplacesthepreviousvalueinthecellwiththevalueyoujustentered.Youwill
nowundothechangeyoujustmade.
19 OntheStandardtoolbar,clicktheUndobutton.
ThecontentsofcellC12revertto44.95.
20 ClicktheUndobutton.
ThecontentsofcellC12areonceagainitalicized.
21 ClicktheRedobutton.
ThecontentsofcellC12arenolongeritalicized.
22 OntheToolsmenu,clickSpelling.
TheSpellingdialogboxappears.ThefirstmisspelledwordExceldetectsappearsin
theNotinDictionarybox,whilethelistofsuggestedreplacementsappearsinthe
Suggestionslist.
20
GettingtoKnowExcel
1
23 Ifnecessary,intheSuggestionslist,clickArborandthenclickChange.
ExcelchangesArbotoArboranddisplaysadialogboxaskingifyouwanttocon-
tinuecheckingspellingfromthebeginningoftheworksheet.
Tip IfyouclickChange,Excelinsertsthesuggestedword.IfyouwantedExcelto
ignorethisoccurrenceofArbo,youcouldhaveclickedIgnoreOnce;clickingIgnore
AllwouldcauseExceltoskipoveranyoccurrenceofArbointheworksheet.Clicking
AddtoDictionarymeansExcelwouldforeverrecognizeArboasawordthatdidnot
needtobecorrected.
24 ClickYes.
Adialogboxappears,indicatingthatthespellingcheckerfoundnomore
misspellings.
25 ClickOK.
Thedialogboxdisappears.
26 ClickcellA1andthen,ontheToolsmenu,clickResearch.
TheResearchtaskpaneappears.
27 IntheResearchtaskpane,clicktheReferencedownarrow(thedownarrownextto
theboxwiththedefaultAll Reference Booksvalue),selectThesaurus:English(U.S.)
fromthelist,andclicktheStartSearchingbutton.
TheresultsofyoursearchappearintheResearchtaskpane.
28 IntheResearchtaskpane,clicktheReferencedownarrow,andselectEncarta
Encyclopedia:English(NorthAmerica)fromthelist.
TheresultsofyoursearchappearintheResearchtaskpane.
CLOSE:Replace.xls.
21
1
GettingtoKnowExcel
KeyPoints
Youcansaveaworkbookinanyfolderyouhavepermissiontouse,andinany
ofseveralfileformats.
TomakeiteasiertosearchforrelevantfilesusingtheWindowssearchtool,be
suretoaddsomekeywordstoyourworkbooksproperties.
ThePasteOptionsbuttongivesyoucontroloverhowyourpasteddataappears
inyourworkbookbesuretouseit!
Ifyouneedtoenteraseriesofdata,useAutoFilltosavetime.
Usethespellingcheckertoensureeverythinginyourworkbookisspelled
correctly.
Ifyourenotsureofyourwordchoice,orwouldliketoexploreatopic,the
Thesaurusandtheotheronlineresearchtoolscanhelpyoufindmore
information.
22
Chapter 2 at a Glance
Makedata
easiertoread,
page31
Addagraphic
toadocument,
page34
page25
Makeworkbooks
easiertoworkwith,
24 Chapter 2 at a Glance
Microsoft
Office
Specialis
2
SettingUpaWorkbook
Inthischapteryouwilllearnto:
Makeworkbookseasiertoworkwith.
Makedataeasiertoread.
Addagraphictoadocument.
OneoftherealstrengthsofMicrosoftExcelisthattheprogramhelpsyoumanage
largequantitiesofdatawithease.Partofthereasonmanaginglargedatacollections
issoeasywithExcelisthatyoucanchangehowExceldisplaysyourdatawithina
worksheet.Ifyouwantmorespacebetweentherowsorcolumnsofaworksheet,
wanttotemporarilylimitwhichdataisshownonthescreen,orevenjustwanttoadd
descriptionsthatmakeiteasierforyouandyourcolleaguestounderstandthedata
thatsstoredinaworksheet,youcandosoquickly.Youcanalsochangehowthose
descriptionsappearinacell,settingthemapartfromthedataintheworksheet.
Anotherwayyoucancustomizeyourworksheetsistoaddgraphics,suchasyour
companyslogoortheimageofaproduct,toaworksheet.Addinggraphicstowork-
sheetspromotesawarenessofyourcompany,identifiesthedataasbelongingtoyour
company,and,inthecaseofaproductimage,givesviewersvaluableinformation
theyneedtomakeapurchasedecision.
Inthischapter,youlllearnhowtomakeworkbookseasiertoworkwith,makedata
easiertoread,andaddagraphictoadocument.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxxixxxxiii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCDtotheirdefaultlocation.SeeUsingtheBooksCD
onpagexiformoreinformation.
MakingWorkbooksEasiertoWorkWith
Microsoft
Animportantcomponentofmakingworkbookseasytoworkwithistogiveusersan
Office
Specialistt
ideaofwheretofindthedatatheyrelookingfor.Excelprovidesseveralwaystoset
upsignpostsdirectinguserstowardthedatatheywant.Thefirstmethod,discussedin
Chapter1,GettingtoKnowExcel,istogiveeachworkbookadescriptivename.
Onceusershaveopenedtheproperworkbook,youcanguidethemtoaspecific
25
2
SettingUpaWorkbook
worksheetbygivingeachworksheetaname;thenamesaredisplayedonthesheet
tabsinthelowerleftcorneroftheworkbookwindow.Tochangeaworksheets
name,youright-clickthesheettaboftheworksheetyouwantand,fromtheshortcut
menuthatappears,chooseRename.ChoosingRenameopenstheworksheetname
forediting.Youcanalsochangetheorderofworksheetsinaworkbookbydragging
thesheettabofaworksheettothedesiredpositiononthenavigationbar,bringing
themostpopularworksheetstothefrontofthelist.
Ifyouneedmorethanthreeworksheetsinmostoftheworkbooksyoucreate,you
canchangethedefaultnumberofworksheetsinyournewworkbooks.Tochangethe
defaultnumberofworksheets,ontheToolsmenu,clickOptions.IntheOptionsdialog
box,clicktheGeneraltab,and,intheSheetsInNewWorkbookbox,typethenumber
ofworksheetsyouwantinyournewworkbooks,andclickOK.
Afteryouhaveputupthesignpoststhatmakeyourdataeasytofind,youcantake
otherstepstomakethedatainyourworkbookseasiertoworkwith.Forinstance,
youcanchangethewidthofacolumnortheheightofarowinaworksheetbydrag-
gingthecolumnorrowsbordertothedesiredposition.Increasingacolumnswidth
orarowsheightincreasesthespacebetweencellcontents,makingiteasiertoselect
acellsdatawithoutinadvertentlyselectingdatafromothercellsaswell.
Tip Youcanapplythesamechangetomorethanoneroworcolumnbyselectingthe
rowsorcolumnsyouwanttochangeandthendraggingtheborderofoneoftheselected
rowsorcolumnstothedesiredlocation.Whenyoureleasethemousebutton,allofthe
selectedrowsorcolumnswillchangetothenewheightorwidth.
Modifyingcolumnwidthandrowheightcanmakeaworkbookscontentseasierto
workwith,butyoucanalsoinsertaroworcolumnbetweentheedgeofaworksheet
andthecellsthatcontainthedatatoaccomplishthisaswell.Addingspacebetween
theedgeofaworksheetandcells,orperhapsbetweenalabelandthedatatowhich
itrefers,makestheworkbookscontentslesscrowdedandeasiertoworkwith.You
insertrowsbyclickingacellandthen,ontheInsertmenu,clickingRows.Excel
insertsarowabovetheactivecell.Youinsertacolumninmuchthesamewayby
clickingColumnsontheInsertmenu.Whenyoudothis,Excelinsertsacolumntothe
leftoftheactivecell.
Likewise,youcaninsertindividualcellsintoaworksheet.Toinsertacell,clickthecell
thatiscurrentlyinthepositionwhereyouwantthenewcelltoappear,andonthe
Insertmenu,clickCellstodisplaytheInsertdialogbox.IntheInsertdialogbox,you
canchoosewhethertoshiftthecellssurroundingtheinsertedcelldown(ifyourdata
isarrangedasacolumn)ortotheright(ifyourdataisarrangedasarow).Whenyou
clickOK,thenewcellappears,andthecontentsofaffectedcellsshiftdownortothe
right,asappropriate.Inasimilarvein,ifyouwanttodeleteablockofcells,selectthe
cells,andontheEditmenu,clickDeletetodisplaytheDeletedialogbox,complete
26
Mergeand
Center
SettingUpaWorkbook
2
withoptionbuttonsthatletyouchoosehowtoshiftthepositionofthecellsaround
thedeletedcells.
Tip TheInsertdialogboxalsoincludesoptionbuttonsyoucanselecttoinsertanew
roworcolumn;theDeletedialogboxhassimilarbuttonsthatletyoudeleteanentirerow
orcolumn.
Insomecases,thevaluesyouwanttoputinthenewcellsmightalreadyexistinyour
worksheet.Forexample,CatherineTurnermighthavetypedsomesalesdataintoa
blankworksheetinanticipationofmodifyingthesheetoncetherestofthedatawas
entered.Youcanmovecellsfromanotherpartofyourworksheet,ratherthanjust
copyorcutthevaluesfromthecellsandpastethemintoothercells,byusingavari-
ationofthestandardcut-and-pasteoperation.Afteryouselectthecellsandclickthe
CuttoolbarbuttonontheStandardtoolbar,ontheInsertmenu,clickCutCells.The
InsertPastedialogboxwillappear,allowingyoutochoosehowtoshiftthecellssur-
roundingthecellsyoureinserting.
Tip IfyouclicktheCopytoolbarbuttoninsteadoftheCuttoolbarbutton,themenu
itemontheInsertmenuwillbeCopyCellsinsteadofCutCells.
Sometimesaddingcellsorevenchangingarowsheightoracolumnswidthisntthe
bestwaytoimproveyourworkbooksusability.Forinstance,eventhoughacolumn
labelmightnotfitwithinasinglecell,increasingthatcellswidth(oreverycells
width)mightthrowofftheworksheetsdesign.Whileyoucantypeindividualwords
incellssothatthelabelfitsintheworksheet,anotheralternativeistomergetwoor
morecells.MergingcellstellsExceltotreatagroupofcellsasasinglecellasfaras
contentandformattinggo.Tomergecellsintoasinglecell,youclicktheMergeand
Centertoolbarbutton.Asthenameofthebuttonimplies,Excelcentersthecontents
ofthemergedcell.
Tip ClickingamergedcellandthenclickingtheMerge and Centertoolbarbutton
removesthemerge.
Ifyouwanttodeletearoworcolumn,youright-clicktheroworcolumnheadand
then,fromtheshortcutmenuthatappears,clickDelete.Youcantemporarilyhidea
numberofrowsorcolumnsbyselectingthoserowsorcolumnsandthen,onthe
Formatmenu,pointingtoRoworColumnandthenclickingHide.Therowsorcol-
umnsyouselecteddisappear,buttheyarentgoneforgood,astheywouldbeif
youdusedDelete.Instead,theyhavejustbeenremovedfromthedisplayuntilyou
callthemback;toreturnthehiddenrowstothedisplay,ontheFormatmenu,point
toRoworColumnandthenclickUnhide.
Whenyouinsertarow,column,orcellinaworksheetwithexistingformatting,the
InsertOptionsbuttonappears.AswiththePasteOptionsbuttonandtheAutoFill
Optionsbutton,clickingtheInsertOptionsbuttondisplaysalistofchoicesyoucan
27
2
SettingUpaWorkbook
makeabouthowtheinsertedroworcolumnshouldbeformatted.Theoptionsare
summarizedinthefollowingtable.
Option Action
FormatSameasAbove Applytheformatoftherowabovetheinsertedrowtothe
newrow.
FormatSameasBelow Applytheformatoftherowbelowtheinsertedrowtothe
newrow.
FormatSameasLeft Applytheformatofthecolumntotheleftoftheinserted
columntothenewcolumn.
FormatSameasRight Applytheformatofthecolumntotherightoftheinserted
columntothenewcolumn.
ClearFormatting Applythedefaultformattothenewroworcolumn.
Inthisexercise,youmaketheworksheetcontaininglastJanuaryssalesdataeasierto
read.Firstyounametheworksheetandbringittothefrontofthelistofworksheetsin
itsworkbook.Nextyouincreasethecolumnwidthandrowheightofthecellsholding
thesalesdata.Inaddition,youmergeandcentertheworksheetstitleandthenadda
rowbetweenthetitleandtherowthatholdsthetimesforwhichTheGardenCompany
recordedsales.Thenyouaddacolumntotheleftofthefirstcolumnofdataandthen
hiderowscontainingdataforallbutthefirstweekofthemonth.
OPEN:Easier.xlsfromtheSBS\Excel\SettingUpWorkbookfolder.
1 SelectcellsC1toD3and,ontheStandardtoolbar,clicktheCutbutton.
2 SelectcellsB5toC7.
3 OntheInsertmenu,clickCutCells.
TheInsertPastedialogboxappears.
4 Ifnecessary,selecttheShiftCellsRightoptionbutton,andclickOK.
ThecutcellsappearincellsB5toC7,pushingtheexistingcellstotheright.The
valuesincellsC5toC7arerepeatedincorrectlyincellsD5toD7.
5 SelectcellsD5toD7and,ontheEditmenu,clickDelete.
TheDeletedialogboxappears.
6 Ifnecessary,selecttheShiftCellsLeftoptionbutton,andclickOK.
CellsD5toD7aredeleted.
28
SettingUpaWorkbook
2
7 Inthelowerleftcorneroftheworkbookwindow,right-clicktheSheet2sheettab.
8 Fromtheshortcutmenuthatappears,clickRename.
Sheet2ishighlighted.
9 TypeJanuary,andpressF.
ThenameoftheworksheetchangesfromSheet2toJanuary.
10 ClicktheJanuarysheettab,anddragittotheleftoftheSheet1sheettab.
TheJanuarysheettabmovestotheleftoftheSheet1sheettab.Asthesheettab
moves,aninvertedblacktrianglemarksthesheetslocationintheworkbook.
11 ClickthecolumnheadforcolumnA,anddragtocolumnM.
ColumnsAthroughMarehighlighted.
12 PositionthemousepointerovertherightedgeofcolumnA,anddragtheedgeto
therightuntiltheScreenTipreadsWidth: 10.00 (75 pixels).
13 Thewidthoftheselectedcolumnschanges.
14 Selectrows3through35.
Rows3through35arehighlighted.
15 Positionthemousepointeroverthebottomedgeofrow3,anddragtheedgedown
untiltheScreenTipsaysHeight: 25.50 (34 pixels).
29
2
SettingUpaWorkbook
Theheightoftheselectedrowschanges.
16 ClickcellE2,anddragtocellG2.
17 OntheFormattingtoolbar,clicktheMergeandCentertoolbarbutton.
CellsE2,F2,andG2aremergedintoasinglecell,andthenewcellscontentsare
centered.
Important Dependingonthescreenresolutionyouhavesetonyourcomputer
andwhichtoolbarbuttonsyouusemostoften,itspossiblethatnoteverybuttonon
everytoolbarwillappearonyourExceltoolbars.Ifabuttonmentionedinthisbook
doesntappearonatoolbar,clicktheToolbarOptionsdownarrowonthattoolbarto
displaytherestofthebuttonsavailableonthattoolbar.
18 ClickcellA3.
19 OntheInsertmenu,clickRows.
Anewrow,labeledrow3,appearsabovetherowpreviouslylabeledrow3.
20 OntheInsertmenu,clickColumns.
Anewcolumn,labeledcolumnA,appearstotheleftofthecolumnpreviously
labeledcolumnA.
21 Selectrows13through36.
Rows13through36arehighlighted.
22 OntheFormatmenu,pointtoRow,andthenclickHide.
Rows13through36disappearfromtheworksheet.
30
Microsoft
Office
Specialis
SettingUpaWorkbook
2
23 OntheFormatmenu,pointtoRow,andthenclickUnhide.
Thehiddenrowsreappearintheworksheet.
24 OntheToolsmenu,clickOptions.
TheOptionsdialogboxappears.
25 ClicktheGeneraltab.
TheGeneraltabpageappears.
26 IntheSheetsInNewWorkbookbox,type12.
27 ClickOK.
28 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesthedocument.
CLOSE:Easier.xls.
MakingDataEasiertoRead
Microsoft
Afteryouhavemodifiedyourworksheetsothatitiseasiertoworkwith,youcan
Office
Specialistt
makethedataeasiertoreadbychanginghowdataispresentedwithinthework-
sheetscells.Onecaseinwhichyoumightwanttochangehowdataispresented
occursifthedatadoesntfitinacellsboundariesandyoudontwanttomergethe
cellsthedataoverlapswith.Forinstance,youcouldchoosenottomergethecells
becauseyoumightwanttoadddataorcommentstotheneighboringcellslater.
31
2
SettingUpaWorkbook
Thefollowinggraphicshowswhathappensifthereisaspilloverintwoadjacentcells.
Ifthecelltotherightwereempty,thetextintheleftcellwouldsimplyspilloverinto
thecelltoitsright.Whenthereisdatainthecelltotheright,however,Excelbringsit
tothefront,hidinganydatathatspillsoverfromtheadjoiningcell.Toavoidhiding
thetextinthefirstcellbehindthetextinthesecondcell,youcanhavethetextwrap
withinthefirstcell,asseeninthefollowinggraphic.
Tip Itmaybetemptingtojustchangeacolumnswidthtoaccommodateyourdata,but
rememberthatwideningasinglecolumnwillmakethatcolumnstandoutinthework-
sheet,possiblycausingdatainothercolumnstobecomehardertoread.
Anothermethodformakingyourdataeasiertoreadistodistinguishanydatalabels
bychanginghowthedataappearsinacell.Onewaytoseparatedatalabelsfrom
thedatathatfollowsthemistochangethealignmentofthelabelsintheircells.For
example,youcancenterthedatalabelsintheircells,settingthelabelsapartfromthe
right-aligneddatafartherdowninthecolumn.
Youcanalsomakeyourworksheetdataeasiertoreadbyensuringthatthedata
labelsatthetopofacolumnfreeze,orremainonthescreenregardlessofhowfar
downinthedocumentyouscroll.Forinstance,CatherineTurner,theownerofThe
GardenCompany,mightnotrememberwhichdataiskeptinwhichcolumnina
worksheet.Freezingthedatalabelsatthetopofthecolumnwouldletherscrollto
thelastrowoftheworksheetandstillhavethelabelsvisibleasareference.Excel
marksthedivisionbetweenfrozenandunfrozencellswithasplit bar.
Splitbar
32
SettingUpaWorkbook
2
Troubleshooting WhenyoutellExceltofreezerowsinyourworksheet,Excel
freezestherowsabovetheactivecellandthecolumnstotheleftoftheactivecell.So,if
youwanttofreezethetopthreerowsofyourworksheet,clickthefirstcellinthefourth
row(cellA4)andthenturnonthefreeze.Ifyouwantedtofreezethetopthreerowsand
thefirstcolumn,youwouldclickthesecondcellinthefourthrow(cellB4).
Inthisexercise,youpreventthetextinacellfromspillingoverintoadjoiningcells,
allowingyoutoentercommentsinthoseadjoiningcellswithoutobscuringthecon-
tentsofthefirstcell.Youthenchangethealignmentofthecellscontainingthedata
labelsforthecolumnsinyourworksheetandthenfreezethosedatalabelssothat
theyremainatthetopofthepageasyouscrolldownthroughtheworksheet.
OPEN:DataRead.xlsfromtheSBS\Excel\SettingUpWorkbookfolder.
1 Ifnecessary,clicktheSalesbyCategorysheettab.
2 ClickcellB34.
3 OntheFormatmenu,clickCells.
TheFormatCellsdialogboxappears.
4 Ifnecessary,clicktheAlignmenttab.
5 Ifnecessary,selecttheWraptextcheckbox,andclickOK.
ThetextincellB34wrapstofitwithintheoriginalbordersofthecell.
6 ClickcellB1,anddragtocellE1.
7 OntheFormattingtoolbar,clicktheCenterbutton.
Center
33
Microsoft
Office
Specialis
2
SettingUpaWorkbook
Thecontentsoftheselectedcellsarecenteredwithinthosecells.
8 ClickcellA2.
9 OntheWindowmenu,clickFreezePanes.
Asplitbarappearsbetweenrow1androw2.
10 Ontheverticalscrollbar,clickthedownarrow.
Row1staysinplacewhiletheremainingrowsscrollnormally.
11 OntheWindowmenu,clickUnfreezePanes.
Thesplitbardisappears,andallrowsscrollnormally.
12 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:DataRead.xls.
AddingaGraphictoaDocument
Microsoft
Animportantpartofestablishingastrongbusinessiscreatingamemorablecorporate
Office
Specialistt
identity.Settingasidetheobviousneedforsoundmanagement,twoimportantphysi-
calattributesofastrongretailbusinessareawell-conceivedshopspaceandaneye-
catching,easy-to-rememberlogo.Onceyouoryourgraphicartisthascreatedalogo,
youshouldaddthelogotoallofyourdocuments,especiallyanythatmightbeseen
byyourcustomers.Notonlydoesthelogomarkthedocumentsascomingfromyour
company,italsoservesasanadvertisement,encouraginganyonewhoseesyour
worksheetstocallorvisityourcompany.
OnewaytoaddapicturetoaworksheetistogothroughtheInsertmenuandclick
thePictureitem.ClickingPictureshowsasubmenuthatlistsseveralsourcesfrom
whichyoucanchooseapicturetoadd;inthiscase,whereyoureaddingalogo
youvesavedasagraphicsfile,youcanclicktheFromFileitemtoopenadialogbox
thatletsyoulocatethepictureyouwanttoaddfromyourharddisk.
34
SettingUpaWorkbook
2
Tip Whenyouinsertapicture,thePicturetoolbarmightappear.ThePicturetoolbar
containsbuttonsthatletyouchangethepicturescontrast,brightness,andsoon.You
canusethosebuttonstochangeyourpicturesappearance,butyoudontgetasmuch
controlaswhenyouusetheFormatPicturedialogbox,presentedlaterinthissection.
Onceyouveaddedthepicturetoyourworksheet,youcanchangethepictures
locationontheworksheetbydraggingittothedesiredspot.Youcanalsochange
theappearanceofthepicturebyopeningtheFormatmenuandchoosingPicture.
Then,intheFormatPicturedialogbox,youcanmodifytheimagessizeorbrightness,
rotatetheimageonthepage,orcropawayanyportionoftheimagethatyoudont
wanttoshow.
Youcanalsoresizeapicturebyclickingitandthendraggingoneofthehandlesthat
appearsonthegraphic.UsingtheFormatPicturedialogboxhelpsensurethatthe
aspect ratio,orrelationshipbetweenthepicturesheightandwidth,doesntchange.If
youdoaccidentallyresizeagraphicbydraggingahandle,justclicktheUndobutton
toremoveyourchange.
Ifyoudliketogeneratearepeatingimageinthebackgroundofaworksheet,forming
atiledpatternbehindyourworksheetsdata,youcanopentheFormatmenu,pointto
Sheet,andclickBackground.IntheSheetBackgrounddialogbox,clicktheimagethat
youwanttoserveasthebackgroundpatternforyourworksheet,andclickOK.
Tip Toremoveabackgroundimagefromaworksheet,opentheFormatmenu,pointto
Sheet,andclickDeleteBackground.
Inthisexercise,youaddthenewlogoforTheGardenCompanytoanexistingwork-
sheet,changethegraphicslocationontheworksheet,reducethesizeofthegraphic,
changetheimagesbrightnessandcontrast,rotateandcroptheimage,deletethe
image,andthensettheimageasarepeatingbackgroundfortheworksheet.
OPEN:AddPicture.xlsfromtheSBS\Excel\SettingUpWorkbookfolder.
1 ClickcellA1.
2 OntheInsertmenu,pointtoPicture,andthenclickFromFile.
TheInsertPicturedialogboxappears.
3 Ifnecessary,navigatetotheSettingUpWorkbookfolderandthendouble-click
tgc_logo.gif.
ThechosengraphicappearsintheAddPicture.xlsfile.
35
2
SettingUpaWorkbook
4 Right-clickthegraphic,andfromtheshortcutmenuthatappears,clickFormat
Picture.
TheFormatPicturedialogboxappears.
5 ClicktheSizetab.
TheSizetabpageappears.NoticethattheLockaspectratiocheckboxisselected.
36
SettingUpaWorkbook
2
6 IntheScalesectionofthetabpage,clearthecontentsoftheHeightbox,and
type50%.
7 IntheSizeandRotatesectionofthetabpage,clearthecontentsoftheRotation
box,type180,andclickOK.
Thepictureisresized,maintainingtheoriginalaspectratio,androtated.
8 Clickthecenterofthegraphic,anddragitsothatitiscenteredhorizontallyonthe
screenandthetopofthegraphicisjustbelowrow1.
Thegraphicmoveswithyourmousepointer.
Troubleshooting Rememberthatdraggingoneofthehandlesattheedge
ofthegraphicwillresizethegraphic.Ifyouaccidentallyresizethelogoinsteadof
movingit,clicktheUndobutton.
9 OntheFormatmenu,clickPicture.
TheFormatPicturedialogboxappears.
10 ClickthePicturetab.
ThePicturetabpageappears.
11 IntheImageControlsectionofthedialogbox,clearthecontentsoftheBrightness
box,andtype40.
12 IntheImageControlsectionofthedialogbox,clearthecontentsoftheContrast
box,andtype40.
13 IntheCropFromsectionofthedialogbox,clearthecontentsoftheTopbox,type
.5,andclickOK.
Theimagechangestoreflectthepropertiesyouset.
14 Ifnecessary,selecttheimage,and,ontheStandardtoolbar,clicktheCutbutton.
Theimagedisappears.
15 OntheFormatmenu,pointtoSheet,andclickBackground.
TheSheetBackgrounddialogboxappears.
16 Ifnecessary,navigatetotheSettingUpWorkbookfolderandthendouble-click
tgc_logo.gif.
Theimagerepeatsinthebackgroundoftheactiveworksheet.
37
2
SettingUpaWorkbook
17 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:AddPicture.xls.
KeyPoints
Youcancontrolhowmanyworksheetsappearinnewworkbooksyoucreate.If
youalwaysuseworkbookswhereeachworksheetrepresentsamonthofthe
year,changethedefaultnumberofworksheetsto12!
Makingsureyourdataiseasilyreadableisoneofthebestthingsyoucandofor
yourcolleagues.Besureyourworksheetcolumnsandrowsareroomyenough
toaccommodateyourdata.
Rememberthatyoucanaddordeleteindividualcellsfromaworksheet.Rather
thangothroughalengthycut-and-pasteroutinewhenyouforgottotypeacell
value,justaddacellwhereyouneedit.
Ifyouaddagraphictoyourworksheet,youcanchangethegraphicssizeand
appearanceusingtheFormatPicturedialogbox.
38
Chapter 3 at a Glance
Namegroupsofcells,
page42
Createformulas
tocalculatevalues,
page44
Findandcorrect
errorsincalculations,
page50
40 Chapter 3 at a Glance
3
PerformingCalculations
onData
Inthischapteryouwilllearnto:
Namegroupsofcells.
Createformulastocalculatevalues.
Findandcorrecterrorsincalculations.
MicrosoftExcelworkbooksgiveyouahandyplacetostoreandorganizeyourdata,
butyoucanalsodoalotmorewithyourdatainExcel.Oneimportanttaskyoucan
performinExcelistocalculatetotalsforthevaluesinaseriesofrelatedcells.You
canalsouseExceltofindoutotherinformationaboutthedatayouselect,suchasthe
maximumorminimumvalueinagroupofcells.Findingthemaximumorminimum
valueinagroupcanletyouidentifyyourbestsalesperson,productcategoriesyou
mightneedtopaymoreattentionto,orsuppliersthatconsistentlygiveyouthebest
deal.Regardlessofyourbookkeepingneeds,Excelgivesyoutheabilitytofindthe
informationyouwant.Andifyoushouldmakeanerror,youcanfindthecauseand
correctitquickly.
Manytimesyoucantaccesstheinformationyouwantwithoutreferencingmorethan
onecell,anditsalsooftentruethatyoullusethedatainthesamegroupofcellsfor
morethanonecalculation.Excelmakesiteasytoreferenceanumberofcellsatonce,
lettingyoudefineyourcalculationsquickly.
Inthischapter,youlllearnhowtostreamlinereferencestogroupsofdatainyour
worksheetsandhowtocreateandcorrectformulasthatsummarizethesalesand
productdatafromTheGardenCompany.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxxxiiixxxv.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
41
Microsoft
Office
Specialis
3
PerformingCalculationsonData
NamingGroupsofData
Microsoft
Whenyouworkwithlargeamountsofdata,itseasiertoidentifygroupsofcellsthat
Office
Specialistt
containrelateddata.Inthefollowinggraphic,forexample,cellsC2throughC6hold
thepricesofitemsfromacustomersorder.
Ratherthanspecifythecellsindividuallyeverytimeyouwanttousethedatathey
contain,youcandefinethosecellsasarange(alsocalledanamed range).For
instance,youcouldgrouptheitemsfromthepreviousgraphicintoarangenamed
OrderItems1.Wheneveryouwanttousethecontentsofthatrangeinacalculation,
youcansimplyusethenameoftherangeinsteadofspecifyingeachcellindividually.
Youcancreateanamedrangeinanumberofways,twoofwhichyoucanaccess
throughtheInsertmenu.Thefirstmethodworkswellifyouhaveacolumnofdata
withalabelattheheadofthecolumn,asinthefollowinggraphic.
Inthiscase,youaccesstheCreateNamesdialogboxbypointingtoNameonthe
InsertmenuandclickingCreate.IntheCreateNamesdialogbox,youcandefinea
namedrangebyhavingExcelusethelabelinthetopcellastherangesname.You
canalsocreateanddeletenamedrangesthroughtheDefineNamedialogbox,which
youaccessbypointingtoDefineontheInsertmenuandclickingName.
Afinalwaytocreateanamedrangeistoselectthecellsyouwantintherange,clickin
theNameboxnexttotheformulabar,andthentypethenamefortherange.Youcan
displaytherangesavailableinaworkbookbyclickingtheNameboxsdownarrow.
42
PerformingCalculationsonData
3
Important Everyrangeinaworkbookmusthaveauniquename.Assigningthe
nameofanexistingrangetoanewrangeremovestheoriginalreference,likelyaffecting
howyourworksheetbehaves.
Inthisexercise,youwillcreatenamedrangestostreamlinereferencestogroupsofcells.
OPEN:NameRangefromtheSBS\Excel\PerformingCalculationsfolder.
1 Ifnecessary,clicktheToolssheettab.
2 ClickcellC3anddragtocellC18.
Theselectedcellsarehighlighted.
3 OntheInsertmenu,pointtoName,andthenclickCreate.
TheCreateNamesdialogboxappears.
4 Ifnecessary,selecttheToprowcheckbox.
5 ClickOK.
ExcelassignsthenamePrice tothecellrange.
6 Inthelowerleftcorneroftheworkbookwindow,clicktheSuppliessheettab.
TheSuppliesworksheetappears.
7 ClickcellC4anddragtocellC29.
8 OntheInsertmenu,pointtoName,andthenclickDefine.
TheDefineNamedialogboxappears.
43
Microsoft
Office
Specialis
3
PerformingCalculationsonData
9 IntheNamesinWorkbookbox,typeSuppliesPriceandthenclickOK.
ExcelassignsthenameSuppliesPricetothecellrange,andtheDefineNamedialog
boxdisappears.
10 Inthelowerleftcorneroftheworkbookwindow,clicktheFurnituresheettab.
TheFurnitureworksheetappears.
11 ClickcellC4anddragtocellC18.
12 ClickintheNamebox.
ThecontentsoftheNameboxarehighlighted.
13 TypeFurniturePrice,andpressF.
ExcelassignsthenameFurniturePrice tothecellrange.
14 OntheInsertmenu,pointtoName,andthenclickDefine.
TheDefineNamedialogboxappears.
15 IntheNamesinworkbooklistoftheDefineNamedialogbox,clickPrice.
Price appearsintheNamesinworkbookbox.
16 IntheNamesinworkbookbox,deletePrice,typeToolsPrice,andthenclickOK.
TheDefineNamedialogboxdisappears.
17 OntheStandardtoolbar,clicktheSavebutton.
Save
CLOSE:NameRange.
CreatingFormulastoCalculateValues
Microsoft
Onceyouveaddedyourdatatoaworksheetanddefinedrangestosimplifydataref-
Office
Specialistt
erences,youcancreateaformula,oranexpressionthatperformscalculationson
yourdata.Forexample,youcancalculatethetotalcostofacustomersorder,figure
theaveragesalesforallWednesdaysinthemonthofJanuary,orfindthehighestand
lowestdailysalesforaweek,month,oryear.
TowriteanExcelformula,youbeginthecellscontentswithanequalsignwhen
Excelseesit,itknowsthattheexpressionfollowingitshouldbeinterpretedasacalcu-
lationandnottext.Aftertheequalsign,youtypetheformula.Forinstance,youcan
findthesumofthenumbersincellsC2andC3usingtheformula=C2+C3.Afteryou
haveenteredaformulaintoacell,youcanreviseitbyclickingthecellandthenediting
theformulaintheformulabar.Forexample,youcanchangetheprecedingformulato
=C3-C2,whichcalculatesthedifferencebetweenthecontentsofcellsC2andC3.
44
PerformingCalculationsonData
3
Troubleshooting IfExceltreatsyourformulaastext,makesureyouhaventacci-
dentallyputaspacebeforetheequalsign.Remember,theequalsignmustbethefirst
character!
Typingthecellreferencesfor15or20cellsinacalculationwouldbetedious,but
Excelmakesiteasytohandlecomplexcalculations.Tocreateanewcalculation,you
clickFunctionontheInsertmenu.TheInsertFunctiondialogboxappears,withalist
offunctions,orpredefinedformulas,fromwhichyoucanchoose.
Themostusefulfunctionsinthelistaredescribedinthefollowingtable.
Item Description
SUM Returnsthesumofthenumbersinthespecifiedcells
AVERAGE Findstheaverageofthenumbersinthespecifiedcells
COUNT Findsthenumberofentriesinthespecifiedcells
MAX Findsthelargestvalueinthespecifiedcells
MIN Findsthesmallestvalueinthespecifiedcells
TwootherfunctionsyoumightusearetheNOW()andPMT()functions.TheNOW()
functionreturnsthetimetheworkbookwaslastopened,sothevaluewillchange
everytimetheworkbookisopened.Theproperformforthisfunctionis=NOW();to
updatethevaluetothecurrentdateandtime,justsaveyourwork,closethework-
book,andthenreopenit.ThePMT()functionisabitmorecomplex.Itcalculates
paymentsdueonaloan,assumingaconstantinterestrateandconstantpayments.To
performitscalculations,thePMT()functionrequiresaninterestrate,thenumberof
45
3
PerformingCalculationsonData
monthsofpayments,andthestartingbalance.Theelementstobeenteredintothe
functionarecalledargumentsandmustbeenteredinacertainorder.Thatorderis
writtenPMT(rate, nper, pv, fv, type).Thefollowingtablesummarizestheargumentsin
thePMT()function.
Argument Description
rate Theinterestrate,tobedividedby12foraloanwithmonthlypayments
nper Thetotalnumberofpaymentsfortheloan
pv Theamountloaned(pvisshortforpresentvalue,orprincipal)
fv Theamounttobeleftoverattheendofthepaymentcycle(usuallyleft
blank,whichindicates0)
type 0or1,indicatingwhetherpaymentsaremadeatthebeginningorat
theendofthemonth(usuallyleftblank,whichindicates0,ortheend
ofthemonth)
Ifyouwantedtoborrow$20,000atan8percentinterestrateandpaytheloanback
over24months,youcouldusethePMT()functiontofigureoutthemonthlypay-
ments.Inthiscase,thefunctionwouldbewritten=PMT(8%/12, 24, 20000),which
calculatesamonthlypaymentof$904.55.
Youcanalsoaddthenamesofanyrangesyouvedefinedtoaformula.Forexample,
ifthenamedrangeOrder1referstocellsC2throughC6,youcancalculatetheaver-
ageofcellsC2throughC6withtheformula=AVERAGE(Order1).Ifyouwantto
includeaseriesofcontiguouscellsinaformulabutyouhaventdefinedthecellsasa
namedrange,youcanclickthefirstcellintherangeanddragtothelastcell.Ifthe
cellsarentcontiguous,holddowntheHkeyandclickthecellstobeincluded.In
bothcases,whenyoureleasethemousebutton,thereferencesofthecellsyou
selectedappearintheformula.
Anotheruseforformulasistodisplaymessageswhencertainconditionsaremet.For
instance,CatherineTurner,theownerofTheGardenCompany,mightprovideafree
copyofagardeningmagazinetocustomersmakingpurchasesworthmorethan$150.
Thiskindofformulaiscalledaconditional formula,anditusestheIFfunction.To
createaconditionalformula,youclickthecelltoholdtheformulaandopenthe
InsertFunctiondialogbox.Fromwithinthedialogbox,youselectIFfromthelistof
availablefunctionsandthenclickOK.TheFunctionArgumentsdialogboxappears.
46
PerformingCalculationsonData
3
WhenyouworkwithanIFfunction,theFunctionArgumentsdialogboxwillhave
threeboxes:Logical_test,Value_if_true,andValue_if_false.TheLogical_testboxholds
theconditionyouwanttocheck.Tocheckwhetherthetotalforanorderisgreater
than$150,theexpressionwouldbeSUM(Order1)>150.
NowyouneedtohaveExceldisplaymessagesindicatingwhetherthecustomer
shouldreceiveafreemagazine.TohaveExcelprintamessagefromanIFfunction,
youenclosethemessageinquotesintheValue_if_trueorValue_if_falsebox.Inthis
case,youwouldtype"Qualifies for a free magazine!"intheValue_if_trueboxand
"Thanks for your order!"intheValue_if_falsebox.
Onceyouvecreatedaformula,youcancopyitandpasteitintoanothercell.When
youdo,Excelwilltrytochangetheformulasothatitworksinthenewcells.For
instance,inthefollowinggraphic,cellD8containstheformula=SUM(C2:C6).
47
3
PerformingCalculationsonData
ClickingcellD8,copyingthecellscontents,andthenpastingtheresultintocellD16
writes=SUM(C10:C14) intocellD16.Excelhasreinterpretedtheformulasothatitfits
thesurroundingcells!Excelknowsitcanreinterpretthecellsusedintheformula
becausetheformulausesarelative reference,orareferencethatcanchangeifthe
formulaiscopiedtoanothercell.Relativereferencesarewrittenwithjustthecellrow
andcolumn(forexample,C14).Ifyouwantacellreferencetoremainconstantwhen
theformulausingitiscopiedtoanothercell,youcanuseanabsolutereference.To
writeacellreferenceasanabsolutereference,youtype$beforetherownameand
thecolumnnumber.IfyouwantedtheformulaincellD16toshowthesumofvalues
incellsC10throughC14regardlessofthecellintowhichitispasted,youwould
writetheformulaas=SUM($C$10:$C$14).
Tip Ifyoucopyaformulafromtheformulabar,useabsolutereferences,oruseonly
namedrangesinyourformula.Excelwontchangethecellreferenceswhenyoucopyyour
formulatoanothercell.
Inthisexercise,youcreateaformulatofindthetotalcostofanorder,copythatfor-
mulatoanothercell,andthencreateaformulatofindtheaveragecostofitemsinthe
order.Thecellswiththecostofproductsinthisorderarestoredinthenamedrange
OrderItems.
OPEN:FormulafromtheSBS\Excel\PerformingCalculations folder.
1 ClickcellD7.
D7becomestheactivecell.
2 Intheformulabar,type=SUM,dragfromcellD4toD5,andpressF.
Thevalue$63.90 appearsincellD7.
48
PerformingCalculationsonData
3
Copy
Paste
3 ClickcellD7,andthen,ontheStandardtoolbar,clicktheCopybutton.
ExcelcopiestheformulaincellD7totheClipboard.
4 ClickcellD8,andthen,ontheStandardtoolbar,clickthePastebutton.
Thevalue$18.95appearsincellD8,and=SUM(D5:D6)appearsintheformulabar.
5 PressA.
TheformulaincellD8disappears.
6 OntheInsertmenu,clickFunction.
TheInsertFunctiondialogboxappears.
7 ClickAVERAGE,andthenclickOK.
TheFunctionArgumentsdialogboxappears,withthecontentsoftheNumber1box
highlighted.
8 TypeOrderItems,andthenclickOK.
TheFunctionArgumentsdialogboxdisappears,and$31.95 appearsincellD8.
49
Microsoft
Office
Specialis
3
PerformingCalculationsonData
9 ClickcellC10.
10 OntheInsertmenu,clickFunction.
TheInsertFunctiondialogboxappears.
11 IntheSelectafunctionlist,clickIFandthenclickOK.
TheFunctionArgumentsdialogboxappears.
12 IntheLogical_testbox,typeD7>50.
13 IntheValue_if_truebox,type"5%discount".
14 IntheValue_if_falsebox,type"Nodiscount"andthenclickOK.
TheFunctionArgumentsdialogboxdisappears,and5% discountappearsin
cellC10.
15 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:Formula.
FindingandCorrectingErrorsinCalculations
Microsoft
Includingcalculationsinaworksheetgivesyouvaluableanswerstoquestionsabout
Office
Specialistt
yourdata.Asisalwaystrue,however,itispossibleforerrorstocreepintoyourfor
mulas.Excelmakesiteasytofindthesourceoferrorsinyourformulasbyidentifying
thecellsusedinagivencalculationanddescribinganyerrorsthathaveoccurred.The
processofexaminingaworksheetforerrorsinformulasisreferredtoasauditing.
Excelidentifieserrorsinseveralways.Thefirstwayistofillthecellholdingthefor
mulageneratingtheerrorwithanerror code.Inthefollowinggraphic,cellD8hasthe
errorcode#NAME?.
50
PerformingCalculationsonData
3
Whenacellwithanerroneousformulaistheactivecell,anErrorbuttonappearsnext
toit.Youcanclickthebuttonsdownarrowtodisplayamenuwithoptionsthatpro-
Error
videinformationabouttheerrorandoffertohelpyoufixit.Thefollowingtablelists
themostcommonerrorcodesandwhattheymean.
ErrorCode Description
##### Thecolumnisntwideenoughtodisplaythevalue.
#VALUE! Theformulahasthewrongtypeofargument(suchastextwherea
TRUEorFALSEvalueisrequired).
#NAME? TheformulacontainstextthatExceldoesntrecognize(suchasan
unknownnamedrange).
#REF! Theformulareferstoacellthatdoesntexist(whichcanhappen
whenevercellsaredeleted).
#DIV/0! Theformulaattemptstodividebyzero.
Anothertechniqueyoucanusetofindthesourceofformulaerrorsistoensurethat
theappropriatecellsareprovidingvaluesfortheformula.Forexample,youmight
wanttocalculatethetotalsalesforaproductcategory,butsayyouaccidentallycreate
aformulareferringtotheproductsnames,nottheirprices.Youcanidentifythatkind
oferrorbyhavingExceltraceacellsprecedents,whicharethecellswithvaluesused
intheactivecellsformula.Excelidentifiesacellsprecedentsbydrawingablue
tracerarrowfromtheprecedenttotheactivecell.
Youcanalsoaudityourworksheetbyidentifyingcellswithformulasthatuseavalue
fromagivencell.Forexample,youmighthavethetotalcostofasingleorderusedin
aformulathatcalculatestheaveragecostofallordersplacedonagivenday.Cells
thatuseanothercellsvalueintheircalculationsareknownasdependents,meaning
51
3
PerformingCalculationsonData
thattheydependonthevalueintheothercelltoderivetheirownvalue.Aswith
tracingprecedents,youcanpointtoFormulaAuditingontheToolsmenuandthen
clickTraceDependentstohaveExceldrawbluearrowsfromtheactivecelltothose
cellsthathavecalculationsbasedonthatvalue.
Ifthecellsidentifiedbythetracerarrowsarentthecorrectcells,youcanhidethe
arrowsandcorrecttheformula.Tohidethetracerarrowsonaworksheet,youpoint
toFormulaAuditingontheToolsmenuandclickRemoveAllArrows.
Ifyouprefertohavetheelementsofaformulaerrorpresentedastextinadialog
box,youcanusetheErrorCheckingdialogbox(whichyoudisplaybyclickingError
CheckingontheToolsmenu)toviewtheerrorandtheformulainthecellwherethe
erroroccurs.YoucanalsousethecontrolsintheErrorCheckingdialogboxtomove
throughtheformulaonestepatatime,tochoosetoignoretheerror,ortomoveto
thenextorthepreviouserror.IfyouclicktheOptionsbutton,youcanalsousethe
controlsintheOptionsdialogboxtochangehowExceldetermineswhatisanerror
andwhatisnt.
Tip OnechangeworthnotingisthatyoucanhavetheErrorCheckingtoolignore
formulasthatdontuseeverycellinaregion(suchasaroworcolumn).Ifyouclearthe
FormulaOmitsCellsInRegioncheckbox,youcancreateformulasthatdontaddup
everyvalueinaroworcolumn(orrectangle)withoutExcelmarkingthemasanerror.
Fortimeswhenyoujustwanttodisplaytheresultsofeachstepofaformulaand
dontneedthefullpoweroftheErrorCheckingtool,youcanusetheEvaluateFormula
dialogboxtomovethrougheachelementoftheformula.TodisplaytheEvaluate
Formuladialogbox,youpointtoFormulaAuditingontheToolsmenuandclick
52
PerformingCalculationsonData
3
EvaluateFormula.TheEvaluateFormuladialogboxismuchmoreusefulforexamining
formulasthatdontproduceanerrorbutarentgeneratingtheresultyouexpect.
Finally,youcanmonitorthevalueinacellregardlessofwhereinyourworkbook
youarebyopeningawatchwindowthatdisplaysthevalueinthecell.Forexample,
ifoneofyourformulasusesvaluesfromcellsinotherworksheets,orevenother
workbooks,youcansetawatchonthecellthatcontainstheformulaandthen
changethevaluesintheothercells.Tosetawatch,clickthecellyouwanttomoni
tor,pointtoFormulaAuditingontheToolsmenu,andthenclickShowWatchWindow.
ClickAddWatchtohaveExcelmonitortheselectedcell.
Assoonasyoutypeinthenewvalue,thewatchwindowdisplaysthenewresultof
theformula.Whenyouredonewatchingtheformula,selectthewatch,clickDelete
Watch,andclosethewatchwindow.
Inthisexercise,youusetheformulaauditingcapabilitiesinExceltoidentifyandcor
recterrorsinaformula.
OPEN:FindErrorsfromtheSBS\Excel\PerformingCalculations folder.
1 ClickcellD20.
2 OntheToolsmenu,pointtoFormulaAuditing,andthenclickShowWatchWindow.
3 ClickAddWatch,andthenclickAddintheAddWatchdialogbox.
CellD20appearsinthewatchwindow.
4 ClickcellD8.
=SUM(C2:C6)appearsintheformulabar.
5 OntheToolsmenu,pointtoFormulaAuditing,andthenclickTracePrecedents.
AbluearrowappearsbetweencellD8andthegroupofcellsfromC2toC6,indicat-
ingthatcellsintheC2:C6rangeareprecedentsofthevalueincellD8.
53
3
PerformingCalculationsonData
6 OntheToolsmenu,pointtoFormulaAuditing,andthenclickRemoveAllArrows.
Thearrowdisappears.
7 ClickcellA1.
8 OntheToolsmenu,clickErrorChecking.
TheErrorCheckingdialogboxappears.
9 ClickNext.
TheerrorincellD8appearsintheErrorCheckingdialogbox.
10 ClicktheClosebuttontoclosetheErrorCheckingdialogbox.
11 OntheToolsmenu,pointtoFormulaAuditing,andthenclickTraceError.
Bluearrowsappear,pointingtocellD20fromcellsD7andD15.Thesearrowsindi-
catethatusingthevalues(orlackofvalues,inthiscase)intheindicatedcellsis
generatingtheerrorincellD20.
12 OntheToolsmenu,pointtoFormulaAuditing,andthenclickRemoveAllArrows.
Thearrowsdisappear.
13 Intheformulabar,deletetheexistingformula,type=AVERAGE(D8,D16),and
pressF.
Thevalue$149.08appearsincellD20.
14 ClickcellD20.
15 OntheToolsmenu,pointtoFormulaAuditing,andthenclickEvaluateFormula.
TheEvaluateFormuladialogboxappears,withtheformulafromcellD20displayed.
54
PerformingCalculationsonData
3
16 ClickEvaluate.
TheresultoftheformulaincellD20appears.
17 ClickClose.
18 Inthewatchwindow,clickthewatchinthelist.
19 ClickDeleteWatch.
Thewatchdisappears.
20 OntheToolsmenu,pointtoFormulaAuditing,andthenclickHideWatchWindow.
Thewatchwindowdisappears.
21 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:FindErrors.
KeyPoints
Youcanaddagroupofcellstoaformulabytypingtheformulaandthen,atthe
spotintheformulawhereyouwanttonamethecells,selectingthecellsusing
themouse.
Creatingnamedrangesletsyourefertoentireblocksofcellswithasingleterm,
savingyoulotsoftimeandeffort.
Whenyouwriteaformula,besureyouuseabsolutereferencing($A$1)ifyou
wanttheformulatoremainthesamewhenitscopiedfromonecelltoanother,
orrelativereferencing(A1)ifyouwanttheformulatochangetoreflectitsnew
positionintheworksheet.
Ratherthantypeinaformulafromscratch,youcanusetheInsertFunctiondia-
logboxtohelpyouonyourway.
Youcanmonitorhowthevalueinacellchangesbyaddingawatchtothe
watchwindow.
Toseewhichformulasrefertothevaluesintheselectedcell,useTrace
Dependents;ifyouwanttoseewhichcellsprovidevaluesfortheformulain
theactivecell,useTracePrecedents.
YoucanstepthroughthecalculationsofaformulaintheEvaluateFormuladia-
logbox,orgothroughamorerigorouserror-checkingprocedureusingthe
ErrorCheckingtool.
55
Chapter 4 at a Glance
Applyanexisting
formattodata,
page62
Changedatasappearance
basedonitsvalue,
page69
Makeprintouts
easiertofollow,
page73
Makenumberseasiertoread,
page64
Positiondata
onadocument,
page76
Changethe
appearance
ofdata,
page58
56 Chapter 4 at a Glance
4
ChangingDocument
Appearance
Inthischapteryouwilllearnto:
Changetheappearanceofdata.
Applyanexistingformattodata.
Makenumberseasiertoread.
Changedatasappearancebasedonitsvalue.
Makeprintoutseasiertofollow.
Positiondatainadocument.
Animportantaspectofworkingwithdataenteredintoaworkbookisensuringthat
thedataiseasytoread.MicrosoftExcelgivesyouawidevarietyofwaystomake
yourdataeasiertounderstand;forexample,youcanchangethefont,lettersize,or
colorusedtopresentacellscontents.Youcanalsochangehowyourdataappears
ontheprintedpage,suchasbychangingyourprintersmarginsoraddinginforma-
tionatthetoporbottomofeverypage.
Changinghowdataappearsonaworksheethelpssetthecontentsofacellapart
fromthecontentsofsurroundingcells.Thesimplestexampleisthatofadatalabel.If
acolumnonyourworksheethasalistofdays,youcansetalabelforexample,
Dayaparteasilybypresentingitinboldtypethatsnoticeablylargerthanthetype
usedtopresentthedatatowhichitrefers.Tosavetime,youcandefineanumberof
customformatsandthenapplythemquicklytothedesiredcells.
Youmightalsowanttospeciallyformatacellscontentstoreflectthevalueinthat
cell.Forinstance,CatherineTurner,theownerofTheGardenCompany,mightgrant
somecredittoTheGardenCompanysbettercustomers,useExceltotrackeachcus-
tomerspurchases,andusethatinformationtodeterminewhichcustomersarenear-
ingtheircreditlimit.Aquickwaytodistinguishwhenacustomerisclosetohisor
hercreditlimitistochangehowtheiroutstandingbalanceispresentedinitscell.
Catherinemight,forexample,changethecolorofthefontfromthestandardblackto
bluewhenacustomeriswithin10percentofhisorherlimit.
Inadditiontochanginghowdataappearsinthecellsofyourworksheet,youcan
alsouseheadersandfooterstoaddpagenumbers,currentdata,orgraphicstothe
topandbottomofeveryprintedpage.
57
Microsoft
Office
Specialis
4
ChangingDocumentAppearance
Inthischapter,youlllearnhowtochangetheappearanceofdata,applyexistingfor-
matstodata,makenumberseasiertoread,changedatasappearancebasedonits
value,makeprintoutseasiertofollow,andpositionyourdataontheprintedpage.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxxxvxxxviii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyou
installthemfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsing
theBooksCD-ROMonpagexiformoreinformation.
ChangingtheAppearanceofData
Microsoft
Excelspreadsheetscanholdandprocesslotsofdata,butwhenyoumanagenumer-
Office
Specialistt
ousspreadsheetsitcanbehardtorememberfromaworksheetstitleexactlywhat
dataiskeptinthatworksheet.Datalabelsgiveyouandyourcolleaguesinformation
aboutdatainaworksheet,butitsimportanttoformatthelabelssothattheystand
outvisually.Tomakeyourdatalabelsoranyotherdatastandout,youcanchange
theformatofthecellsinwhichthedataisstored.
Mostofthetoolsyouneedtochangeacellsformatcanbefoundonthe
Formattingtoolbar.
FontSize
Font
Bold
Italic
Underline
AlignLeft
Center
AlignRight
MergeandCenter
DecreaseDecimal
IncreaseDecimal
CommaStyle
PercentStyle
CurrencyStyle
DecreaseIndent
IncreaseIndent
Borders
FillColor
FontColor
Important Dependingonthescreenresolutionyouhavesetonyourcomputerand
whichtoolbarbuttonsyouusemostoften,itspossiblethatnoteverybuttononevery
toolbarwillappearonyourExceltoolbars.Ifabuttonmentionedinthisbookdoesnt
appearonatoolbar,clicktheToolbarOptionsbuttononthattoolbartodisplaytherestof
itsbuttons.
58
ChangingDocumentAppearance
4
Bold
Borders
Youcanapplytheformattingrepresentedbyatoolbarbuttonbyselectingthecells
youwanttoapplythestyletoandthenclickingtheappropriatebutton.Ifyouwant
tosetyourdatalabelsapartbymakingthemappearbold,clicktheBoldbutton.If
youhavealreadymadeacellscontentsbold,selectingthecellandclickingtheBold
buttonwillremovetheformatting.
Tip Deletingacellscontentsdoesntdeletethecellsformatting.Todeleteacellsfor-
matting,selectthecellandthen,ontheEditmenu,pointtoClearandclickFormats.
ItemsontheFormattingtoolbarthatgiveyouchoices,suchastheFontColorcontrol,
haveadownarrowattherightedgeofthecontrol.Clickingthedownarrowdisplays
alistofoptionsaccessibleforthatcontrol,suchasthefontsavailableonyoursystem
orthecolorsyoucanassigntoacell.
Anotherwayyoucanmakeacellstandapartfromitsneighborsistoaddaborder
aroundthecell.InversionsofExcelpriortoExcel2002,youcouldselectthecellor
cellstowhichyouwantedtoaddtheborderandusetheoptionsavailableunderthe
FormattingtoolbarsBordersbuttontoassignabordertothecells.Forexample,you
couldselectagroupofcellsandthenchoosethebordertypeyouwanted.That
methodofaddingbordersisstillavailableinExcel,butithassomelimitations.The
mostimportantlimitationisthat,whilecreatingasimpleborderaroundagroupof
cellsiseasy,creatingcomplexbordersmakesyouselectdifferentgroupsofcellsand
applydifferenttypesofborderstothem.ThecurrentversionofExcelmakescreating
complexborderseasybylettingyoudrawbordersdirectlyontheworksheet.
Tousethenewborder-drawingcapabilities,displaytheBorderstoolbar.
Dra
EraseBorder
wBorder LineColor
LineStyle
Todrawaborderaroundagroupofcells,clickthemousepointeratonecornerof
thegroupanddragittothediagonalcorner.Youwillseeyourborderexpandasyou
movethemousepointer.Ifyouwanttoaddaborderinaverticalorhorizontalline,
dragthemousepointeralongthetargetgridlineExcelwilladdthelinewithout
59
4
ChangingDocumentAppearance
expandingittoincludethesurroundingcells.Youcanalsochangethecharacteristics
oftheborderyoudrawbyusingtheoptionsontheBorderstoolbar.
Anotherwayyoucanmakeagroupofcellsstandapartfromitsneighborsisto
changetheirshading,orthecolorthatfillsthecells.Onaworksheetwithmonthly
salesdataforTheGardenCompany,forexample,ownerCatherineTurnercould
changethefillcolorofthecellsholdingherdatalabelstomakethelabelsstandout
evenmorethanbychangingtheformattingofthetextusedtodisplaythelabels.
Ifyouwanttochangetheattributesofeverycellinaroworcolumn,youcanclick
theheaderoftheroworcolumnyouwanttoformatandselectyourdesiredformat.
OnetaskyoucantperformusingthetoolsontheFormattingtoolbaristochangethe
standardfontforaworkbook,whichisusedintheNameboxandintheformulabar.
ThestandardfontwhenyouinstallExcelisArial,asimplefontthatiseasytoreadon
acomputerscreenandontheprintedpage.Ifyouwanttochooseanotherfont,click
OptionsontheToolsmenu,whichdisplaystheGeneraltabpage,andusetheStandard
FontandSizecontrolstosetthenewdefaultforyourworkbook.
Important ThenewstandardfontwonttakeeffectuntilyouquitExcelandrestart
theprogram.
Inthisexercise,youemphasizeaworksheetstitlebychangingtheformatofcell
data,addingabordertoacell,andthenchangingacellsfillcolor.Afterthosetasks
arecomplete,youchangethedefaultfontfortheworkbook.
OPEN:FormatsfromtheSBS\Excel\ChangingDocAppearancefolder.
1 Ifnecessary,clicktheJanuarysheettab.
2 ClickcellE2.
CellE2ishighlighted.
3 OntheFormattingtoolbar,clicktheFontSizedownarrowand,fromthelistthat
appears,click14.
ThetextincellE2changesto14-pointtype,androw2expandsverticallytoaccom-
modatethetext.
4 OntheFormattingtoolbar,clicktheBoldbutton.
ThetextincellE2appearsbold.
5 Clicktherowheadforrow5.
Row5ishighlighted.
60
ChangingDocumentAppearance
4
Center
Borders
FillColor
6 OntheFormattingtoolbar,clicktheCenterbutton.
Thecontentsofthecellsinrow5arecentered.
7 ClickcellE2.
CellE2ishighlighted.
8 OntheFormattingtoolbar,clickthedownarrowattherightoftheBordersbutton
andthen,fromthelistthatappears,clickDrawBorders.
TheBorderstoolbarappears,andthemousepointerchangestoapencil.
9 ClicktheleftedgeofcellE2anddragtotherightedge.
AborderappearsaroundcellE2.
10 OntheBorderstoolbar,clicktheClosebutton.
TheBorderstoolbardisappears.
11 OntheFormattingtoolbar,clicktheFillColordownarrow.
TheFillColorcolorpaletteappears.
12 IntheFillColorcolorpalette,clicktheyellowsquare.
CellG2fillswithayellowbackground.
13 OntheToolsmenu,clickOptions.
TheOptionsdialogboxappears.
14 Ifnecessary,clicktheGeneraltab.ClicktheStandardFontdownarrowandselect
CourierNew.
15 ClicktheSizedownarrow,select9,andclickOK.
61
Microsoft
Office
Specialis
4
ChangingDocumentAppearance
16 ClickOKtoclearthedialogboxthatappears.
17 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:Formats.
ApplyinganExistingFormattoData
Microsoft
AsyouworkwithExcel,youwillprobablydeveloppreferredformatsfordatalabels,
Office
Specialistt
titles,andotherworksheetelements.Ratherthanaddtheformatscharacteristicsone
elementatatimetothetargetcells,youcanhaveExcelstoretheformatandrecallitas
needed.YoucanfindthepredefinedformatsavailabletoyouintheStyledialogbox.
YoucanapplyanexistingstyletoacellfromwithintheStyledialogbox.Ifnoneof
theexistingstylesarewhatyouwant,youcancreateyourownbytypingthenameof
yournewstyleintheStylenameboxandthenclickingModify.TheFormatCellsdia-
logboxappears.
62
ChangingDocumentAppearance
4
Onceyouvesetthecharacteristicsofyournewstyle,clickOKtomakeyourstyle
availablepermanently.
FormatPainter
TheStyledialogboxisquiteversatile,butitsoverkillifallyouwanttodoisapply
formattingchangesyoumadetoacelltothecontentsofanothercell.Todoso,you
canusetheStandardtoolbarsFormatPainterbutton;justclickthecellwiththeformat
youwanttocopy,clicktheFormatPainterbutton,andselectthetargetcells.
Ofcourse,ifyouwanttochangetheformattingofanentireworksheet,theFormat
PainterandtheStyledialogboxarenotthemostefficienttoolsavailabletoyou.
Instead,ExcelletsyouapplyAutoFormats,whicharepre-definedformatpatternsfor
agroupofcells(asopposedtostyles,whicharepre-definedformatsforindividual
cells).ToapplyanAutoFormat,youselectthecellsyouwanttoformatandclick
AutoFormatontheFormatmenu.IntheAutoFormatdialogbox,selecttheAutoFormat
youwanttoapplyandclickOK.
Inthisexercise,youcreateastyle,applythenewstyletoadatalabel,andthenuse
theFormatPaintertoapplythestyletothecontentsofanothercell.Finallyyouassign
anAutoFormat.
OPEN:CreateNewfromtheSBS\Excel\ChangingDocAppearancefolder.
1 Ifnecessary,clicktheJanuarysheettab.
2 ClickcellC3.
3 OntheFormatmenu,clickStyle.
TheStyledialogboxappears,withNormalintheStylenamebox.
4 IntheStylenamebox,deletetheexistingvalueandthentypeEmphasis.
TheAddbuttonisactivated.
5 ClickModify.
TheFormatCellsdialogboxappears.
6 Ifnecessary,clicktheFonttab.
TheFonttabpageappears.
7 IntheFontstylebox,clickBoldItalic.
ThetextinthePreviewpane,inthelowerrightcornerofthedialogbox,changesto
reflectyourchoice.
8 ClicktheAlignmenttab.
TheAlignmenttabpageappears.
9 IntheHorizontalbox,clickthedownarrowand,fromthelistthatappears,click
Center.
63
Microsoft
Office
Specialis
4
ChangingDocumentAppearance
10 ClickOK.
TheFormatCellsdialogboxdisappears.
11 ClickOK.
TheStyledialogboxdisappears,andthetextincellC3takesonthechosenstyle.
12 OntheStandardtoolbar,clicktheFormatPainterbutton.
Themousepointerchangestoawhitecrosswithapaintbrushiconnexttoit.
13 ClickcellB5.
CellB5takesontheformatofcellC3.
14 SelectcellsA3toP38.
15 OntheFormatmenu,clickAutoFormat.
TheAutoFormatdialogboxappears.
16 Scrollthelist,clicktheList3AutoFormat,andclickOK.
TheAutoFormatdialogboxdisappears,andthecellstakeontheselected
AutoFormat.
17 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:CreateNew.
MakingNumbersEasiertoRead
Microsoft
Changingtheformatofthecellsinyourworksheetcanmakeyourdatamucheasier
Office
Specialistt
toread,bothbysettingdatalabelsapartfromtheactualdataandbyaddingborders
todefinetheboundariesbetweenlabelsanddataevenmoreclearly.Ofcourse,using
formattingoptionstochangethefontandappearanceofacellscontentsdoesnthelp
withidiosyncraticdatatypessuchasdates,phonenumbers,orcurrency.
64
ChangingDocumentAppearance
4
Forexample,considerU.S.phonenumbers.Thesenumbersare10digitslongand
haveathree-digitareacode,athree-digitexchange,andafour-digitlinenumber
writtenintheform(###) ###-####.Whileitscertainlypossibletotypeaphone
numberwiththeexpectedformattinginacell,itsmuchsimplertotypeasequence
of10digitsandhaveExcelchangethedatasappearance.
YoucantellExceltoexpectaphonenumberinacellbyopeningtheFormatCells
dialogboxtotheNumbertabanddisplayingtheformatsavailableundertheSpecial
category.
ClickingPhoneNumberfromtheTypelisttellsExceltoformat10-digitnumbersinthe
standardphonenumberformat.Asyoucanseebycomparingthecontentsofthe
activecellandthecontentsoftheformulabarinthenextgraphic,theunderlying
dataisntchanged,justitsappearanceinthecell.
Troubleshooting Ifyoutypeanine-digitnumberinafieldthatexpectsaphone
number,youwontseeanerrormessage;instead,youllseeatwo-digitareacode.For
example,thenumber4255555012wouldbedisplayedas(425) 555-5012.An11-digit
numberwouldbedisplayedwithafour-digitareacode.
JustasyoucaninstructExceltoexpectaphonenumberinacell,youcanalsohave
itexpectadateoracurrencyamount.YoucanmakethosechangesfromtheFormat
65
4
ChangingDocumentAppearance
CellsdialogboxbychoosingeithertheDatecategoryortheCurrencycategory.The
Datecategoryletsyoupicktheformatforthedate(anddeterminewhetherthedates
appearancechangesduetotheLocalesettingoftheoperatingsystemonthecom-
puterviewingtheworkbook).Inasimilarvein,selectingtheCurrencycategorydis-
playscontrolstosetthenumberofplacesafterthedecimalpoint,thecurrency
symboltouse,andthewayinwhichExcelshoulddisplaynegativenumbers.
Youcanalsocreateacustomnumericformattoaddawordorphrasetoanumberin
acell.Forexample,youcanaddthephraseper month toacellwithaformulathat
calculatesaveragemonthlysalesforayeartoensurethatyouandyourcolleagues
willrecognizethefigureasamonthlyaverage.Tocreateacustomnumberformat,
clickCellsontheFormatmenutoopentheFormatCellsdialogbox.Then,ifneces-
sary,clicktheNumbertabtodisplaytheNumbertabpage.
IntheCategorylist,clickCustomtodisplaytheavailablecustomnumberformatsin
theTypelist.YoucanthenclickthebaseformatyouwantandmodifyitintheType
box.Forexample,clickingthe0.00formatcausesExceltoformatanynumberina
cellwithtwodigitstotherightofthedecimalpoint.
Tip Thezerosintheformatindicatethatthatpositionintheformatcanacceptany
numberasavalidvalue.
Tocustomizetheformat,clickintheTypeboxandaddtotheformatanysymbolsor
textyouwant.Forexample,typingadollarsigntotheleftoftheexistingformatand
thentyping"per month"totherightoftheexistingformatcausesthenumber1500to
bedisplayedas$1500.00 per month.
Important YouneedtoencloseanytextinquotessothatExcelrecognizesthetext
asastringtobedisplayedinthecell.
Inthisexercise,youassigndate,phonenumber,andcurrencyformatstorangesof
cellsinyourworksheet.Afteryouassigntheformats,youtestthembyenteringcus-
tomerdata.
OPEN:EasyReadfromtheSBS\Excel\ChangingDocAppearancefolder.
1 ClickcellB4.
2 OntheFormatmenu,clickCells.
TheFormatCellsdialogboxappears.
3 Ifnecessary,clicktheNumbertab.
4 IntheCategorylist,clickDate.
TheTypelistappearswithalistofdateformats.
66
ChangingDocumentAppearance
4
FormatPainter
5 IntheTypelist,click*3/14/01.
6 ClickOK.
Excelassignsthechosenformattothecell.
7 OntheStandardtoolbar,clicktheFormatPainterbutton.
CellB4ishighlightedwithamarqueeoutline.
8 ClickcellB5anddragtocellB23.
ExcelassignstheformatfromcellB4tocellsB5:B23.
9 ClickcellJ4.
10 OntheFormatmenu,clickCells.
TheFormatCellsdialogboxappears.
11 IntheCategorylist,clickSpecial.
TheTypelistappearswithalistofspecialformats.
12 IntheTypelist,clickPhoneNumberandthenclickOK.
TheFormatCellsdialogboxdisappears.
13 OntheStandardtoolbar,clicktheFormatPainterbutton.
CellJ4ishighlightedwithamarqueeoutline.
14 ClickcellJ5anddragtocellJ23.
ExcelassignstheformatfromcellJ4tocellsJ5:J23.
15 ClickcellK4.
67
4
ChangingDocumentAppearance
16 OntheFormatmenu,clickCells.
TheFormatCellsdialogboxappears.
17 IntheCategorylist,clickCustom.
ThecontentsoftheTypelistareupdatedtoreflectyourchoice.
18 IntheTypelist,clickthe#,##0.00item.
#,##0.00 appearsintheTypebox.
19 IntheTypebox,clicktotheleftoftheexistingformatandtype$,andthenclickto
therightoftheformatandtype"total".
20 ClickOK.
TheFormatCellsdialogboxdisappears.
21 OntheStandardtoolbar,clicktheFormatPainterbutton.
CellK4ishighlightedwithamarqueeoutline.
22 ClickcellK5anddragtocellK23.
ExcelassignstheformatfromcellK4tocellsK5:K23.
23 IncellB4,typeJanuary25,2004andpressF.
ThecontentsofcellB4changeto1/25/04,matchingtheformatyousetearlier.
24 IncellC4,typeC100001.
25 IncellD4,typeSteven.
26 IncellE4,typeLevy.
68
Microsoft
Office
Specialis
ChangingDocumentAppearance
4
27 IncellF4,type6789ElmStreet.
28 IncellG4,typeRedmond.
29 IncellH4,typeWA.
30 IncellI4,type87063.
31 IncellJ4,type4255550102.
Thecontentsofthecellchangeto(425) 555-0102,matchingtheformatyouchose
earlier.
32 IncellK4,type2400.
Thecontentsofthecellchangeto$2,400.00 total,matchingtheformatyoucre-
atedearlier.
33 OntheStandardtoolbar,clickSavetosaveyourchanges.
CLOSE:EasyRead.
ChangingDatasAppearanceBasedonItsValue
Microsoft
Recordingsales,creditlimits,andotherbusinessdatainaworksheetletsyoumake
Office
Specialistt
importantdecisionsaboutyouroperations.Andasyousawearlierinthischapter,
youcanchangetheappearanceofdatalabelsandtheworksheetitselftomakeinter-
pretingyourdataeasier.
AnotherwayyoucanmakeyourdataeasiertointerpretistohaveExcelchange
theappearanceofyourdatabasedonitsvalue.Theseformatsarecalledconditional
formatsbecausethedatamustmeetcertainconditionstohaveaformatappliedtoit.
Forinstance,ifownerCatherineTurnerwantedtohighlightanySaturdaysonwhich
dailysalesatTheGardenCompanywereover$4,000,shecoulddefineaconditional
formatthatteststhevalueinthecellrecordingtotalsales,andthatwillchangethe
formatofthecellscontentswhentheconditionismet.
Tocreateaconditionalformat,youclickthecellstowhichyouwanttoapplythefor-
mat,opentheFormatmenu,andclickConditionalFormattingtoopentheConditional
69
4
ChangingDocumentAppearance
Formattingdialogbox.ThedefaultconfigurationoftheConditionalFormattingdialog
boxappearsinthefollowinggraphic.
Thefirstlistboxletsyouchoosewhetheryouwanttheconditionthatfollowstolook
atthecellscontentsortheformulainthecell.Inalmosteverycircumstance,youwill
usethecontentsofthecellasthetestvalueforthecondition.
Tip Theonlytimeyouwouldwanttosetaformulaasthebasisfortheconditionwould
betoformatacertainresult,suchasagrandtotal,thesamewayeverytimeitappeared
inaworksheet.
ThesecondlistboxintheConditionalFormattingdialogboxletsyouselectthecom-
parisontobemade.Dependingonthecomparisonyouchoose,thedialogboxwill
haveeitheroneortwoboxesinwhichyouentervaluestobeusedinthecompari-
son.Thedefaultcomparisonbetweenrequirestwovalues,whereascomparisonssuch
asless thanrequireone.
Afteryouhavecreatedacondition,youneedtodefinetheformattobeappliedto
datathatmeetsthatcondition.YoudothatintheFormatCellsdialogbox.From
withinthisdialogbox,youcansetthecharacteristicsofthetextusedtoprintthe
valueinthecell.Whenyouredone,apreviewoftheformatyoudefinedappearsin
theConditionalFormattingdialogbox.
Yourenotlimitedtocreatingoneconditionpercell.Ifyoulike,youcancreateaddi-
tionalconditionsbyclickingtheAddbuttonintheConditionalFormattingdialogbox.
WhenyouclicktheAddbutton,asecondconditionsectionappears.
Important Exceldoesntchecktomakesureyourconditionsarelogicallyconsis-
tent,soyouneedtobesureyouenteryourconditionscorrectly.
ExcelevaluatestheconditionsintheorderyouenteredthemintheConditional
Formattingdialogboxand,uponfindingaconditionthedatameets,stopsitscom-
parisons.Forexample,supposeCatherinewantedtovisuallyseparatethecreditlimits
ofTheGardenCompanyscustomersintotwodifferentcategories:thosewithlimits
under$1,500andthosewithlimitsfrom$1,500to$2,500.Shecoulddisplayher
customerscreditlimitswithaconditionalformatusingtheconditionsinthefollow-
inggraphic.
70
ChangingDocumentAppearance
4
Inthiscase,Excelwouldcomparethevalue1250withthefirstcondition,<2500,and
assignthatformattingtothecellcontainingthevalue.Thatthesecondcondition,
<1500,iscloserisirrelevantonceExcelfindsaconditionthedatameets,itstops
comparing.
Tip Youshouldalwaysenterthemostrestrictiveconditionfirst.Intheprecedingexam-
ple,settingthefirstconditionto<1500 andthesecondto<2500wouldresultinthe
properformat.
Inthisexercise,youcreateaseriesofconditionalformatstochangetheappearanceof
datainworksheetcellsdisplayingthecreditlimitofTheGardenCompanyscustomers.
OPEN:ConditionalfromtheSBS\Excel\ChangingDocAppearancefolder.
1 Ifnecessary,clickcellK4.
2 OntheFormatmenu,clickConditionalFormatting.
TheConditionalFormattingdialogboxappears.
3 Inthesecondlistbox,clickthedownarrowandthen,fromthelistthatappears,
clickbetween.
Thewordbetween appearsinthesecondlistbox.
4 Inthefirstargumentbox,type1000.
5 Inthesecondargumentbox,type2000.
6 ClicktheFormatbutton.
TheFormatCellsdialogboxappears.
7 Ifnecessary,clicktheFonttab.
TheFonttabpageappears.
71
4
ChangingDocumentAppearance
8 IntheColorbox,clickthedownarrowandthen,fromthecolorpalettethatappears,
clickthebluesquare.
Thecolorpalettedisappears,andthetextinthePreviewpanechangestoblue.
9 ClickOK.
TheFormatCellsdialogboxdisappears.
10 ClicktheAddbutton.
TheCondition2sectionofthedialogboxappears.
11 Inthesecondlistbox,clickthedownarrowandthen,fromthelistthatappears,
clickbetween.
Thewordbetween appearsinthesecondlistbox.
12 Inthefirstargumentbox,type2000.
13 Inthesecondargumentbox,type2500.
14 ClicktheFormatbutton.
TheFormatCellsdialogboxappears.
15 IntheColorbox,clickthedownarrowandthen,fromthecolorpalettethatappears,
clickthegreensquare.
Thecolorpalettedisappears,andthetextinthePreviewpanechangestogreen.
16 ClickOK.
TheFormatCellsdialogboxdisappears.
17 ClickOK.
TheConditionalFormattingdialogboxdisappears.
18 IncellK4,clickthefillhandle,anddragittocellK6.
19 ThecontentsofcellsK5andK6changeto$2,400.00,andtheAutoFillOptions
AutoFill
buttonappears.
Options
20 ClicktheAutoFillOptionsbutton,andfromthelistthatappears,clickFillFormat-
tingOnly.
ThecontentsofcellsK5andK6reverttotheirpreviousvalues,andExcelapplies
theconditionalformatstotheselectedcells.
72
Microsoft
Office
Specialis
ChangingDocumentAppearance
4
21 OntheStandardtoolbar,clicktheSavetoolbarbuttontosaveyourchanges.
CLOSE:Conditional.
MakingPrintoutsEasiertoFollow
Microsoft
Changinghowyourdataappearsinthebodyofyourworksheetscanmakeyour
Office
Specialistt
datamucheasiertounderstand,butitdoesntcommunicatewhentheworksheet
waslastopenedorwhomitbelongsto.Youcouldalwaysaddthatinformationto
thetopofeveryprintedpage,butyouwouldneedtochangethecurrentdateevery
timeyouopenedthedocument;andifyouwantedthesameinformationtoappear
atthetopofeveryprintedpage,anychangestothebodyofyourworksheetscould
meanyouwouldneedtoedityourworkbooksothattheinformationappearedin
theproperplace.
Ifyouwanttoensurethatthesameinformationappearsatthetoporbottomofevery
printedpage,youcandosousingheadersorfooters.Aheaderisasectionthat
appearsatthetopofeveryprintedpage,whileafooterisasectionthatappearsat
thebottomofeveryprintedpage.TocreateaheaderorfooterinExcel,youopenthe
PageSetupdialogboxtotheHeader/Footertab.
Important Everythingyouwilllearnaboutcreatingheadersinthissectionapplies
tocreatingfootersaswell.Also,youcanhavebothheadersandfootersinthesame
document.
ThelistboxesontheHeader/Footertabpagewillholdanumberofstandardheaders
andfooters,suchaspagenumbersbythemselvesorfollowedbythenameofthe
workbook.YoucancreateyourownheadersbyopeningtheHeaderdialogbox.
IntheHeaderdialogbox,youcanaddyourowntextorusetheboxsbuttonsto
changetheappearanceofthetextintheheaderortoinsertadate,time,orpage
number.BeginningwithExcel2002,youhavehadtheoptionofaddingagraphicto
aheaderorfooter.Addingagraphicsuchasacompanylogotoaworksheetletsyou
identifytheworksheetasreferringtoyourcompanyandhelpsreinforceyourcom-
panysidentityifyouincludetheworksheetinaprintedreportdistributedoutside
yourcompany.Afteryouinsertagraphicintoaheaderorfooter,theFormatPicture
buttonwillbecomeavailable.Clickingthatbuttonwillopenadialogboxwithtools
toedityourgraphic.
73
4
ChangingDocumentAppearance
Inthisexercise,youcreateacustomheaderandacustomfooterforaworkbook.
YouaddagraphictothefooterandtheneditthegraphicusingtheFormatPicture
dialogbox.
OPEN:FollowfromtheSBS\Excel\ChangingDocAppearancefolder.
1 OntheViewmenu,clickHeaderandFooter.
ThePageSetupdialogboxappears,openedtotheHeader/Footertabpage.
2 ClicktheCustomFooterbutton.
TheFooterdialogboxappears.
3 ClickanywhereintheCentersectionbox,andthenclicktheInsertPicturebutton.
InsertPicture
TheInsertPicturedialogboxappears.
4 NavigatetotheChangingDocAppearancefolder,andthendouble-clickthe
tgc_logo.giffile.
TheInsertPicturedialogboxdisappears,and&[Picture] appearsintheCenter
sectionbox.
74
ChangingDocumentAppearance
4
FormatPicture
Date
PageNumber
5 ClicktheFormatPicturebutton.
TheFormatPicturedialogboxappears.
6 Ifnecessary,selecttheLockaspectratiocheckbox.
7 IntheHeightbox,type50%andthenclickOK.
TheFormatPicturedialogboxdisappears.
8 IntheFooterdialogbox,clickOK.
TheFooterdialogboxdisappears,andpartofthegraphicyouaddedappearsinthe
footersectionofthePageSetupdialogbox.
9 ClicktheCustomHeaderbutton.
TheHeaderdialogboxappears.
10 ClickanywhereintheLeftsectionbox,andthenclicktheDatebutton.
&[Date]appearsintheLeftsectionbox.
11 ClickanywhereintheRightsectionbox,andthenclickthePageNumberbutton.
&[Page]appearsintheRightsectionbox.
12 ClickOK.
TheHeaderdialogboxdisappears.
13 ClickthePrintPreviewbutton.
ThePrintPreviewwindowappears.
75
Microsoft
Office
Specialis
4
ChangingDocumentAppearance
14 ClickClose.
ThePrintPreviewwindowandthePageSetupdialogboxdisappear.
15 ClickcellE2.
16 OntheEditmenu,pointtoClear,andthenclickAll.
17 Thecontentsofthemergedcelldisappear,andthecellsareunmerged.
Save 18 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Follow.
PositioningDataonaPrintout
Microsoft
Onceyouhaveyourdataandanyheadersorfootersinyourworkbook,youcan
Office
Specialistt
changeyourworkbookspropertiestoensurethatyourworksheetsdisplayallofyour
informationandthatprintingiscenteredonthepage.
Oneoftheworkbookpropertiesyoucanchangeisitsmargins,ortheboundaries
betweendifferentsectionsoftheprintedpage.Youcanviewadocumentsmargins
andwherethecontentsoftheheader,footer,andbodyappearinrelationtothose
marginsinthePrintPreviewwindow.
76
ChangingDocumentAppearance
4
Intheabovegraphic,thelogointhefooterspillsoverthetopmarginofthefooter.
Toremovetheoverlap,youcanmovethefooterstopmarginup,increasingthe
amountofspacedevotedtothefooter.Increasingthesizeofthefooterreducesthe
sizeoftheworksheetbody,meaningfewerrowscanbeprintedonapage.
Anotherissuewithprintingworksheetsisthatthedatainworksheetstendstobe
widerhorizontallythanastandardsheetofpaper.Forexample,thedatainthework-
sheetinthepreviousgraphicisseveralcolumnswiderthanastandardpieceofpaper.
YoucanusethecontrolsinthePageSetupdialogboxtochangethealignmentofthe
rowsandcolumnsonthepage.Whenthecolumnsfollowthelongedgeofapieceof
paper,thepageislaidoutinportrait mode;whenthecolumnsfollowtheshortedge
ofapieceofpaper,itisinlandscape mode.Thefollowinggraphicdisplaysthecon-
tentsofthepreviousworksheetlaidoutinlandscapemode.
77
4
ChangingDocumentAppearance
Thisisabetterfit,butnotallthedatafitsontheprintedpage.Onceagain,thePage
Setupdialogboxcomestotherescue.Fromwithinthatdialogbox,youcanhave
Excelreducethesizeoftheworksheetscontentsuntiltheentireworksheetcanbe
printedonasinglepageandalsohaveExcelcentertheprintedmatteronthepageso
thatthereisanevenmarginaroundtheprinting.
Inthisexercise,youchangethemarginsinaworkbooktostopthegraphicinthe
footerfromoverlappingwiththedatainthebodyoftheworksheet.Youthenchange
thealignmentoftheworkbooksothatitscontentsarelaidoutinlandscapemode
andcenteredontheprintedpage.
OPEN:MarginsfromtheSBS\Excel\ChangingDocAppearancefolder.
1 OntheStandardtoolbar,clickthePrintPreviewbutton.
PrintPreview
ThePrintPreviewwindowopens.
2 ClickMargins.
Marginlinesappear.
3 Dragthesecondmarginlinefromthebottomofthepageupuntilitclearsthe
graphic.
Thetopedgeofthefootermovesabovethegraphic.
78
ChangingDocumentAppearance
4
4 ClickSetup.
ThePageSetupdialogboxappears.
5 Ifnecessary,clickthePagetab.
6 SelecttheLandscapeoptionbutton.
7 SelecttheFittooptionbuttonandsetto1pagewideby1pagetall.
8 ClicktheMarginstab.
TheMarginstabpageappears.
9 IntheCenteronpagesectionofthetabpage,selectboththeHorizontallycheck
boxandtheVerticallycheckbox.
10 ClickOK.
ThePageSetupdialogboxdisappears.ThedocumentviewinthePrintPreviewwin-
dowchangestoreflectthenewsettings.
11 ClickClose.
ThePrintPreviewwindowdisappears.
12 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
Save
CLOSE:Margins.
79
4
ChangingDocumentAppearance
KeyPoints
IfyoudontlikethedefaultfontinwhichExceldisplaysyourdata,youcan
changeit.
Youcanusecellformatting,includingborders,alignment,andfillcolors,to
emphasizecertaincellsinyourworksheets.Thisemphasisisparticularlyuseful
formakingcolumnandrowlabelsstandoutfromthedata.
Excelcomeswithanumberofexistingstylesthatletyouchangetheappear-
anceofindividualcells.
Ifyouwanttoapplytheformattingfromonecelltoanothercell,usetheFormat
Paintertocopytheformatquickly.
TherearequiteafewAutoFormatsyoucanapplytogroupsofcells.Ifyousee
oneyoulike,useitandsaveyourselflotsofformattingtime.
ConditionalformatsletyousetrulessothatExcelwillchangetheappearanceof
acellscontentsbasedonitsvalue.
Paycarefulattentiontohowyourworksheetsappearwhenprinted.Useheader,
footer,graphic,alignment,andmarginsettingstomakeyourdatalookgreaton
thepage.
80
Chapter 5 at a Glance
Perform
calculations
page89
Limitthedatathat
appearsonthescreen,
page84
Circleinvaliddata,
page91
onfiltereddata,
82 Chapter 5 at a Glance
5
FocusingonSpecific
DataUsingFilters
Inthischapteryouwilllearnto:
Limitthedatathatappearsonthescreen.
Performcalculationsonfiltereddata.
Defineavalidsetofvaluesforarangeofcells.
Animportantaspectofworkingwithlargeamountsofdataistheabilitytozeroinon
themostimportantdatainaworksheet,whetherthatdatarepresentsthebest10days
ofsalesinamonthorslow-sellingproductlinesthatyoumightneedtoreevaluate.In
MicrosoftExcel,youhaveanumberofpowerful,flexibletoolswithwhichyoucan
limitthedatadisplayedinyourworksheet.Onceyourworksheetdisplaysthesubset
ofthedatayouneedtomakeadecision,youcanperformcalculationsonthatdata.
Youcandiscoverwhatpercentageofmonthlysalesweremadeupbythe10best
daysinthemonth,findyourtotalsalesforparticulardaysoftheweek,orlocatethe
slowestbusinessdayofthemonth.
Justasyoucanlimitthedatadisplayedbyyourworksheets,youcanlimitthedata
enteredintothemaswell.Settingrulesfordataenteredintocellsletsyoucatchmany
ofthemostcommondataentryerrors,suchasenteringvaluesthataretoosmallor
toolarge,orattemptingtoenterawordinacellthatrequiresanumber.Shouldyou
addavalidationruletoworksheetcellsafterdatahasbeenenteredintothem,you
cancircleanyinvaliddatasothatyouknowwhattocorrect.
Inthischapter,youlllearnhowtolimitthedatathatappearsinyourworksheets,
performcalculationsontheremainingdata,andlimitthedatathatcanbeentered
intospecificcells.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxxxviiixl.
Important Beforeyoucanusethepracticefilesinthischapter,besureyou
installthemfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsing
theBooksCD-ROMonpagexiformoreinformation.
83
Microsoft
Office
Specialis
5
FocusingonSpecificDataUsingFilters
LimitingtheDataThatAppearsontheScreen
Microsoft
Excelspreadsheetscanholdasmuchdataasyouneedthemto,butyoumightnot
Office
Specialistt
wanttoworkwithallofthedatainaworksheetatthesametime.Forexample,you
mightwanttoseethesalesfiguresforyourcompanyduringthefirstthird,second
third,andfinalthirdofamonth.Youcanlimitthedatashowninaworksheetbycre-
atingafilter,whichisarulethatselectsrowstobeshowninaworksheet.
Tocreateafilter,youclickthecellinthegroupyouwanttofilterandusetheData
menutoturnonAutoFilter.WhenyouturnonAutoFilter,whichisabuilt-insetoffil-
teringcapabilities,adownarrowbuttonappearsinthecellthatExcelrecognizesas
thecolumnslabel.
Important Whenyouturnonfiltering,Exceltreatsthecellsintheactivecellscol-
umnasarange.Toensurethatthefilteringworksproperly,youshouldalwaysaddalabel
tothecolumnyouwanttofilter.
Clickingthedownarrowdisplaysalistofvaluesandoptions.Thefirstfewitemsin
thelistarefilteringoptions,suchaswhetheryouwanttodisplaythetop10valuesin
thecolumn,createacustomfilter,ordisplayallvaluesinthecolumn(thatis,remove
thefilter).Therestoftheitemsinthelistaretheuniquevaluesinthecolumn
clickingoneofthosevaluesdisplaystheroworrowscontainingthatvalue.
ChoosingtheTop10optionfromthelistdoesntjustlimitthedisplaytothetop10
values.Instead,itopenstheTop10AutoFilterdialogbox.Fromwithinthisdialogbox,
youcanchoosewhethertoshowvaluesfromthetoporbottomofthelist,definethe
numberofitemsyouwanttosee,andchoosewhetherthenumberinthemiddlebox
indicatesthenumberofitemsorthepercentageofitemstobeshownwhenthefilter
isapplied.UsingtheTop10AutoFilterdialogbox,youcanfindyourtop10sales-
peopleoridentifythetopfivepercentofyourcustomers.
WhenyouchooseCustomfromtheAutoFilterlist,youcandefinearulethatExcel
usestodecidewhichrowstoshowafterthefilterisapplied.Forinstance,youcan
createarulethatonlydayswithtotalsalesoflessthan$2,500shouldbeshownin
yourworksheet.Withthoseresultsinfrontofyou,youmightbeabletodetermine
whethertheweatheroranotherfactorresultedinslowerbusinessonthosedays.
TworelatedthingsyoucandoinExcelaretochooserowsatrandomfromalistand
todisplaytheuniquevaluesinacolumnintheworksheet(notinthedownarrows
list,whichyoucantnormallyworkwith).Generatingalistofuniquevaluesina
84
FocusingonSpecificDataUsingFilters
5
columncangiveyouimportantinformation,suchasfromwhichstatesyouhavecus-
tomersorwhichcategoriesofproductssoldinanhour.
Selectingrowsrandomlyisusefulforselectingcustomerstoreceiveaspecialoffer,
decidingwhichdaysofthemonthtoaudit,orpickingprizewinnersatanemployee
party.Tochooserows,youcanusetheRANDfunction,whichgeneratesarandom
valuebetween0and1andcomparesitwithatestvalueincludedinthestatement.A
statementthatreturnsaTRUEvalue30percentofthetimewouldbeRAND()<=30%;
thatis,whenevertherandomvaluewasbetween0and.3,theresultwouldbeTRUE.
Youcouldusethisstatementtoselecteachrowinalistwithaprobabilityof30percent.
Inthisexercise,youcreateafiltertoshowthetopfivesalesdaysinJanuary,show
salesfiguresforMondaysduringthesamemonth,displaythedayswithsalesofat
least$3,000,pickrandomdaysfromthemonthtoaudit,andthengeneratealistof
uniquevaluesinoneoftheworksheetscolumns.
OPEN:FilterfromtheSBS\Access\UsingFiltersfolder.
1 Ifnecessary,clicktheJanuarysheettab.
2 ClickcellP5.
3 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
AdownarrowappearsincellP5.
4 IncellP5,clickthedownarrowand,fromthelistthatappears,click(Top10...).
TheTop10AutoFilterdialogboxappears.
5 Clickinthemiddlebox,delete10,type5,andclickOK.
OnlytherowscontainingthefivelargestvaluesincolumnPareshown.
85
5
FocusingonSpecificDataUsingFilters
6 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
Thefilteredrowsreappear.
7 ClickcellB5.
8 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
AdownarrowappearsincellB5.
9 IncellB5,clickthedownarrowand,fromthelistofuniquecolumnvaluesthat
appears,clickMon.
OnlyrowswithMon incolumnBareshownintheworksheet.
10 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
Thefilteredrowsreappear.
11 ClickcellP5,andthen,ontheDatamenu,pointtoFilter,andthenclickAutoFilter.
AdownarrowappearsincellP5.
12 IncellP5,clickthedownarrowandthen,fromthelistthatappears,click
(Custom).
TheCustomAutoFilterdialogboxappears.
86
FocusingonSpecificDataUsingFilters
5
13 Intheupperleftbox,clickthedownarrowand,fromthelistthatappears,clickis
greaterthanorequalto.
14 Intheupperrightbox,type3000andthenclickOK.
Onlyrowswithtotalsofatleast3000areshownintheworksheet.
15 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
Thefilteredrowsreappear.
16 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
AdownarrowappearsincellP5.
17 IncellP5,clickthedownarrowandthen,fromthelistofuniquecolumnvaluesthat
appears,click2236.
Allrowsexcepttherowcontaining2236incolumnPdisappear.
18 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
Thefilteredrowsreappear.
19 IncellQ5,typeAudit.
87
5
FocusingonSpecificDataUsingFilters
20 IncellQ6,type=RAND()<17%.
IftheresultoftheRANDfunctionislessthan17%,cellQ6willdisplayTRUE;other-
wise,cellQ6willdisplayFALSE.
21 DragtheAutoFillhandlefromcellQ6tocellQ36.
TRUEandFALSEvaluesappearinthecellsfromQ6toQ36withafrequencyof
approximately16percentand84percent,respectively.
22 OntheDatamenu,pointtoFilter,andthenclickAdvancedFilter.
TheAdvancedFilterdialogboxappears.
23 CleartheListRangebox,andthenclickcellB5anddragtocellB36.
$B$5:$B$36 appearsintheListRangebox.
24 SelecttheUniquerecordsonlycheckbox,andthenclickOK.
Rowswiththefirstoccurrenceofavaluearedisplayedintheworksheet.
88
Microsoft
Office
Specialis
FocusingonSpecificDataUsingFilters
5
25 OntheDatamenu,pointtoFilter,andthenclickShowAll.
Thefilteredrowsreappear.
26 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:Filter.
PerformingCalculationsonFilteredData
Microsoft
Whenyoufilteryourworksheet,youlimitthedatathatappears.Theabilitytofocus
Office
Specialistt
onthedatathatsmostvitaltoyourcurrentneedsisimportant,butthereareafew
limitations.Onelimitationisthatanyformulasyouhavecreateddontchangetheir
calculations,evenifsomeoftherowsusedintheformulaarehiddenbythefilter.
Therearetwowaysyoucanfindthetotalofagroupoffilteredcells.Thefirstmethod
istouseAutoCalculate.TouseAutoCalculate,youselectthecellsyouwanttofind
thetotalfor.Whenyoudo,thetotalforthecellsappearsonthestatusbar,atthe
loweredgeoftheExcelwindow.
WhenyouuseAutoCalculate,youarentlimitedtofindingthesumoftheselected
cells.Todisplaytheotherfunctionsyoucanuse,youright-clicktheAutoCalculate
paneandselectthefunctionyouwantfromtheshortcutmenuthatappears.
AutoCalculateisgreatforfindingaquicktotaloraverageforfilteredcells,butit
doesntmaketheresultavailableintheworksheet.Tomakethevalueavailablein
yourworksheet,youcancreateaSUBTOTALfunction.AswithAutoCalculate,you
canchoosethetypeofcalculationthefunctionperforms.
Inthisexercise,youuseAutoCalculatetofindthetotalofagroupofcellsinafiltered
worksheet,createaSUBTOTALfunctiontomakethesamevalueavailableinthe
worksheet,andthenedittheSUBTOTALfunctionsothatitcalculatesanaverage
insteadofasum.
OPEN:CalculationsfromtheSBS\Access\UsingFiltersfolder.
1 Ifnecessary,clicktheJanuarysheettab.
2 ClickcellP5.
3 OntheDatamenu,pointtoFilter,andthenclickAutoFilter.
AdownarrowbuttonappearsincellP5.
89
5
FocusingonSpecificDataUsingFilters
4 IncellP5,clickthedownarrowbuttonandthen,fromthelistthatappears,click
(Top10...).
TheTop10AutoFilterdialogboxappears.
5 ClickOK.
Tip ClickingOKhereacceptsthedefaultsettingoftheTop10AutoFilterdialog
box,whichistoshowthetop10valuesintheselectedcells.
6 TheTop10AutoFilterdialogboxdisappears,andtherowswiththe10highestval-
uesincolumnParedisplayed.
7 ClickcellP6anddragtocellP27.
Thecellsareselected,andonthestatusbar,inthelowerrightcorneroftheExcel
window,SUM=36781appearsintheAutoCalculatepane.
8 ClickcellP37,andthen,ontheStandardtoolbar,clicktheAutoSumbutton.
AutoSum Theformula=SUBTOTAL(9,P6:P36)appearsintheformulabar.
9 PressF.
Thevalue36781appearsincellP37.ThevalueincellP38alsochangesto
134706,butthatcalculationincludesthesubtotalofthefilteredcellsinthe
column.
90
Microsoft
Office
Specialis
FocusingonSpecificDataUsingFilters
5
10 ClickcellP37,andthen,intheformulabar,edittheformulasothatitreads
=SUBTOTAL(1,P6:P36)andthenpressF.
Bychangingthe9toa1intheSUBTOTALfunction,thefunctionnowcalculatesan
averageinsteadofasum.Theaverageofthetop10valuesincellsP6through
P36,3678.1 appearsincellP37.ThevalueincellP38alsochangesto101603.1,
butthatcalculationincludestheaverageofthefilteredcellsinthecolumn.
11 Ifnecessary,clickcellP37andthenpressA.
ExceldeletestheSUBTOTALformulafromcellP37,andthetotalincellP38
changesto97925.
12 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:Calculations.
DefiningaValidSetofValuesforaRangeofCells
Microsoft
Partofcreatingefficientandeasy-to-useworksheetsistodowhatyoucantoensure
Office
Specialistt
thatthedataenteredintoyourworksheetsisasaccurateaspossible.Whileitisnt
possibletocatcheverytypographicalortranscriptionerror,youcansetupavalida-
tionruletomakesurethedataenteredintoacellmeetscertainstandards.
Tocreateavalidationrule,youopentheDataValidationdialogbox.
YoucanusetheDataValidationdialogboxtodefinethetypeofdatathatExcel
shouldallowinthecellandthen,dependingonthedatatypeyouchoose,tosetthe
conditionsdatamustmeettobeacceptedinthecell.Inthefollowinggraphic,Excel
knowstolookforawholenumbervaluebetween1000and2000.
91
5
FocusingonSpecificDataUsingFilters
CircleInvalid
Data
Clear
Validation
Circles
Settingaccuratevalidationrulescanhelpyouandyourcolleaguesavoidenteringa
customersnameinthecelldesignatedtoholdtheirphonenumberorsettinga
creditlimitaboveacertainlevel.Torequireausertoenteranumericvalueinacell,
displaytheSettingspageoftheDataValidationdialogbox,clicktheAllowdown
arrow,anddependingonyourneeds,chooseeitherWholenumberorDecimalfrom
thelistthatappears.
Ifyouwanttosetthesamevalidationruleforagroupofcells,youcandosoby
selectingthecellstowhichyouwanttoapplytherule(suchasacolumnwhereyou
enterthecreditlimitofcustomersofTheGardenCompany)andsettingtheruleusing
theDataValidationdialogbox.Oneimportantfactyoushouldkeepinmindisthat
Excelletsyoucreatevalidationrulesforcellswhereyouhavealreadyentereddata.
Exceldoesnttellyouifanycellshavedatathatviolateyourrule,butyoucanfind
outbyhavingExcelcircleanyworksheetcellscontainingdatathatviolatesthecells
validationrule.Todoso,youdisplaytheToolsmenu,pointtoFormulaAuditing,and
clickShowFormulaAuditingToolbar.OntheFormulaAuditingtoolbar,clicktheCircle
InvalidDatabuttontocirclecellswithinvaliddata.
Whenyourereadytohidethecircles,displaytheFormulaAuditingtoolbarandclick
theClearValidationCirclesbutton.
Ofcourse,itsfrustratingifyouwanttoenterdataintoacelland,whenamessage
boxappears,tellingyouthedatayoutriedtoenterisntacceptable,youarentgiven
therulesyouneedtofollow.Excelletsyoucreatemessagesthattelltheuserwhat
valuesareexpectedbeforethedataisenteredandthen,iftheconditionsarentmet,
reiteratetheconditionsinacustomerrormessage.
YoucanturnoffdatavalidationinacellbydisplayingtheSettingspageoftheData
ValidationdialogboxandclickingtheClearAllbuttoninthelowerleftcornerofthe
dialogbox.
92
FocusingonSpecificDataUsingFilters
5
Inthisexercise,youcreateadatavalidationrulelimitingthecreditlineofThe
GardenCompanycustomersto$2,500,addaninputmessagementioningthelimita-
tion,andthencreateanerrormessageshouldsomeoneenteravaluegreaterthan
$2,500.Afteryouvecreatedyourruleandmessages,youtestthem.
OPEN:ValidatefromtheSBS\Access\UsingFiltersfolder.
1 SelectcellsK4throughK7.
2 OntheDatamenu,clickValidation.
TheDataValidationdialogboxappearswiththeSettingstabpageinfront.
3 IntheAllowbox,clickthedownarrowand,fromthelistthatappears,clickWhole
Number.
BoxeslabeledMinimumandMaximumappearbelowtheDatabox.
4 IntheDatabox,clickthedownarrowand,fromthelistthatappears,clicklessthan
orequalto.
TheMinimumboxdisappears.
5 IntheMaximumbox,type2500.
6 CleartheIgnoreblankcheckbox.
7 ClicktheInputMessagetab.
TheInputMessagetabpageappears.
8 IntheTitlebox,typeEnterLimit.
9 IntheInputMessagebox,typePleaseenterthecustomerscreditlimit,omittingthe
dollarsign.
10 ClicktheErrorAlerttabpage.
TheErrorAlerttabpageappears.
11 IntheStylebox,clickthedownarrowand,fromthelistthatappears,chooseStop.
TheiconthatwillappearinyourmessageboxchangestotheStopicon.
12 IntheTitlebox,typeError,andthenclickOK.
13 ClickcellK7.
AScreenTipwiththetitleEnter LimitandthetextPlease enter the customers credit
limit, omitting the dollar signappearsnearcellK7.
93
5
FocusingonSpecificDataUsingFilters
CircleInvalid
Data
Clear
Validation
Circles
Save
14 Type2501,andpressF.
AstopboxwiththetitleErroranddefaulttextappears.
Tip LeavingtheErrormessageboxblankcausesExceltouseitsdefaultmes-
sage:The value you entered is not valid. A user has restricted values that can be
entered into this cell.
15 ClickCancel.
Theerrorboxdisappears.
Important ClickingRetryletsyoueditthebadvalue,whileclickingCancel
deletestheentry.
16 ClickcellK7.
CellK7becomestheactivecell,andtheScreenTipreappears.
17 Type2500,andpressF.
Excelacceptsyourinput.
18 OntheToolsmenu,pointtoFormulaAuditing,andclickShowFormulaAuditing
Toolbar.
TheFormulaAuditingtoolbarappears.
19 OntheFormulaAuditingtoolbar,clicktheCircleInvalidDatabutton.
AredcircleappearsaroundthevalueincellK4.
20 OntheFormulaAuditingtoolbar,clicktheClearValidationCirclesbutton.
TheredcirclearoundthevalueincellK4disappears.
21 OntheFormulaAuditingtoolbar,clicktheClosebox.
TheFormulaAuditingtoolbardisappears.
22 OntheStandardtoolbar,clicktheSavebutton.
CLOSE:Validate.
94
FocusingonSpecificDataUsingFilters
5
KeyPoints
AnumberoffiltersaredefinedinExcelyoumayfindtheoneyouwant
alreadyinplace.
FilteringanExcelworksheetbasedonvaluesinasinglecolumniseasytodo,
butyoucancreateacustomfiltertolimityourdatabasedonthevaluesinmore
thanonecolumnaswell.
Dontforgetthatyoucangetarunningtotal(oraverage,oranyoneofseveral
othersummaryoperations)forthevaluesinagroupofcells.Justselectthecells
andlookonthestatusbar:theresultwillbethere.
Functionsarentsetinstonewhenyoucreatethem.Youcanusethecontrolsin
theFunctionboxtoedityourfunctions.
Usedatavalidationtechniquestoimprovetheaccuracyofdataenteredinto
yourworksheets,andtoidentifydatathatdoesntmeettheguidelinesyouset.
95
Chapter 6 at a Glance
Useadatalist
asatemplate
forotherlists,
page98
Groupmultiple
Workwithmore
thanonesetofdata,
page101
datalists,
page114
Summarize
multiple
setsofdata,
page110
96 Chapter 6 at a Glance
6
CombiningDatafrom
MultipleSources
Inthischapteryouwilllearnto:
Useanexistingdatalistasatemplateforotherlists.
Workwithmorethanonesetofdata.
Linktodatainotherworkbooks.
Summarizemultiplesetsofdata.
Groupmultipledatalists.
MicrosoftExcelgivesyouawiderangeoftoolswithwhichtoformat,summarize,and
presentyourdata.Onceyouhavecreatedaworkbooktoholddataaboutaparticular
subject,youcancreateasmanyworksheetsasyouneedtomakethatdataeasierto
findwithintheworkbook.Forinstance,youcancreateaworkbooktostoresales
dataforayear,witheachworksheetrepresentingamonthinthatyear.Toensurethat
theworkbookforeveryyearhasasimilarappearance,youcancreateaworkbook
withthedesiredcharacteristics(suchasmorethanthestandardnumberofwork-
sheets,customworksheetformatting,oraparticularcolorfortheworkbookssheet
tabs)andsaveitasapatternforsimilarworkbooksyoucreateinthefuture.Theben-
efitofensuringthatallofyoursalesdataworksheetshavethesamelayoutisthatyou
andyourcolleagueswillimmediatelyknowwheretolookforspecifictotals.Also,
whenyoucreateasummaryworksheet,youwillknowinadvancewhichcellsto
includeinyourcalculations.
Ifyouworkwiththesameworkbooksrepeatedly,youcangroupthoseworkbooksin
aspecialfile,calledaworkspace.Whenyouopentheworkspace,Excelknowsto
openthefilesyouincludedinthatworkspace.
Aconsequenceoforganizingyourdataintodifferentworkbooksandworksheetsis
thatyouneedwaystomanage,combine,andsummarizedatafrommorethanone
Exceldocument.Youcanalwayscopydatafromoneworksheettoanother,butifthe
originalvalueweretochange,thatchangewouldnotbereflectedinthecellrangeto
whichyoucopiedthedata.Ratherthanrememberwhichcellsyouneedtoupdate
whenavaluechanges,youcancreatealinktotheoriginalcell.Thatway,Excelwill
updatethevalueforyouwheneveryouopentheworkbook.Ifmultipleworksheets
holdsimilarvalues,youcanuselinkstosummarizethosevaluesinasingleworksheet.
97
Microsoft
Office
Specialis
6
CombiningDatafromMultipleSources
Inthischapter,youlllearnhowtouseadatalistasatemplateforotherlists,work
withmorethanonesetofdata,linktodatainotherworkbooks,summarizemultiple
setsofdata,andgroupmultipledatalists.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxlxlii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
UsingaDataListasaTemplateforOtherLists
Microsoft
Onceyouhavedecidedonthetypeofdatayouwanttostoreinaworkbookand
Office
Specialistt
whatthatworkbookshouldlooklike,youwillprobablywanttobeabletocreate
similarworkbookswithoutaddingalltheformattingandformulasagain.Forexam-
ple,youmighthavesettledonadesignforyourmonthlysalestrackingworkbook.
Whenyouhavesettledonadesignforyourworkbooks,youcansaveoneofthe
workbooksasatemplate,orpattern,forsimilarworkbooksyoucreateinthefuture.
Youshouldremoveanyexistingdatafromaworkbookyousaveasatemplate,both
toavoiddataentryerrorsandtoremoveanyconfusionastowhethertheworkbook
isatemplate.Youcanalsoremoveanyworksheetsyouandyourcolleagueswont
needbyright-clickingthetabofanunneededworksheetand,fromtheshortcut
menuthatappears,clickingDelete.
Ifyouwantyourtemplateworkbooktohavemorethanthestandardnumberof
worksheets(suchas12worksheetstotracksalesforayear,bymonth),youcanadd
worksheetsbyright-clickinganysheettab,clickingInsertfromtheshortcutmenuthat
appears,andthen,ontheGeneralpageoftheInsertdialogbox,double-clickingthe
Worksheeticon.
Tocreateatemplatefromanexistingworkbook,yousavethemodelworkbook
undertheTemplatefiletype,whichyoucanchoosefromtheSaveastypedrop-down
listintheSaveAsdialogbox.Ifyoueverwanttochangethetemplate,youcanopen
itlikeastandardworkbook(thatis,anExcelfilewiththe.xlsextension)andmake
yourchanges.Whenyouhavecompletedyourwork,resavethefilenormallyitwill
stillbeatemplate.
WhenyouchangethefiletypetoTemplate,Excelchangestheactivedirectorytothe
defaultMicrosoftOffice2003templatesdirectory.Youneedtosaveyourtemplateto
thisfoldersothatitwillbeavailablethroughtheTemplatesdialogbox.Ifyoudprefer
tohaveExcellookinanotherdirectoryforyourtemplates,youcanchangethe
98
CombiningDatafromMultipleSources
6
defaultdirectoryExcellooksinwhenyoustarttheprogrambyopeningtheTools
menu,clickingOptions,clickingtheGeneraltab,andtypingthepathofthedirectory
intheAtstartup,openallfilesinbox.
Tip IfyoucleartheAtstartup,openallfilesinbox,ExcelrevertstothedefaultTem-
platesdirectory.
Onceyouhavesavedaworkbookasatemplate,youcanuseitasamodelfornew
workbooks.TocreateaworkbookfromatemplateinExcel,youopenthetaskpane
fromtheViewmenu.
TheTemplatessectionoftheNewWorkbooktaskpanehasalistofanypreviously
usedtemplatesaswellastheTemplatesHomePage,Onmycomputer,andOnmyWeb
sitesoptions.ClickingOnmyWebsiteswilltakeyoutotheWebandletyousearch
fortemplatesontheInternetoryourcompanysintranet,oronMSN.ClickingOnmy
computerliststhetemplatesavailableonyourcomputer.
FromtheTemplatesdialogbox,youcandouble-clickthetemplateyouwanttouseas
themodelforyourworkbook.Excelwillcreateanewworkbookwiththetemplates
formattingandcontentsinplace.
Tip Thedefaultfiletypeforfilescreatedwithatemplateisworkbook(.xls),not
template(.xlt).
Inthisexercise,youcreateatemplatetotracksalesforamonthatTheGarden
Company.Youdeleteunneededworksheetsfromthetemplate,savethefilewiththe
Templatefiletype,andthenuseyournewtemplatetocreateaworkbook.
OPEN:TemplateStartfromtheSBS\Excel\MultipleSources folder.
1 Onthetabbar,inthelowerleftcorneroftheworkbookwindow,right-clickthe
Sheet2taband,fromtheshortcutmenuthatappears,clickDelete.
TheSheet2worksheetdisappears.
2 Onthetabbar,inthelowerleftcorneroftheworkbookwindow,right-clickthe
Sheet3taband,fromtheshortcutmenuthatappears,clickDelete.
TheSheet3worksheetdisappears.
3 OntheFilemenu,clickSaveAs.
TheSaveAsdialogboxappears.
4 ClicktheSaveastypedownarrow,andfromthelistthatappears,click
Template(*.xlt).
TheactivedirectorychangestothedefaultOffice2003templatesdirectory.
99
6
CombiningDatafromMultipleSources
Close
Save
Save
5 IntheFilenamebox,deletetheexistingnameandtypeMonthlySales.
6 ClickSave.
TheSaveAsdialogboxdisappears,andExcelsavesyourdocumentasatemplate.
7 ClickthetemplatesClosebutton.
MonthlySales.xltcloses.
8 OntheFilemenu,clickMonthlySales.
TheMonthlySalestemplateappears.
9 ClicktheBcolumnheader.
10 OntheFormattingtoolbar,clicktheCenterbutton.
ThecontentsofcolumnBarecentered.
11 OntheStandardtoolbar,clicktheSavebutton.
Excelsavesyourchanges.
12 ClickthetemplatesClosebutton.
TemplateStartcloses.
13 OntheViewmenu,clickTaskPane.Ifnecessary,clicktheOtherTaskPanesdown
arrowandselectNewWorkbook.
TheNewWorkbooktaskpaneappears.
14 IntheTemplatessectionofthetaskpane,clickOnmycomputer.
TheTemplatesdialogboxappears.
15 IntheTemplatesdialogbox,double-clickMonthlySales.xlt.
AnewworkbooknamedMonthlySales1.xlsappears.
16 OntheStandardtoolbar,clicktheSavebutton.
TheSaveAsdialogboxappears,withthedefaultTemplatesdirectoryastheactive
directory.
17 NavigatetotheMultipleSourcesexercisedirectory,andintheFilenamebox,type
December.
18 ClickSave.
Excelsavesyourworkbook,andtheSaveAsdialogboxdisappears.
100
Microsoft
Office
Specialis
CombiningDatafromMultipleSources
6
19 OntheToolsmenu,clickOptions.
TheOptionsdialogboxappears.
20 Ifnecessary,clicktheGeneraltab.
TheGeneraltabpageappears.
21 IntheAtstartup,openallfilesinbox,typeC:\SBS\Excel\MultipleSources.
22 ClickCancel.
TheOptionsdialogboxdisappearswithoutsavingyourchanges.
23 OntheStandardtoolbar,clicktheSavebutton.
Save
CLOSE:December.
WorkingwithMoreThanOneSetofData
Microsoft
AnimportantpartofmanagingyourExceldataeffectivelyisorganizingitintowork-
Office
Specialistt
booksbysubject.Forexample,youcancreateaworkbooktotracksalesforthenew
yearoraddaworksheettoaproductsworkbooktomaintainrecordsofanewprod-
uctcategory.Whenyoustoreyourdatainmorethanoneworkbook,youneedaway
toworkwithmultipleworkbookssimultaneously.Youcanopenmorethanone
workbookatatimebyaccessingtheOpendialogboxmultipletimes,butyoucan
alsoopenmorethanonefilefromtheOpendialogboxatonce.
IntheOpendialogbox,holddowntheHkey,clickthefilesyouwanttoopen,and
thenclickOpen.Forexample,youmightopentheworkbookswiththesalesforthe
firstthreemonthsinayearandcomparethetotals,bothbydayandbygrandtotal.
Tip TheonlylimittothenumberofExcelfilesyoucanhaveopenatatimeisthe
amountofmemoryinyourcomputer.Ofcourse,thepracticallimitformosttasksismuch
lowerandprobablydoesntexceedfourorfiveopenfiles.
WhenyouopenmorethanoneExcelworkbook,theactiveworkbookoftenhidesthe
inactiveworkbooksonthescreen.Youcanusethebuttonsonthetaskbartomove
fromfiletofile,butyoucanalsoarrangetheworkbookswithintheExcelwindow.
Forexample,youcansplitthescreenhorizontallyandshowoneworkbookineach
portionofthewindow,asinthefollowinggraphic.
101
6
CombiningDatafromMultipleSources
Theproblemwithsplittingthescreenisthatmostofeachworkbookishidden.You
canarrangeyourworkbookswithintheExcelwindowsothatmostoftheactive
workbookisshownbuttheothersareeasilyaccessiblebyclickingArrangeonthe
Windowmenuand,intheArrangeWindowsdialogbox,selectingtheCascadeoption.
Whenyoudo,thewindowswillbearrangedasinthefollowinggraphic.
102
CombiningDatafromMultipleSources
6
Anotherwayyoucanworkwithmorethanoneworkbookistocopyaworksheet
fromanotherworkbooktothecurrentworkbook.Onecircumstanceinwhichyou
mightconsidercopyingworksheetstothecurrentworkbookwouldoccurifyouwere
tocollectallmonthlysalesresultsforayearinoneplace.Youcancopyworksheets
fromanotherworkbookbyright-clickingthetabofthesheetyouwanttocopyand,
fromtheshortcutmenuthatappears,clickingMoveorCopytodisplaytheMoveor
Copydialogbox.
Tip SelectingtheCreateacopycheckboxleavesthecopiedworksheetinitsoriginal
workbook,whileclearingthecheckboxcausesExceltodeletetheworksheetfromits
originalworkbook.
Oncetheworksheetsareinthetargetworkbook,youcanchangetheirordertomake
thedataeasiertolocatewithintheworkbook.Tochangeaworksheetslocationin
theworkbook,youdragitssheettabtothedesiredlocationonthetabbar.Ifyou
wantaworksheettostandoutinaworkbook,youcanright-clickitssheettaband
usethemenuthatappearstochangethetabscolor.Attheotherendofthespec-
trum,youcanhidetheactiveworksheetbyopeningtheFormatmenu,pointingto
Sheet,andclickingHide.Whenyouwanttohavethesheetshowupintheworkbook
again,opentheFormatmenu,pointtoSheet,andclickUnhide.Then,intheUnhide
dialogbox,clickthesheetyouwanttodisplay,andclickOK.
Inthisexercise,youopenmultipleworkbooks,changehowtheworkbooksaredis-
played,inserttwoworksheetsintoaworkbook,reordertheworksheets,hideoneof
theworksheets,andthenchangethetabcolorofoneoftheworksheets.
START:MicrosoftExcel.
1 OntheStandardtoolbar,clicktheOpenbutton.
Open TheOpendialogboxappears.
2 HolddowntheHkeywhileyouclickJanuary.xls,February.xls,andMarch.xls,and
thenclickOpen.
January.xls,February.xls,andMarch.xlsopen.
3 Ifnecessary,ontheWindowmenu,clickJanuary.xls.
January.xlsbecomestheactivedocument.
103
6
CombiningDatafromMultipleSources
4 OntheWindowmenu,clickArrange.
TheArrangeWindowsdialogboxappears.
5 ClicktheCascadeoptionbutton,andthenclickOK.
ThewindowsofopenExceldocumentsarecascadedwithintheExcelwindow.
6 ClicktheJanuary.xlstitlebar.
7 OntheFilemenu,clickSaveAs.
TheSaveAsdialogboxappears.
8 IntheFilenamebox,typeFirstQuarterandthenclickSave.
ExcelsavesthefileunderthenameFirstQuarter.xls.
9 ClicktheFebruary.xlstitlebar.
February.xlsbecomestheactivedocument.
10 Onthetabbar,right-clicktheFebruarytabandthen,fromtheshortcutmenuthat
appears,clickMoveorCopy.
TheMoveorCopydialogboxappears.
11 ClicktheTobookdownarrow,andthen,fromthelistthatappears,click
FirstQuarter.xls.
104
CombiningDatafromMultipleSources
6
ErrorOptions
12 IntheBeforesheetlist,click(movetoend).
13 AtthebottomoftheMoveorCopydialogbox,selecttheCreateacopycheckbox.
14 ClickOK.
TheFebruaryworksheetappearsinFirstQuarter.xls.CellsD38throughO38contain
anerrormarkerintheupperleftcornerofeachcell.
15 SelectcellsD38throughO38.
AnErrorOptionsbuttonappears.
Troubleshooting TheErrorOptionsbuttonappearsbecauseExcelasks
whetherthedatainthecellabovethetopoftheselectedrangeshouldbeincluded
inthecalculation.Itstimedataandshouldntbeincluded,soyoucanignorethe
errormessage.
16 ClicktheErrorOptionsbutton,andthen,fromtheshortcutmenuthatappears,click
IgnoreError.
Theerrormarkersdisappearfromtheselectedcells.
17 ClicktheMarch.xlstitlebar.
March.xlsbecomestheactivedocument.
105
6
CombiningDatafromMultipleSources
18 Onthetabbar,right-clicktheMarchtabandthen,fromtheshortcutmenuthat
appears,clickMoveorCopy.
TheMoveorCopydialogboxappears.
19 ClicktheTobookdownarrow,andthen,fromthelistthatappears,click
FirstQuarter.xls.
20 IntheBeforesheetlist,clickFebruary.
21 AtthebottomoftheMoveorCopydialogbox,selecttheCreateacopycheckbox.
22 ClickOK.
TheMarchworksheetappearsinFirstQuarter.xls,totheleftoftheFebruarytab.
CellsD38throughO38containanerrormarkerintheupperleftcornerofeachcell.
23 SelectcellsD38throughO38.
AnErrorOptionsbuttonappears.
24 ClicktheErrorOptionsbutton,andthen,fromtheshortcutmenuthatappears,click
IgnoreError.
Theerrormarkersdisappearfromtheselectedcells.
25 Onthetabbar,dragtheFebruarytabtotheleftoftheMarchtab.Asyoudragthe
Februarytab,alinewillappearinthetabbar,markingtheFebruarytabsplace.
TheFebruarytabmovestotheleftoftheMarchtab.
26 Onthetabbar,clicktheJanuarytabandthen,ontheFormatmenu,pointtoSheet,
andclickHide.
TheJanuarysheetdisappears.
27 Onthetabbar,right-clicktheMarchtab,andthen,fromtheshortcutmenuthat
appears,clickTabColor.
TheFormatTabColordialogboxappears.
28 Clickthelightorangesquare,andthenclickOK.
ExcelassignsthelightorangecolortotheMarchtab.
29 ClicktheFebruarytab.
TheFebruarysheetisselected.BecausetheMarchsheetisinthebackground,the
Marchtabturnslightorange.
106
CombiningDatafromMultipleSources
6
30 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:FirstQuarter,February,andMarch.
LinkingtoDatainOtherWorkbooks
Cuttingandpastingdatafromoneworkbooktoanotherisaquickandeasywayto
gatherrelateddatainoneplace,butthereisasubstantiallimitation:ifthedatafrom
theoriginalcellchanges,thechangeisnotreflectedinthecelltowhichthedatawas
copied.Inotherwords,cuttingandpastingacellscontentsdoesntcreatearelation-
shipbetweentheoriginalcellandthetargetcell.
Youcanensurethatthedatainthetargetcellwillreflectanychangesintheoriginal
cellbycreatingalinkbetweenthetwocells.Ratherthanenteravalueintothetarget
cellbytypingorpasting,youcreateatypeofformulathatidentifiesthesourcefrom
whichExcelwillderivethetargetcellsvalue.
Tocreatealinkbetweencells,openboththeworkbookwiththecellfromwhichyou
wanttopullthevalueandtheworkbookwiththetargetcell.Thenclickthetarget
cell,andtypeanequalsign,signifyingyouwanttocreateaformula.Afteryoutype
theequalsign,activatetheworkbookwiththecellfromwhichyouwanttoderive
thevalueandthenclickthatcell.
Whenyouswitchbacktotheworkbookwiththetargetcell,youwillfindthatExcel
hasfilledintheformulawithareferencetothecellyouclicked.
Thereferencefromthisexample,=[TotalByHour2001.xls]Sheet1!$D$8,givesthree
piecesofinformation:theworkbook,theworksheet,andthecellyouclickedinthe
worksheet.Thefirstelementofthereference,thenameoftheworkbook,isenclosed
insquarebrackets;theendofthesecondelementismarkedwithanexclamation
point;andthethirdelement,thecellreference,hasadollarsignbeforeboththerow
andthecolumnidentifiers.Thistypeofreferenceisknownasa3-D reference,
reflectingthethreedimensions(workbook,worksheet,andcell)thatyouneedto
pointtoacellinanotherworkbook.
Note Forreferencestocellsinthesameworkbook,theworkbookinformationisomit-
ted.Likewise,referencestocellsinthesameworksheetdontuseaworksheetidentifier.
107
6
CombiningDatafromMultipleSources
Wheneveryouopenaworkbookwithalinktoanotherdocument,Excelwilltryto
updatetheinformationinlinkedcells.Iftheprogramcantfindthesource,suchas
whenaworkbookorworksheetisdeletedorrenamed,analertboxappears,indicat-
ingthatthereisabrokenlink.Atthatpoint,youcanclicktheUpdatebuttonandthen
theEditLinksbuttontoopentheEditLinksdialogboxandfindwhichlinkisbroken.
Afteryouidentifythebrokenlink,youcanclosetheEditLinksdialogbox,clickthe
cellcontainingthebrokenlink,andcreateanewlinktothedesireddata.
Ifyoutypealinkyourselfandyoumakeanerror,a#REF!errormessagewillappear
inthecellwiththelink.Tofixthelink,clickthecell,deleteitscontents,andthen
eitherretypethelinkorcreateitwiththepoint-and-clickmethoddescribedearlierin
thissection.
Inthisexercise,youcreatealinktoanotherworkbook,breakthelink,andthenuse
theEditLinksdialogboxtoidentifythebrokenlinkandtheChangeSourcedialogbox
tofixthelink.
START:MicrosoftExcel.
Open
1 OntheStandardtoolbar,clicktheOpenbutton.
TheOpendialogboxappears.
2 HolddowntheHkeywhileyouclicktheLinking.xlsand2001Q1.xlsfiles,andthen
clickOpen.
Linking.xlsand2001Q1.xlsopen.
3 OntheWindowmenu,clickArrange.
TheArrangeWindowsdialogboxappears.
4 SelecttheCascadeoptionbutton,andthenclickOK.
TheopenExceldocumentscascadeintheExcelwindow.
5 InLinking.xls,clickcellD10,andthentype=.
6 Clickthe2001Q1.xlstitlebar.
The2001Q1.xlsfileappears.
7 Ifnecessary,clicktheJanuarysheettab.
8 ClickcellQ38.
108
CombiningDatafromMultipleSources
6
Save
9 ClicktheLinking.xlstitlebar.
Linking.xlsappears,withtheformula=[2001Q1.xls]January!$Q$38 incellD10.
10 PressF.
Thevalue $97,925.00appearsincellD10.
11 OntheStandardtoolbar,clicktheSavebutton.
Excelsavesyourchanges.
12 HolddowntheGkeyand,ontheFilemenu,clickCloseAll.
Linking.xlsand2001Q1.xlsclose.
13 OntheStandardtoolbar,clicktheOpenbutton.
TheOpendialogboxappears.
14 Click2001Q1.xls,andthenpressA.ConfirmthedeletionbyclickingYesinthedia-
logboxthatappears.
2001Q1.xlsmovestotheRecycleBin.
15 Double-clickLinking.xls.
Linking.xlsopens,withanalertboxaskingwhetheryouwanttoupdatethelinksin
theworkbook.
16 Inthealertbox,clickUpdate.
Theoriginalalertboxdisappears,andasecondalertbox,withamessageaskingif
youwanttoeditthebrokenlink,appears.
109
Microsoft
Office
Specialis
6
CombiningDatafromMultipleSources
17 ClickEditLinks.
TheEditLinksdialogboxappears.
18 ClickChangeSource.
TheChangeSourcedialogboxappears.
19 Double-clickY2001Q1.xls.
TheChangeSourcedialogboxdisappears,andtheEditLinksdialogboxreappears,
withanindicationthatY2001Q1.xlsisavalidsourceforlinks.
20 ClickClose.
TheEditLinksdialogboxdisappears,and$97,925.00appearsincellD10.
21 ClickcellD10.
=[Y2001Q1.xls]January!$Q$38 appearsintheformulabar.
22 OntheStandardtoolbar,clicktheSavebutton.
Excelsavesyourchanges.
CLOSE:Linking.
SummarizingMultipleSetsofData
Microsoft
Whenyoucreateaseriesofworksheetsthatcontainsimilardata,perhapsbyusinga
Office
Specialistt
template,youbuildaconsistentsetofworkbookswheredataisstoredinapredictable
place.Forexample,intheworkbooktemplateinthefollowinggraphic,salesforthe
hour9:00a.m.to10:00a.m.onthefirstdayofthemontharealwaysstoredincellD6.
110
CombiningDatafromMultipleSources
6
Usinglinkstobringdatafromoneworksheettoanothergivesyouagreatdealof
powerincombiningdatafromseveralsourcesinasinglespot.Forexample,youcan
createaworksheetthatliststhetotalsalesjustforcertainmonthsofayear,uselinks
todrawthevaluesfromtheworksheetsinwhichthesaleswererecorded,andthen
createaformulatoperformcalculationsonthedata.However,forlargeworksheets
withhundredsofcellsfilledwithdata,creatinglinksfromeverycelltocellsin
anotherworksheetistime-consuming.Also,tocalculateasumoranaverageforthe
data,youwouldneedtoincludelinkstocellsineveryworkbook.
Fortunately,thereisaneasierwaytocombinedatafrommultipleworksheetsinasin-
gleworksheet.Thisprocess,calleddata consolidation,letsyoudefinerangesofcells
frommultipleworksheetsandhaveExcelsummarizethedata.Youdefinethese
rangesintheConsolidatedialogbox.
Onceyouhaveopenedthedialogbox,youmovetotheworksheetwiththecellsin
thefirstrangeyouwanttoincludeinyoursummary.Whenyouselectthecells,the
3-DreferenceforthecellrangeappearsintheConsolidatedialogbox.
ClickingAddstoresthereference,whileclickingDeleteremovesarangefromthecal-
culation.Youcanthenchoosetheothercellrangeswithdatatoincludeinthesum-
mary.Cellsthatareinthesamerelativepositionintherangeswillhavetheircontents
111
6
CombiningDatafromMultipleSources
summarizedtogether.Sothecellintheupperleftcornerofonerangewillbeadded
tothecellintheupperleftcornerofanotherrange,evenifthoserangesareindiffer-
entareasoftheworksheet.Afteryouchoosetherangestobeusedinyoursummary,
youcanchoosethecalculationtoperformonthedata(sum,average,andsoon).
Whenyouredoneselectingrangestouseinthecalculation,clickOKtohaveExcel
summarizethedatainyourtargetworksheet.
Important Youcandefineonlyonedataconsolidationsummaryperworkbook.
Inthisexercise,youdefineaseriesofrangesfromtwoworkbookstobeincludedin
adataconsolidationcalculation.Youthenaddthecontentsoftherangesandshow
theresultsinaworksheet.
START:MicrosoftExcel.
Open
1 OntheStandardtoolbar,clicktheOpenbutton.
TheOpendialogboxappears.
2 HolddowntheHkeywhileyouclickConsolidate.xlsandY2001ByMonth.xls,and
thenclickOpen.
Consolidate.xlsandY2001ByMonth.xlsopen.
3 Ifnecessary,ontheWindowmenu,clickConsolidate.xls.
Consolidate.xlsbecomestheactivedocument.
4 ClickcellD5,andthen,ontheDatamenu,clickConsolidate.
TheConsolidatedialogboxappears.
5 OntheWindowmenu,clickY2001ByMonth.xls.
Y2001ByMonth.xlsbecomestheactivefile.
6 Ifnecessary,clicktheJanuarysheettab.
7 ClickcellD6anddragtocellO36.
Asyoudrag,theConsolidatedialogboxrollsup.Whenyoureleasethemousebut-
ton,[Y2001ByMonth.xls]January!$D$6:$O$36appearsintheReferenceboxofthe
Consolidatedialogbox.
8 ClickAddintheConsolidatedialogbox.
[Y2001ByMonth.xls]January!$D$6:$O$36appearsintheAllreferenceslistofthe
Consolidatedialogbox.
9 ClicktheFebruarysheettab.
CellsintherangeD6:O36arealreadyselected.[Y2001ByMonth.xls]Febru-
ary!$D$6:$O$36appearsintheReferenceboxoftheConsolidatedialogbox.
112
CombiningDatafromMultipleSources
6
10 ClickAdd.
[Y2001ByMonth.xls]February!$D$6:$O$36appearsintheAllreferenceslistofthe
Consolidatedialogbox.
11 ClicktheMarchsheettab.
TherangeD6:O36isalreadyselected.[Y2001ByMonth.xls]March!$D$6:$O$36
appearsintheReferenceboxoftheConsolidatedialogbox.
12 ClickAdd.
[Y2001ByMonth.xls]March!$D$6:$O$36 appearsintheAllreferenceslistofthe
Consolidatedialogbox.
13 OntheWindowmenu,clickConsolidate.xls.
Consolidate.xlsbecomestheactivedocument.
14 IntheConsolidatedialogbox,clickOK.
TheConsolidatedialogboxdisappears.Thesumsofthecontentsofthecellsinthe
threeworksheetsnamedintheConsolidatedialogboxappearincellsD5:O35.
113
Microsoft
Office
Specialis
6
CombiningDatafromMultipleSources
15 OntheStandardtoolbar,clicktheSavebutton.
Save Excelsavesyourchanges.
CLOSE:Consolidate,Y2001ByMonth.
GroupingMultipleDataLists
Microsoft
WhenyouworkwithExcelforawhile,youllfindthatyouoftenworkwithanumber
Office
Specialistt
ofthesameworkbooksatatime.Forinstance,CatherineTurner,theownerofThe
GardenCompany,mightalwayspullupayearlysalessummaryworkbookandthe
salesfiguresforproductcategoriesofferedbyTheGardenCompany.Shecanopen
theworkbookstogetherthroughtheOpendialogbox,butshecanalsogroupthefiles
sothatshehastheoptionofopeningthemallsimultaneously.
Ifyouwanttoopenasetoffilessimultaneously,youcandefinethemaspartofa
workspace,whichusesasingleExcelfilenametoreferenceseveralworkbooks
insteadofone.Todefineaworkspace,youopenthefilesyouwanttoincludeand
thenopentheSaveWorkspacedialogbox.
WhentheSaveWorkspacedialogboxisopen,clickingSavesavesreferencestothe
Excelfilesthatarecurrentlyopen.Wheneveryouopentheworkspaceyoucreate,
allofthefilesthatwereopenwhenyoudefinedtheworkspacewillappear.Includ-
ingafileinaworkspacedoesntremoveitfromgeneralcirculation;youcanstill
openitbyitself.
Inthisexercise,yousaveaworkspacethatconsistsoftwoworkbooks,closethe
includedfiles,andthentesttheworkspacebyopeningitfromtheOpendialogbox.
START:MicrosoftExcel.
1 OntheStandardtoolbar,clicktheOpenbutton.
Open TheOpendialogboxappears.
2 HolddowntheHkeywhileyouclicktheY2001ByMonth.xlsand
TotalByHour2001.xlsfiles,andthenclickOpen.
Y2001ByMonth.xlsandTotalByHour2001.xlsappear.
3 OntheFilemenu,clickSaveWorkspace.
TheSaveWorkspacedialogboxappears,withthefiletypeintheSaveastypebox
settoWorkspaces (*.xlw).
114
CombiningDatafromMultipleSources
6
4 IntheFilenamebox,typeY2001SummaryandthenclickSave.
Excelsavesyourworkspace.
5 HolddowntheGkeyand,ontheFilemenu,clickCloseAll.
Y2001ByMonthandTotalByHour2001close.
6 OntheStandardtoolbar,clicktheOpenbutton.
TheOpendialogboxappears.
7 Double-clickY2001Summary.xlw.
TheTotalByHour2001.xlsandY2001ByMonth.xlsworkbooksopen.
CLOSE:TotalByHour2001,Y2001ByMonth.
115
6
CombiningDatafromMultipleSources
KeyPoints
Ifyoucreatealotofworkbookswiththesamelayoutanddesign,savingawork-
bookwiththecommonelements(andnodata)willtakeyoumuchlesstime.
YoucanchangethedefaultfolderwhereExcellooksfortemplates,butyou
shoulddosoonlyifyoudontwantanyonetocreateworkbooksfromother
templates.
Whenyouworkwithseveralworkbooksatonce,youcanchangetheirarrange-
mentontheWindowsdesktoptomakeiteasiertomoveamongthem.
RememberthatyoucancloseallopenworkbooksbyholdingdowntheG
keyandclickingCloseAllontheFilemenu.
Worksheetsarentlockedintoplace.Youcanmovethemwithinaworkbook,
copyormovethemtoanotherworkbook,insertnewones,orhidethem
fromview.
Whenyouwantaworksheettostandout,changethecolorofitssheettab.
Youcanusedatainotherworksheetsorworkbooksinyourformulas.You
makethelinkbyclickingthecell,whichcreatesa3-Dreferencetothatcell.
Ifyoualwaysworkonagroupofworkbooksatthesametime,createawork-
spacesothatyoucanopenthemallatonce.
116
Chapter 7 at a Glance
Sortadatalist,
page120
Organizedataintolevels,
page124
118 Chapter 7 at a Glance
7
Reorderingand
SummarizingData
Inthischapteryouwilllearnto:
Sortadatalist.
Organizedataintolevels.
Mostofthetime,whenyouenterdatainaMicrosoftExcelworksheet,youwillenter
itinchronologicalorder.Forinstance,youwouldprobablyenterhourlysalesdatain
aworksheetattheendofeachday,startingwiththefirsthouryourstorewasopen
andmovingtoclosingtime.Thedatawouldnaturallybedisplayedintheorderin
whichyouenteredit,butthatmightnotalwaysbethebestordertoansweryour
questions.Forinstance,youmightwanttosortyourdatasothatthetoprowinyour
worksheetshowsthebestsalesdayforthemonth,withsubsequentrowsdisplaying
theremainingdaysofthemontharrangedbytotalsales.Youcanalsosortbasedon
thecontentsofmorethanonecolumn.Agoodexamplewouldbesortingsalesdata
byweek,day,andthenhouroftheday.
Onceyouhavesortedyourdataintothedesiredorder,Excelletsyoufindpartial
totals,orsubtotals,forgroupsofcellswithinagivenrange.Yes,youcancreatefor-
mulastofindthesum,average,orstandarddeviationofdatainacellrange,butyou
candothesamethingmuchmorequicklybyhavingExcelcalculatethetotalforcells
withthesamevalueinacolumn.Ifyourworksheetheldsalesdataforalistofprod-
ucts,youcouldcalculatesubtotalsforeachproductcategory.
Whenyoucalculatesubtotalsinaworksheet,Excelcreatesanoutlinethatmarksthe
cellrangesusedineachsubtotal.Forexample,ifthefirst10rowsofaworksheet
havefurnituresalesdataandthesecond10rowshavetoolsalesdata,Excelwill
dividetherowsintotwounits.Youcanusethemarkersontheworksheettohideor
displaytherowsusedtocalculateasubtotal;inthiscase,youcanhidealloftherows
withtooldata,hidealloftherowswithfurnituredata,hideboth,orshowboth.
Inthischapter,youlllearnhowtosortyourdatausingoneormorecriteria,calculate
subtotals,andorganizeyourdataintolevels.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxliixliii.
119
Microsoft
Office
Specialis
7
ReorderingandSummarizingData
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
SortingaDataList
Microsoft
WhileExcelmakesiteasytoenteryourbusinessdataandtomanageitafteryouve
Office
Specialistt
saveditinaworksheet,itsrarethatyourdatawillanswereveryquestionyouwant
toaskit.Forexample,youmightwanttodiscoverwhichofyourproductshasthe
highesttotalsales,whichproducthasthenexthighest,andsoon.Youcanfindout
thatinformationbysortingyourdata.
Whenyousortdatainaworksheet,yourearrangetheworksheetrowsbasedonthe
contentsofcellsinaparticularcolumn.Sortingaworksheettofindyourhighest-
sellingproductsintermsofunitssold,forinstance,mightshowtheresultsdisplayed
inthefollowinggraphic.
Youcansortagroupofrowsinaworksheetinanumberofways,butthefirststepis
toidentifythecolumnthatwillprovidethevaluesbywhichtherowsshouldbe
Sort
Descending
sorted.Intheabovegraphic,youcouldfindthehighestsalestotalsbychoosingthe
cellsintheTotalcolumnandthenclickingtheSortDescendingtoolbarbutton.Click-
ingtheSortDescendingbuttonhasExcelputtherowwiththehighestvalueinthe
Totalcolumnatthetopoftheworksheetandcontinuedowntothelowestvalue.
Ifyouwantedtosorttherowsintheoppositeorder,fromthelowestsalestothe
SortAscending
highest,youwouldselectthecellsintheTotalcolumnandthenclicktheSortAscend-
ingtoolbarbutton.
TheSortAscendingandSortDescendingtoolbarbuttonsletyousortrowsinawork-
sheetquickly,butyoucanusethemonlytosorttheworksheetbasedonthecontents
ofonecolumn.Forexample,youmightwanttoordertheworksheetrowsbyproduct
categoryandthenbytotalsothatyoucanseethehighest-sellingitemsineachcate-
gory.Youcansortrowsinaworksheetbythecontentsofmorethanonecolumn
throughtheSortdialogbox,whereyoucanpickuptothreecolumnstouseassort
criteriaandchoosewhethertosorttherowsinascendingordescendingorder.
120
ReorderingandSummarizingData
7
ThedefaultsettingforExcelistosortnumbersaccordingtotheirvaluesandtosort
wordsinalphabeticalorder,butthatpatterndoesntworkforsomesetsofvalues.One
exampleofwheresortingalistofvaluesinalphabeticalorderwouldyieldincorrect
resultsiswiththemonthsoftheyear.Inanalphabeticalcalendar,Aprilisthefirst
monthandSeptemberthelast!Fortunately,Excelrecognizesanumberofspeciallists,
suchasdaysoftheweekandmonthsoftheyear.YoucanhaveExcelsortthecontents
ofaworksheetbasedonvaluesinaknownlist;ifneeded,youcancreateyourown
listofvaluesusingthetoolsontheCustomListstabpageoftheOptionsdialogbox.
ThedefaultlistsofweekdaysinExcelbothstartwithSunday.Ifyoukeepyourbusi-
nessrecordsbasedonaMondaySundayweek,youcancreateanewlistwithMon-
dayasthefirstdayandSundayasthelast.
Important Ifyousortusingacustomlist,thecustomlistmustbetheprimarysort-
ingcriterion.
Inthisexercise,yousortyourworksheetusingtheSortAscendingtoolbarbutton,
usetheSortdialogboxtosortyourworksheetbasedonthecontentsofmorethan
onerow,createacustomsortorder,andthenapplythatcustomsortordertoyour
worksheet.
OPEN:SortingfromtheSBS\Excel\ReorderingAndSummarizingfolder.
1 Ifnecessary,clicktheSalestabtodisplaytheSalesworksheet.
2 ClickcellA1anddragtocellA32.
3 OntheStandardtoolbar,clicktheSortAscendingbutton.
Thedataintheselectedrangeofcellsissortedinascendingorder.Notethatthe
firstcell,whichcontainsadatalabel,isnotincludedinthesort.
121
7
ReorderingandSummarizingData
4 ClicktheAllInfosheettab.
TheAllInfoworksheetappears.
5 ClickcellA1anddragtocellD32.
6 OntheDatamenu,clickSort.
TheSortdialogboxappears.
7 Ifnecessary,clicktheSortbydownarrowandthen,fromthelistthatappears,click
Sales.
SalesappearsintheSortbybox.
8 ClicktheThenbydownarrow,andthen,fromthelistthatappears,clickWeekday.
WeekdayappearsintheThenbybox.
9 ClickOK.
Thecontentsoftheselectedcellsappearinsortedorder.
122
ReorderingandSummarizingData
7
Undo
10 OntheStandardtoolbar,clicktheUndobutton.
Thecontentsoftheselectedcellsappearintheiroriginalorder.
11 ClickcellG2anddragtocellG8.
12 OntheToolsmenu,clickOptions.
TheOptionsdialogboxappears.
13 ClicktheCustomListstab.
TheCustomListstabpageappears,with$G$2:$G$8intheImportlistfrom
cellsbox.
14 ClickImport.
TheitemsinthecellsappearintheListentrieslist,whiletheseriesappearsinthe
Customlistslist.
15 ClickOK.
TheOptionsdialogboxcloses.
16 ClickcellA1anddragtocellD32.
17 OntheDatamenu,clickSort.
TheSortdialogboxappears.
18 ClicktheSortbydownarrow,andthen,fromthelistthatappears,clickWeekday.
WeekdayappearsintheSortbybox.
19 ClicktheOptionsbutton.
TheSortOptionsdialogboxappears.
20 ClicktheFirstkeysortorderdownarrow,andthen,fromthelistthatappears,click
Mon,Tue,Wed,Thu,Fri,Sat,Sun.
Mon, Tue, Wed, Thu, Fri, Sat, SunappearsintheFirstkeysortorderbox.
21 ClickOK.
TheSortOptionsdialogboxdisappears.
123
Microsoft
Office
Specialis
7
ReorderingandSummarizingData
22 ClicktheThenbydownarrow,andthen,fromthelistthatappears,clickSales.
SalesappearsintheThenbybox.
23 ClickOK.
Theselecteddataappearsinsortedorder.
24 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Sorting.
OrganizingDataintoLevels
Microsoft
AfteryouhavesortedtherowsinanExcelworksheetorenteredthedatainsucha
Office
Specialistt
waythatitdoesntneedtobesorted,youcanhaveExcelcalculatesubtotals,ortotals
foraportionofthedata.Inaworksheetwithsalesdataforthreedifferentproduct
categories,forexample,youcansorttheproductsbycategory,selectallofthecells
thatcontaindata,andthenopentheSubtotaldialogbox.
IntheSubtotaldialogbox,youcanchoosethecolumnonwhichtobaseyoursub-
totals(suchaseverychangeofvalueintheWeekcolumn),thesummarycalculation
124
ReorderingandSummarizingData
7
youwanttoperform,andthecolumnorcolumnswithvaluestobesummarized.In
theworksheetintheprecedinggraphic,forexample,youcouldalsocalculatesub-
totalsforthenumberofunitssoldineachcategory.Afteryoudefineyoursubtotals,
theyappearinyourworksheet.
Asthegraphicshows,whenyouaddsubtotalstoaworksheet,Excelalsodefines
groupsbasedontherowsusedtocalculateasubtotal.Thegroupingsformanoutline
ofyourworksheetbasedonthecriteriayouusedtocreatethesubtotals.Intheabove
example,alloftherowswithfurnitureproductsareinonegroup,rowswithtoolsare
inanother,andsoon.Theoutlinesectionattheleftofyourworksheetholdscontrols
youcanusetohideordisplaygroupsofrowsinyourworksheet.
Therearethreetypesofcontrolsintheoutlinesection:HideDetailbuttons,Show
Detailbuttons,andlevelbuttons.
Levelbuttons
Hidedetail
Showdetail
125
7
ReorderingandSummarizingData
HideDetail
ShowDetail
Level
TheHideDetailbuttonbesideagroupcanbeclickedtohidetherowsinthatgroup.
Inthepreviousgraphic,clickingtheHideDetailbuttonnexttorow9wouldhide
rows2through8butleavetherowholdingthesubtotalforthatgroup,row9,visible.
Whenyouhideagroupofrows,thebuttonnexttothegroupchangestoaShow
Detailbutton.ClickingagroupsShowDetailbuttonrestorestherowsinthegroupto
theworksheet.
Thelevelbuttonscomprisetheothersetofbuttonsintheoutlinesectionofawork-
sheetwithsubtotals.Eachbuttonrepresentsaleveloforganizationinaworksheet;
clickingalevelbuttonhidesalllevelsofdetailbelowthatofthebuttonyouclicked.
Thefollowingtableidentifiesthethreelevelsoforganizationinthepreviousgraphic.
Level Description
1 Thegrandtotal
2 Subtotalsforeachgroup
3 Individualrowsintheworksheet
ClickingtheLevel2buttonintheworksheetshowninthepreviousillustrationwould
Level2 hidetherowswithdataonthesalesofindividualproductsbutwouldleavetherow
withthegrandtotal(Level1)andallrowswiththesubtotalsforeachproduct
(Level2)visibleintheworksheet.
Ifyoulike,youcanaddlevelsofdetailtotheoutlineExcelcreates.Forinstance,you
mightwanttobeabletohidesalesofbamboobarrier,bamboochimes,andbamboo
stakes(whichyouknowsellwell)toseehowotherproductssellincomparison.To
createanewoutlinegroupwithinanexistinggroup,selecttherowsyouwantto
groupandthenopentheDatamenu,pointtoGroupandOutline,andclickGroup.
Excelwillcreateanewgrouponanewlevel.
126
ReorderingandSummarizingData
7
YoucanremoveagroupbyselectingtherowsinthegroupandclickingUngroup
fromthesamesubmenu.
Tip Ifyouwanttoremoveallsubtotalsfromaworksheet,opentheSubtotaldialogbox
andclicktheRemoveAllbutton.
Inthisexercise,youaddsubtotalstoaworksheetandthenusetheoutlinethat
appearstoshowandhidedifferentgroupsofdatainyourworksheet.
OPEN:LevelsfromtheSBS\Excel\ReorderingAndSummarizing folder.
1 Clicktherowheadofrow1anddragtotherowheadofrow32.
Rows1through32arehighlighted.
2 OntheDatamenu,clickSubtotals.
TheSubtotaldialogboxappears,withthedefaultoptionstoaddasubtotalatevery
changeintheWeekcolumn,toreturnthesumofthevaluesinthesubtotaledrows,
andtoaddarowwiththesubtotalofvaluesintheSalescolumnbelowthefinal
selectedrow.
3 ClickOK.
TheSubtotaldialogboxdisappears.InLevels.xls,newrowsappearwithsubtotals
forsalesduringeachweekrepresentedintheworksheet.Thenewrowsarenum-
bered9,17,25,33,and37.Arowwiththegrandtotalofallrowsalsoappears;
thatrowisrow38.Anewsectionwithoutlinebarsandgroup-levelindicators
appearstotheleftofcolumnA.
127
7
ReorderingandSummarizingData
4 Clicktherowheadofrow2anddragtotherowheadofrow6.
Rows2through6arehighlighted.
5 OntheDatamenu,pointtoGroupandOutline,andthenclickGroup.
Rows2through6aremadeintoanewgroup.Anoutlinebarappearsonanewlevel
intheoutlinesection,andacorrespondingLevel4buttonappearsatthetopofthe
outlinesection.
6 Intheoutlinesection,clicktheHideDetailbuttonnexttorow7.
Rows2through6arehidden,andtheHideDetailbuttonyouclickedchangestoa
ShowDetailbutton.
7 Intheoutlinesection,clicktheShowDetailbuttonnexttorow7.
Rows2through6reappear.
8 Intheoutlinesection,clicktheLevel1button.
Level1
128
ReorderingandSummarizingData
7
Allrowsexceptrow1,withthecolumnheadings,androw38,withthegrandtotal,
arehidden.
9 Intheoutlinesection,clicktheLevel2button.
Level2
Therowswiththesubtotalforeachweekappear.
10 Intheoutlinesection,clicktheLevel3button.
Level3
Allrowsexceptrows2through6appear.
11 Intheoutlinesection,clicktheLevel4button.
Level4
Rows2through6reappear.
12 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Sorting.
KeyPoints
YoucanrearrangethedatainaworksheetquicklybyclickingeithertheSort
AscendingorSortDescendingtoolbarbutton.
Dontforgetthatyoucansorttherowsinaworksheetusingordersotherthan
alphabeticalornumerical.Forexample,youcansortaseriesofdaysbasedon
theirorderintheweek.
Ifnoneoftheexistingcustomsortorders(days,weekdays,andsoon)meet
yourneeds,youcancreateyourowncustomsortorder.
Youcandividethedatainyourworksheetintolevels,andfindasubtotalfor
eachlevel.
Creatingsubtotalsletsyoushoworhidegroupsofdatainyourworksheets.
129
Chapter 8 at a Glance
Defineandedit
alternativedatasets,
page132
Definemultiple
alternativedatasets,
page135
Varyyourdatato
getthedesiredresult,
page138
130 Chapter 8 at a Glance
8
AnalyzingAlternative
DataSets
Inthischapteryouwilllearnto:
Defineandeditanalternativedataset.
Definemultiplealternativedatasets.
Varyyourdatatogetadesiredresult.
UsetheSolvertofindsolutionstomultivariateproblems.
DescribeyourdatausingtheAnalysisToolPak.
WhenyoustoredatainaMicrosoftExcelworkbook,youcanusethatdata,eitherby
itselforaspartofacalculation,todiscoverimportantinformationaboutyourbusi-
ness.Whenyoutracktotalsalesonatimebasis,youcanfindyourbestandworst
salesperiodsandcorrelatethemwithoutsideevents.ForbusinesseslikeTheGarden
Company,salesofallproductspickupduringtheearlyspringasgardenersgetready
forthecomingyear.Duringthewinterholidays,toolsalespickupascustomerspur-
chasegiftsforfriendsandfamilymemberswhogarden.
Thedatainyourworksheetsisgreatforasking,Whathappened?butislessuseful
foraskingwhatifquestions,suchas,Howwouldourtotalrevenuebeaffectedif
weincreasedfurnituresalesby20percent?Youcanalwayssaveanalternativever-
sionofaworkbookandcreateformulasthatcalculatetheeffectsofyourchanges,but
youcandothesamethinginyourworkbookbydefiningoneormorealternative
datasetsandswitchingbetweentheoriginaldataandthenewsetsyoucreate.
Excelalsoprovidesthetoolstodeterminetheinputsthatwouldberequiredforafor-
mulatoproduceagivenresult.Forexample,theownerofTheGardenCompany
couldfindouttowhatleveltoolsaleswouldneedtoriseforthatcategorytoaccount
for25percentoftotalsales.
Inthischapter,youlllearnhowtodefinealternativedatasetsanddeterminethenec-
essaryinputstomakeacalculationproduceaparticularresult.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxliiixlvi.
131
Microsoft
Office
Specialis
8
AnalyzingAlternativeDataSets
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
DefiningandEditingAlternativeDataSets
Microsoft
WhenyousavedatainanExcelworksheet,youcreatearecordthatreflectsthechar-
Office
Specialistt
acteristicsofaneventorobject.Thatdatacouldrepresentanhourofsalesonapar-
ticularday,thepriceofanitemyoujustbeganofferingforsale,orthepercentageof
totalsalesaccountedforbyacategoryofproducts.Oncethedataisinplace,youcan
createformulastogeneratetotals,findaverages,andsorttherowsinaworksheet
basedonthecontentsofoneormorecolumns.However,ifyouwanttoperform
what-if analysis,orexploretheimpactthatchangesinyourdatawouldhaveonany
ofthecalculationsinyourworkbooks,youwillneedtochangeyourdata.
Theproblemofworkingwithdatathatreflectsaneventoritemisthatchangingany
datatoaffectacalculationrunstheriskofdestroyingtheoriginaldataifyouacciden-
tallysaveyourchanges.Youcanavoidruiningyouroriginaldatabycreatingadupli-
cateworkbookandmakingyourchangestoit,butyoucanalsocreatealternative
datasets,orscenarios,withinanexistingworkbook.
Whenyoucreateascenario,yougiveExcelalternativevaluesforalistofcellsina
worksheet.Youcanadd,delete,andeditscenariosusingtheScenarioManager.
ClickingtheAddbuttoncausestheAddScenariodialogboxtoappear.
132
AnalyzingAlternativeDataSets
8
Fromwithinthisdialogbox,youcanidentifythecellsthatwillholdalternativeval-
ues,andafteryouclickOK,anewdialogboxwithspacesforyoutoenterthenew
valueswillappear.
ClickingOKreturnsyoutotheScenarioManagerdialogbox.Fromthere,clickingthe
Showbuttonwillreplacethevaluesintheoriginalworksheetwiththealternativeval-
uesyoujustdefined.Anyformulasusingcellswithchangedvalueswillrecalculate
theirresults.YoucanthenremovethescenariobyclickingtheUndobuttononthe
Standardtoolbar.
Warning Ifyousaveandcloseaworkbookwhileascenarioisineffect,thosevalues
willbecomethedefaultvaluesforthecellschangedbythescenario!Youshouldstrongly
considercreatingascenariothatcontainstheoriginalvaluesofthecellsyouchange.
Inthisexercise,youcreateascenariotomeasuretheprojectedimpactofafurniture
saleontotalrevenueforTheGardenCompany.
OPEN:DefiningfromtheSBS\Excel\AnalyzingAlternativeDataSetsfolder.
1 Ifnecessary,clickcellA1.
2 OntheToolsmenu,clickScenarios.
TheScenarioManagerdialogboxappears.
133
8
AnalyzingAlternativeDataSets
Collapse
Dialog
ExpandDialog
3 ClickAdd.
TheAddScenariodialogboxappears.
4 IntheScenarionamebox,typeFurnitureSale.
5 AttherightedgeoftheChangingcellsbox,clicktheCollapseDialogbutton.
TheAddScenariodialogboxcollapses,anditstitlebarchangestoAdd Scenario -
Changing Cells.
6 DeletethecontentsoftheAddScenariodialogbox,andthenholddownHwhile
youclickcellsF8,F9,F12,andF13.
$F$8,$F$9,$F$12,$F$13 appearsintheChangingcellsbox.
7 AttherightedgeoftheChangingcellsbox,clicktheExpandDialogbutton.
TheEditScenariodialogboxappears.
8 ClickOK.
TheEditScenariodialogboxdisappears,andtheScenarioValuesdialogbox
appears.
9 Inthe1:$F$8box,type5000.
10 Inthe2:$F$9box,type5750.
11 Inthe3:$F$12box,type6000.
12 Inthe4:$F$13box,type5000.
13 ClickOK.
TheScenarioManagerdialogboxreappears.
134
Microsoft
Office
Specialis
AnalyzingAlternativeDataSets
8
14 ClickShow.
Thecontentsofyourworksheetchangetoreflectthevaluesinyourscenario.
15 ClickClose.
TheScenarioManagerdialogboxcloses.
16 OntheStandardtoolbar,clicktheUndobuttontoreverttotheoriginalnumbersin
theworksheet.
17 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Defining.
DefiningMultipleAlternativeDataSets
Microsoft
OnegreatfeatureofExcelscenariosisthatyourenotlimitedtocreatingonealterna-
Office
Specialistt
tivedatasetyoucancreateasmanyasyoulikeandswitchamongthematwill
withtheScenarioManager.TochangefromonescenariotoanotherintheScenario
Manager,clickthenameofthescenariotowhichyouwanttochangeandthenclick
theShowbutton.Thevaluesyoudefinedaspartofthatscenariowillappearinyour
worksheet,andExcelwillupdateanycalculationsinvolvingthechangedcells.
Tip Ifyouapplyascenariotoaworksheetandthenapplyanotherscenariotothe
sameworksheet,bothsetsofchangeswillappear.Ifthesecondscenariochangesacell
changedbythefirstscenario,thecellwillreflectthevalueinthesecondscenario.
Changingfromonescenariotoanothergivesyouanoverviewofhowthescenarios
affectyourcalculations,butExcelalsogivesyouawaytoviewtheresultsofallof
yourscenariosinasingleworksheet.Tocreateaworksheetinyourcurrentwork-
bookthatsummarizesthechangescausedbyyourscenarios,opentheScenario
ManagerandthenclicktheSummarybutton.Whenyoudo,theScenarioSummary
dialogboxappears.
FromwithintheScenarioSummarydialogbox,youcanchoosethetypeofsummary
Collapse
worksheetyouwanttocreateandthecellsyouwanttoappearinthesummarywork-
Dialog sheet.Tochoosethecellstoappearinthesummary,clicktheCollapseDialogbutton
intheResultcellsbox,selectthecellsyouwanttoappear,andthenexpandthedia-
logbox.AfteryouverifythattherangeintheResultcellsboxrepresentsthecellsyou
wantincludedonthesummarysheet,clickOKtocreatethenewworksheet.
ItsagoodideatocreateanundoscenarionamedNormalwiththeoriginalvalues
ofeverycellchangedinotherscenarios.Forexample,ifyoucreateascenarionamed
No rainthatchangesthesalesfiguresinthreecells,yourNormalscenariowillrestore
thosecellstotheiroriginalvalues.Thatway,evenifyouaccidentallymodifyyour
worksheet,youcanapplytheNormalscenarioandwonthavetoreconstructthe
worksheetfromscratch.
135
8
AnalyzingAlternativeDataSets
Tip Eachscenariocanchangeamaximumof32cells,soyoumightneedtocreate
morethanonescenariotorestoreaworksheet.
Inthisexercise,youcreatescenariostorepresentprojectedrevenueincreasesfrom
twosales,viewthetwoscenarios,andthensummarizethescenarioresultsinanew
worksheet.
OPEN:MultiplefromtheSBS\Excel\AnalyzingAlternativeDataSetsfolder.
1 Ifnecessary,clickcellA1.
2 OntheToolsmenu,clickScenarios.
TheScenarioManagerdialogboxappears.
3 ClickAdd.
TheAddScenariodialogboxappears,withA1intheChangingcellsbox.
4 IntheScenarionamebox,typeFurnitureSale.
5 IntheChangingcellsbox,clicktheCollapseDialogbutton.
TheAddScenariodialogboxcollapses,anditstitlebarchangestoAdd Scenario -
Changing Cells.
6 DeletethecontentsoftheAddScenariodialogbox,andthenholddownHwhile
youclickcellsF8,F9,F12,andF13.
$F$8,$F$9,$F$12,$F$13 appearsintheChangingcellsbox.
7 AttherightedgeoftheChangingcellsbox,clicktheExpandDialogbutton.
ExpandDialog
TheEditScenariodialogboxappears.
8 ClickOK.
TheEditScenariodialogboxdisappears,andtheScenarioValuesdialogbox
appears.
9 Inthe1:$F$8box,type5400.
10 Inthe2:$F$9box,type5850.
11 Inthe3:$F$12box,type6300.
136
AnalyzingAlternativeDataSets
8
12 Inthe4:$F$13box,type7000.
13 ClickOK.
TheScenarioValuesdialogboxdisappears,andtheScenarioManagerdialogbox
appears.
14 ClickAdd.
TheAddScenariodialogboxappears.
15 IntheScenarionamebox,typeToolSale.
16 IntheChangingcellsbox,clicktheCollapseDialogbutton.
TheAddScenariodialogboxcollapses,anditstitlebarchangestoAdd Scenario -
Changing Cells.
17 DeletethecontentsoftheAddScenariodialogbox,clickcellD7,anddragto
cellD11.
$D$7:$D$11 appearsintheChangingcellsbox.
18 AttherightedgeoftheChangingcellsbox,clicktheExpandDialogbutton.
TheEditScenariodialogboxappears.
19 ClickOK.
TheEditScenariodialogboxdisappears,andtheScenarioValuesdialogboxappears.
20 Inthe1:$D$7box,type8500.
21 Inthe2:$D$8box,type9000.
22 Inthe3:$D$9box,type12000.
23 Inthe4:$D$10box,type7500.
24 Inthe5:$D$11box,type7500.
25 ClickOK.
TheScenarioManagerdialogboxappears.
26 ClickSummary.
TheScenarioSummarydialogboxappears.
137
Microsoft
Office
Specialis
8
AnalyzingAlternativeDataSets
27 IntheResultcellsbox,clicktheCollapseDialogbutton.
TheScenarioSummarydialogboxisminimized.
28 ClickcellC14anddragtocellH15.
=$C$14:$H$15 appearsintheResultcellsbox.
29 IntheResultcellsbox,clicktheExpandDialogbutton.
TheScenarioSummarydialogboxismaximized.
30 ClickOK.
ExceladdsanewworksheetnamedScenario Summarytoyourworkbookanddis-
playsthatworksheet.
31 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Multiple.
VaryingYourDatatoGetaDesiredResult
Microsoft
Animportantaspectofrunningabusinessisknowinghoweverydepartmentand
Office
Specialistt
productisperforming,bothinabsolutetermsandinrelationtootherdepartmentsor
productsinthecompany.Justasyoumightwanttorewardyouremployeesformain-
tainingaperfectsafetyrecordandkeepingdownyourinsurancerates,youwould
alsowanttostopcarryingproductsyouareunabletosell.
Whenyouplanhowyouwanttogrowyourbusiness,youshouldhavespecificgoals
inmindforeachdepartmentorproductcategory.Forexample,CatherineTurner,the
138
AnalyzingAlternativeDataSets
8
ownerofTheGardenCompany,mighthavethegoalofincreasingthetotalrevenue
generatedfromflowersalesby10percentayear.Findingthesalesamountthatrep-
resentsthe10percentincreaseissimple,butexpressinggoalsinotherwayscan
makefindingthesolutionmorechallenging.Ratherthangrowflowersalesby10per-
centayear,Catherinemightwanttoincreasethesalessothatflowersalesrepresent
40percentofthetotalsalesforTheGardenCompany.
Asanexample,considerthefollowingworksheet,whichholdssalesfiguresforthe
fourcategoriesofproductsofferedbyTheGardenCompanyandusesthosefigures
tocalculatebothtotalsalesandtheshareeachcategoryhasofthattotal.
Important Inthisworksheet,thevaluesintheSharerowaredisplayedaspercentages,
buttheunderlyingvaluesaredecimals.Forexample,0.3064isrepresentedas30.64%.
Whileitwouldcertainlybepossibletofigurethesalestargetthatwouldmakeflower
salesrepresent40percentofthetotal,thereisaneasierwaytodoitinExcel:Goal
Seek.TouseGoalSeek,youchooseGoalSeekfromtheToolsmenutoopentheGoal
Seekdialogbox.
IntheSetcellbox,youidentifythecellwiththetargetvalue;inthiscase,thatwould
becellF4,whichhasthepercentageofsalesaccountedforbytheFlowerscategory.
TheTovalueboxhasthetargetvalue(.4,whichisequivalentto40%),andtheBy
changingcellboxidentifiesthecellwiththevalueExcelshouldchangetogenerate
thetargetvalueof40%incellF4.Inthisexample,thecelltobechangedisF3.
ClickingOKtellsExceltofindasolutionforthegoalyouset.WhenExcelfinishesits
work,thenewvaluesappearinthedesignatedcellsandtheGoalSeekStatusdialog
boxappears.
139
8
AnalyzingAlternativeDataSets
Tip GoalSeekfindstheclosestsolutionitcanwithoutexceedingthetargetvalue.In
thiscase,theclosestpercentageitcouldfindwas39.98%.
Inthisexercise,youuseGoalSeektodeterminehowmuchtotalrevenuefromtool
saleswouldberequiredtomaketheToolscategoryaccountfor25percentoftotal
salesforTheGardenCompany.
OPEN:GoalSeekfromtheSBS\Excel\AnalyzingAlternativeDataSetsfolder.
1 ClickcellC4.
2 OntheToolsmenu,clickGoalSeek.
TheGoalSeekdialogboxappearswithC4intheSetcellbox.
3 IntheTovaluebox,type.25.
Tip Youtype.25,not25,becausecellsC4:G4areformattedtoshowpercent-
ages.WiththePercentageformat,.25isdisplayedas25%.
4 IntheBychangingcellbox,typeC3.
5 ClickOK.
TheGoalSeekStatusdialogboxappears,announcingthatExcelhasfoundasolu-
tion.Thenewvaluesappearinyourworksheet.
140
Microsoft
Office
Specialis
AnalyzingAlternativeDataSets
8
6 ClickOK.
TheGoalSeekStatusdialogboxdisappears.
7 OntheStandardtoolbar,clicktheUndobutton.
Undo
Thecontentsofthecellsinyourworkbookreverttotheiroriginalvalues.
8 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:GoalSeek.
FindingOptimalSolutionswithSolver
Microsoft
GoalSeekisagreattoolforfindingouthowmuchyouneedtochangeasingleinput
Office
Specialistt
togenerateadesiredresultfromaformula,butitsofnohelpifyouwanttofindthe
bestmixofseveralinputs.Forexample,CatherineTurnermightwanttoadvertisein
fourregionalmagazinestodrivecustomerstoTheGardenCompanysWebsite,but
shemightnotknowthebestmixofadstoplaceamongthepublications.Sheasked
thepublishersforadpricingandreadershipnumbers,whicharereflectedinthe
spreadsheetshownbelow,alongwiththeminimumnumberofadsperpublication
(three)andtheminimumnumberoftimesshewouldliketheadtobeseen(100,000).
BecauseCatherineisacontributingeditortothefourthmagazine,shedoeswantto
takeoutatleastfouradsinthatpublicationdespiteitsrelativelylowreadership.The
goaloftheadcampaignisforyouradstobeseenasmanytimesaspossiblewithout
spendingmorethanyour$30,000budget.
Tip Ithelpstospellouteveryaspectofyourproblemsothatyoullbeabletoidentify
thecellsyouwantSolvertouseinitscalculations.
IfyouperformedacompleteinstallationwhenyouinstalledExcelonyoursystem,
youwillseetheSolveritemontheToolsmenu.Ifnot,youwillneedtoinstallthe
141
8
AnalyzingAlternativeDataSets
SolverAdd-In.Todoso,ontheToolsmenu,clickAdd-InstodisplaytheAdd-Insdialog
box.SelecttheSolverAdd-incheckbox,andclickOKtoinstallSolver.
Note YoumightbepromptedforyourMicrosoftOffice2003installationCD-ROM.If
youare,puttheCD-ROMinyourCD-ROMdriveandclickOK.
Aftertheinstallationiscomplete,opentheToolsmenuandclickSolvertodisplaythe
SolverParametersdialogbox.
ThefirststepinsettingupyourSolverproblemistoidentifythecellthatreflectsthe
resultsofchangingtheothercellsintheworksheet.Toidentifythatcell,clickinthe
SetTargetCellbox,clickthetargetcell,andthenselecttheoptionbuttonrepresenting
whetheryouwanttominimizethecellsvalue,maximizethecellsvalue,ormakethe
celltakeonaspecificvalue.NextyouclickintheByChangingCellsboxandselectthe
cellsSolvershouldvarytochangethevalueinthetargetcell.Finally,yousetthelimits
forthevaluesSolvercanusebyclickingAddtodisplaytheAddConstraintdialogbox.
YouaddconstraintstotheSolverproblembyselectingthecellstowhichyouwant
to applytheconstraint,selectingthecomparisonoperation(lessthanorequalto,
greaterthanorequalto,requiringthevaluetobeaninteger,andsoon)byclicking
thedownarrowinthemiddlebox,clickingintheConstraintbox,andselectingthe
cellwiththevalueoftheconstraint.YoucouldalsotypeavalueintheConstraint
box,butreferringtoacellmakesitpossibleforyoutochangetheconstraintwithout
openingSolver.
Tip AfteryourunSolver,youcanusethecontrolsintheSolverResultsdialogbox,
savetheresultsaschangestoyourworksheet,orcreateascenariobasedonthe
changeddata.
142
AnalyzingAlternativeDataSets
8
Inthisexercise,youuseSolvertodeterminethebestmixofadsgiventhefollowing
constraints:
Youwanttomaximizethenumberofpeoplewhoseetheads.
Youmustbuyatleastthreeadsinthreemagazines,andatleastfourinthe
fourth.
Youcanbuynomorethaneightadsinanyonemagazine.
Youmustreachatleast100,000people.
Youradbudgetis$30,000.
OPEN:SolverfromtheSBS\Excel\AnalyzingAlternativeDataSetsfolder.
1 OntheToolsmenu,iftheSolveritemdoesntappear,clickAdd-Ins.
TheAdd-Insdialogboxappears.
2 SelecttheSolverAdd-incheckbox,andclickOK.
Note InsertyourOffice2003CD-ROMinyourcomputersCD-ROMdriveif
promptedtodoso.
3 OntheToolsmenu,clickSolver.
TheSolverdialogboxappears.
4 ClickintheSetTargetCellbox,andthenclickcellG9.
$G$9appearsintheSetTargetCellbox.
5 SelecttheMaxoptionbutton.
6 ClickintheByChangingCellsbox,andselectcellsE5:E8.
$E$5:$E$8appearsintheByChangingCellsbox.
7 ClickAdd.
TheAddConstraintdialogboxappears.
143
8
AnalyzingAlternativeDataSets
8 ClickcellF9.
$F$9 appearsintheCellReferencebox.
9 ClickintheConstraintbox,andthenclickcellG11.
$G$11 appearsintheConstraintbox.
10 ClickAdd.
TheconstraintisaddedtotheSolverproblem,andtheAddConstraintdialogbox
clearsforthenextconstraint.
11 ClickcellG9.
$G$9appearsintheCellReferencebox.
12 Clickthedownarrowinthemiddlebox,andselect>=.
13 ClickintheConstraintbox,andthenclickcellG12.
$G$12 appearsintheConstraintbox.
14 ClickAdd.
TheconstraintisaddedtotheSolverproblem,andtheAddConstraintdialogbox
clearsforthenextconstraint.
15 SelectcellsE5:E7.
$E$5:$E$7appearsintheCellReferencebox.
16 Clickthedownarrowinthemiddlebox,andselect>=.
17 ClickintheConstraintbox,andthenclickcellG13.
$G$13 appearsintheConstraintbox.
18 ClickAdd.
TheconstraintisaddedtotheSolverproblem,andtheAddConstraintdialogbox
clearsforthenextconstraint.
19 ClickcellE8.
$E$8appearsintheCellReferencebox.
20 Clickthedownarrowinthemiddlebox,andselect>=.
21 ClickintheConstraintbox,andthenclickcellG14.
$G$14 appearsintheConstraintbox.
22 ClickAdd.
TheconstraintisaddedtotheSolverproblem,andtheAddConstraintdialogbox
clearsforthenextconstraint.
144
AnalyzingAlternativeDataSets
8
23 SelectcellsE5:E8.
$E$5:$E$8appearsintheCellReferencebox.
24 ClickintheConstraintbox,andthenclickcellG15.
$G$15 appearsintheConstraintbox.
25 ClickAdd.
TheconstraintisaddedtotheSolverproblem,andtheAddConstraintdialogbox
clearsforthenextconstraint.
26 SelectcellsE5:E8.
$E$5:$E$8appearsintheCellReferencebox.
27 Clickthedownarrowinthemiddlebox,andselectint.
28 ClickOK.
TheconstraintisaddedtotheSolverproblem,andtheAddConstraintdialogbox
disappears.
29 ClickSolve.
TheSolverResultsdialogboxappears,indicatingSolverfoundasolution.Theresult
isdisplayedinthebodyoftheworksheet.
30 ClickCancel.
TheSolverResultsdialogboxdisappears.
145
Microsoft
Office
Specialis
8
AnalyzingAlternativeDataSets
31 ClickClose.Ifyouareaskedifyouwanttosaveyourchanges,clickNo.
TheSolverdialogboxdisappears.
CLOSE:Solver.
AnalyzingDatawithDescriptiveStatistics
Microsoft
Experiencedbusinesspeoplecantellalotaboutnumbersjustbylookingatthemto
Office
Specialistt
seeiftheylookrightthatis,thesalesfiguresareaboutwheretheyresupposedto
beforaparticularhour,day,ormonth;theaverageseemsaboutright;andsaleshave
increasedfromyeartoyear.Whenyouneedmorethananoff-the-cuffassessment,
though,youcanusethetoolsintheAnalysisToolPak,anotherExcelAdd-In.
IfyouperformedacompleteinstallationwhenyouinstalledExcelonyoursystem,
youwillseetheDataAnalysisitemontheToolsmenu.Ifnot,youwillneedtoinstall
theAnalysisToolPak.Todoso,ontheToolsmenu,clickAdd-InstodisplaytheAdd-Ins
dialogbox.SelecttheAnalysisToolPakcheckbox,andclickOKtoinstalltheAnalysis
ToolPak.
Note YoumightbepromptedforyourOffice2003installationCD-ROM.Ifyouare,put
theCD-ROMinyourCD-ROMdriveandclickOK.
Aftertheinstallationiscomplete,opentheToolsmenuandclickDataAnalysistodis-
playtheDataAnalysisdialogbox.
Youthenclicktheitemrepresentingthetypeofdataanalysisyouwanttoperform,
clickOK,andusethecontrolsintheresultingdialogboxtoanalyzeyourdata.
Inthisexercise,youwillusetheAnalysisToolPaktogeneratedescriptivestatisticsof
salesdata.
OPEN:DescriptivefromtheSBS\Excel\AnalyzingAlternativeDataSetsfolder.
1 OntheToolsmenu,iftheDataAnalysisitemdoesntappear,clickAdd-Ins.
TheAdd-Insdialogboxappears.
2 SelecttheAnalysisToolPakcheckbox,andclickOK.
146
AnalyzingAlternativeDataSets
8
Collapse
Dialog
ExpandDialog
Note InsertyourOffice2003CD-ROMinyourcomputersCD-ROMdriveif
promptedtodoso.
3 OntheToolsmenu,clickDataAnalysis.
TheDataAnalysisdialogboxappears.
4 ClickDescriptiveStatistics,andclickOK.
TheDescriptiveStatisticsdialogboxappears.
5 ClicktheCollapseDialogbuttonattherightedgeoftheInputRangebox.
TheDescriptiveStatisticsdialogboxcollapses.
6 SelectcellsD38toO38.
$D$38:$O$38 appearsintheInputRangebox.
7 ClicktheExpandDialogbuttonattherightedgeoftheInputRangebox.
TheDescriptiveStatisticsdialogboxexpands.
8 SelecttheRowsoptionbutton.
9 SelecttheNewWorksheetsPlyoptionbutton.
10 SelecttheSummaryStatisticscheckbox.
11 ClickOK.
TheDescriptiveStatisticsdialogboxdisappears,andanewworksheetwithstatis-
ticsdescribingyourdataappearsinyourworkbook.
12 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Descriptive.
147
8
AnalyzingAlternativeDataSets
KeyPoints
Scenariosletyoudescribemanypotentialbusinesscaseswithinasingle
workbook.
Itsusuallyagoodideatocreateanormalscenariothatletsyouresetyour
worksheet.
Rememberthatyoucanchangeupto32cellsinascenario,butnomore.
Youcansummarizeyourscenariosonanewworksheettocomparehoweach
scenarioapproachesthedata.
UseGoalSeektodeterminewhatvalueyouneedinasinglecelltogeneratethe
desiredresultfromaformula.
Ifyouwanttovarythevaluesinmorethanonecelltofindtheoptimalmixof
inputsforacalculation,usetheSolverAdd-In.
AdvancedstatisticaltoolsareavailableintheAnalysisToolPakusethemtogo
overyourdatathoroughly.
148
Chapter 9 at a Glance
Createdynamicdata
listswithPivotTables,
page152
EditPivotTables,
page159
CreatePivotTables
fromexternaldata,
page166
150 Chapter 9 at a Glance
9
CreatingDynamicLists
withPivotTables
Inthischapteryouwilllearnto:
CreatedynamicdatalistswithPivotTables.
EditPivotTables.
CreatePivotTablesfromexternaldata.
AnimportantconsiderationwhenyoucreateyourMicrosoftExcelworksheetsishow
youwantthedatatoappearwhenyoushowittoyourcolleagues.Youcanchange
theformattingofyourdatatoemphasizethecontentsofspecificcells,sortandfilter
yourworksheetsbasedonthecontentsofspecificcolumns,orhiderowscontaining
datathatisntrelevanttothepointyouretryingtomake.
OnelimitationofthestandardExcelworksheetisthatyoucantchangehowthedata
isorganizedonthepage.Forexample,inaworksheetinwhicheachcolumnrepre-
sentsanhourintheday,eachrowrepresentsadayinamonth,andthebodyofthe
worksheetcontainsthetotalsalesforeveryhourlyperiodofthemonth,youcant
easilychangetheworksheetsothatitdisplaysonlysalesonTuesdaysduringthe
afternoon.
AnExceltoolletsyoucreateworksheetsthatcanbesorted,filtered,andrearranged
dynamicallytoemphasizedifferentaspectsofyourdata.ThattoolisthePivotTable.
Inthischapter,youlllearnhowtocreateandeditPivotTablesfromanexistingwork-
sheet,andhowtocreateaPivotTablewithdataimportedfromatextfile.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxlvixlviii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
151
Microsoft
Office
Specialis
9
CreatingDynamicListswithPivotTables
CreatingDynamicListswithPivotTables
Microsoft
Excelworksheetsletyougatherandpresentimportantdata,butthestandardwork-
Office
Specialistt
sheetcantbechangedfromitsoriginalconfigurationeasily.Asanexample,consider
theworksheetinthefollowinggraphic.
ThisworksheetrecordshourlysalesforTheGardenCompany.Thedatainthework-
sheetisorganizedsothateachrowrepresentsadayofsales,whilethecolumnsin
thebodyoftheworksheetrepresentanhourofeachday.Whenpresentedinthis
arrangement,themonthlysalestotalsforanhourlyperiod(calculatedatthebottom
oftheworksheet)andthedailysalestotals(calculatedattherightedgeofthework-
sheet)aregivenequalbilling:neithersetoftotalsstandsout.
Suchaneutralpresentationofyourdataisversatile,butithaslimitations.First,while
youcanusesortingandfilteringtorestricttherowsorcolumnsshown,itsdifficultto
changetheworksheetsorganization.Forexample,inastandardworksheetyoucant
reorganizethecontentsofyourworksheetsothatthehoursareassignedtotherows
andthedaystothecolumns.
YoucanuseanExceltooltoreorganizeandredisplayyourdatadynamically.Youcan
createaPivotTable,ordynamicworksheet,thatletsyoureorganizeandfilteryour
dataonthefly.Forinstance,youcancreateaPivotTablewiththesamelayoutasthe
worksheetshownaboveandthenchangethePivotTablelayouttohavetherowsrep-
resentthemonth,week,anddayandthecolumnsrepresenthoursinaday,asshown
inthefollowinggraphic.
152
CreatingDynamicListswithPivotTables
9
TocreateaPivotTable,youmusthaveyourdatacollectedinalistinwhicheveryrow
representsacellinthebodyofthefinishedPivotTable.Thefollowinggraphicshows
thefirstfewlinesofthelistusedtocreatethePivotTablejustshown.
NoticethateverylineofthelistholdstheMonth,Week,Weekday,Day,Hour,and
Salesforeveryhourinthemonth.ExcelneedsthatdatawhenitcreatesthePivotTable
sothatitcanmaintainrelationshipsamongthedata.IfyouwanttofilteryourPivot-
Tablesothatitshowsallsalesfrom5:00p.m.to8:00p.m.onThursdaysinJanuary,
ExcelmustbeabletoidentifyJanuary11asaThursdayandfindtheentriesinthelist
representingsalesforthehoursbeginningat5:00p.m.,6:00p.m.,and7:00p.m.
Onceyouhavecreatedalist,youcanclickanycellinthatlist,opentheData
menu,andclickPivotTableandPivotChartReporttolaunchthePivotTableand
PivotChartWizard.
153
9
CreatingDynamicListswithPivotTables
Collapse
Dialog
Onthiswizardpage,youidentifythedatasourceforyourPivotTableandwhether
youwanttocreateaPivotTablebyitselforaPivotTableandaPivotChart.Clicking
Nextacceptsthedefaultchoicesandmovesyoutothesecondwizardscreen.
Onthisscreen,youverifythatthewizardhascorrectlyidentifiedthecellswiththe
dataforyourPivotTable.Ifnot,youcanclicktheCollapseDialogbuttonintheRange
box,selectthecellsthatcontainyourdata,andthenexpandthedialogboxtocon-
tinue.OncethepropercellrangeislistedintheRangebox,clickNexttomovetothe
finalwizardscreen.
ThiswizardscreenaskswhetheryouwanttocreateyourPivotTableinaneworan
existingworksheet.BecausethedatalistsusedtocreatePivotTablesareusuallyquite
long,itisoftenbesttocreatethePivotTableinanewworksheet.ClickingFinish
154
CreatingDynamicListswithPivotTables
9
closesthewizard;createsanewworksheetinyourworkbook;andaddsaPivotTable,
thePivotTabletoolbar,andthePivotTableFieldListdialogboxtothatworksheet.
Toassignafield,orcolumninadatalist,toanareaofthePivotTable,youdragthe
fieldheadtothedesiredareaonthePivotTableoutline.Forexample,youcandrag
theWeekfieldheadtotheDropRowFieldsHerebox,dragtheDayfieldheadtothe
DropRowFieldsHerebox,dragtheHourfieldheadtotheDropColumnFieldsHere
box,andthendragtheSalesfieldheadtotheDropDataItemsHereboxtopopulate
thebodyofthePivotTablewithdata.AfteryoudropafieldheadintheDropData
ItemsHerebox,thePivotTablefillswithdata.
155
9
CreatingDynamicListswithPivotTables
CurrencyStyle
Tip YoucanalsomoveafieldheadtoanareaofthePivotTablebyclickingthefield
head,clickingtheAddTodownarrowinthePivotTableFieldListdialogbox,clickingthe
areatowhichyouwanttomovethefield,andthenclickingtheAddTobuttoninthePivot
TableFieldListdialogbox.
Notethattheorderinwhichyouenterthefieldsintherowandcolumnareasaffects
howthedatainthePivotTableisgrouped.Intheprecedingexample,therowsshowall
ofthedaysinthefirstweekbeforeshowingallofthedaysinthesecondweek,while
thecolumnsshowallofthehoursinabusinessdayatTheGardenCompany.Youcan
changehowthedatainthePivotTableisgroupedbymovingtheHourfieldheadtothe
leftoftheWeekfieldheadintheDropRowFieldsHerebox.DoingsowouldcauseExcel
togroupthedatainthePivotTableasshowninthefollowinggraphic.
Tip TheDropPageFieldsHereboxisusedtofilterthecontentsoftheworksheet
basedonthevaluesinacolumnfromtheoriginaldatalist.YoullworkwiththePagearea
inthenextsectionofthischapter.
OnceyouhavecreatedaPivotTable,youcanchangetheformattingofitscellsasin
anyotherExcelworksheet.BecausethedatainthesamplePivotTableissalesdata,
youcanapplytheCurrencystyletothosecellsbyselectingthemandthenclicking
theCurrencyStylebuttonontheFormattingtoolbar.Youcanalsodistinguishcells
withheadings,subtotals,andtotalsbyformattingthecontentsofthosecellsinbold
type,italics,oralargertypesize.
AlthoughyoucanapplyyourownformatstoaPivotTable,Excelcomeswithasetof
AutoFormats,orpredefinedformatsthatyoucanapplytoyourPivotTable.Toview
theAutoFormatsavailableinExcelandapplyonetoyourPivotTable,clickanycellin
thePivotTable,andthen,onthePivotTabletoolbar,clicktheFormatReportbuttonto
displaytheAutoFormatdialogbox.
156
CreatingDynamicListswithPivotTables
9
ToassignanAutoFormattoaPivotTable,picktheAutoFormatyoulikethebestfrom
thelistintheAutoFormatdialogbox,andthenclickOK.
Tip ToreturnaPivotTabletoitsdefaultformatting,choosethePivotTableClassicAuto-
Format,whichcanbefoundatthebottomofthelistintheAutoFormatdialogbox.
Inthisexercise,youcreateaPivotTableinanewworksheet,arrangeitsdata,formatthe
cellsinthebodyofthePivotTable,andthenapplyanAutoFormattothePivotTable.
OPEN:CreatePivotfromtheSBS\Excel\PivotTable folder.
1 ClickcellA1,andthen,ontheDatamenu,clickPivotTableandPivotChartReport.
ThePivotTableandPivotChartWizardappearswiththeMicrosoftExcellistordata-
baseoptionbuttonselectedinthetoppane,identifyingyourworksheetasthedata
source,andthePivotTableoptionbuttonselectedinthebottompane,indicating
thatyouwanttocreateaPivotTableonly.
2 ClickNexttomovetothenextpageofthewizard.
Thenextpageofthewizardappears,withtherange$A$1:$F$169inthe
Rangebox.
3 ClickNexttomovetothenextpageofthewizard.
Thefinalpageofthewizardappears,withtheNewworksheetoptionbutton
selected,whichtellsthewizardtocreateanewworksheettoholdthePivotTable.
4 ClickFinish.
Thewizardcloses,andthePivotTabletoolbar,thePivotTableFieldListdialogbox,
andyournewPivotTableappearinanewworksheet.
5 FromthePivotTableFieldListdialogbox,dragMonthtotheDropRowFields
Herebox.
Month appearsintheDropRowFieldsHerebox.
6 FromthePivotTableFieldListdialogbox,dragWeektotherightedgeoftheDrop
RowFieldsHerebox.
Tip AlargegrayinsertionpointwillappeartotherightoftheMonthfieldhead
whenthemousepointerisinthecorrectposition.
WeekappearstotherightofMonthintheDropRowFieldsHerebox.
7 FromthePivotTableFieldListdialogbox,dragDaytotheDropRowFieldsHerebox
anddropittotherightoftheWeekfieldhead.
ThePivotTableisupdatedtoreflecttheaddedfield.
157
9
CreatingDynamicListswithPivotTables
HideFieldList
FormatReport
8 FromthePivotTableFieldListdialogbox,dragHourtotheDropColumnFields
Herebox.
ThePivotTableisupdatedtoreflecttheaddedfield.
9 FromthePivotTableFieldListdialogbox,dragSalestotheDropDataItems
Herebox.
ThePivotTableisupdatedtoreflecttheaddedfield.
10 OnthePivotTabletoolbar,clicktheHideFieldListbuttontohidethePivotTableField
Listdialogbox.
11 OnthePivotTabletoolbar,clicktheFormatReportbutton.
TheAutoFormatdialogboxappears.
12 ScrolldownandclicktheTable1format,andthenclickOK.
ExcelappliestheAutoFormattoyourPivotTable.
13 SelectcellsintherangeD5:P22,andthen,ontheFormattingtoolbar,clickthe
CurrencyStylebutton.
ExcelappliestheCurrencystyletotheselectedcells.
158
Microsoft
Office
Specialis
CreatingDynamicListswithPivotTables
9
14 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:CreatePivot.
EditingPivotTables
Microsoft
AfteryouhavecreatedaPivotTable,youcaneditittocontrolhowyourdataisdis-
Office
Specialistt
played.Asanexample,considerthefollowingPivotTable.
Inthisexample,twofieldsrequireediting:MonthandWeekday.Becauseallofthe
datainthelistusedtocreatethePivotTableisfromthemonthofJanuary,noinfor-
mationisimpartedbyincludingtheMonthfield.TheunusedWeekdayfield,however,
canbeusedtolimitthedatashowninthebodyofthePivotTabletosalesoccurring
ononeweekday,suchasWednesday.
159
9
CreatingDynamicListswithPivotTables
Tip FieldsusedinthePivotTableappearboldinthePivotTableFieldListdialogbox,
whilefieldsnotusedinthePivotTableappearinnormaltype.
ShowFieldList
ToopenaPivotTableforediting,youclickanycellinthePivotTableandthen,ifnec-
essary,displaythefieldsavailableforthePivotTablebyclickingtheShowFieldList
buttononthePivotTabletoolbar.
WhilethePivotTableFieldListdialogboxisopen,youcandraganyfieldnamefrom
thedialogboxtotheactivePivotTable.DraggingafieldnametotheDropPageFields
HereboxdoesntchangehowthedatainyourPivotTableisarranged,butitdoeslet
youfilteryourPivotTablebasedonthecontentsofthefield.Asanexample,consider
thefollowinggraphic,inwhichtheWeekdayfieldhasbeenaddedtotheDropPage
FieldsHereboxanditsdownarrowclicked.
Clickingafieldheadsdownarrowdisplaysalistofvaluesinthefield(inthiscase,
thedaysoftheweek).ClickinganyofthesevaluesandthenclickingOKlimitsthe
datashowninthePivotTabletodatagatheredontheselectedweekday.
ToremoveafilterfromaPivotTable,clickthedownarrowofthefieldheadusedto
filterthePivotTable,click(All),andthenclickOK.
YoucanfilteraPivotTablebasedonthecontentsoffieldsineithertheDropRow
FieldsHereortheDropColumnFieldsHereboxaswell.Todoso,clickthedown
arrowofthefieldheadholdingthevalueswithwhichyouwanttofilterthePivot-
Table,andthenclearthecheckboxnexttoanyvalueyoudontwantdisplayed.To
limitthehoursshowntotherangeof9:00a.m.to11:00a.m.,forexample,youwould
clicktheHourdownarrowandthenclearthecheckboxesnexttoeveryentryinthe
listexcept9,10,and11.
AnotherwaytomodifythecontentsofyourPivotTableistopivotthetablebychang-
ingthearrangementoffieldheadswhilethePivotTableisopen.TopivotaPivot-
Table,youdragafieldheadtoanewpositioninthePivotTable.Forexample,inthe
followinggraphic,thePivotTablerowsaregroupedbyweekandthenbyday,while
thecolumnsaregroupedbyhour.
160
CreatingDynamicListswithPivotTables
9
TopivotthePivotTable,dragtheHourfieldheadtotherightoftheDayfieldheadin
theDropRowFieldsHerebox.Whenyoureleasethemousebutton,Excelupdatesthe
PivotTabletoreflecttheneworganization.Youcanalsodragfieldheadsfromthe
DropRowFieldsHereboxtotheDropColumnFieldsHerebox,andviceversa,toreor-
ganizeyourdata.
Tip Whenyoudragafieldnameoveranareawherethefieldcanbedropped,alarge
grayinsertionpointwillappearinthePivotTable,indicatingwherethefieldnameyouare
draggingwillbedroppedwhenyoureleasethemousebutton.
IfyouhavetroubledroppingfieldnamesattherightplaceinyourPivotTable,you
canusetheLayoutscreenofthePivotTableandPivotChartWizardtohelpyou.Toopen
theLayoutscreen,clickanycellinthePivotTableandthen,onthePivotTabletoolbar,
clickPivotTableandthenclickPivotTableWizardtodisplaythefinalpageofthePivot-
TableandPivotChartWizard.
161
9
CreatingDynamicListswithPivotTables
Refresh
ExternalData
Inthisscreen,clicktheLayoutbuttontodisplayaslightlyfriendlierversionofthe
PivotTabletemplate.
OneniceaspectofPivotTablesisthatyoucanupdatethemtoreflectanychangesin
thedatalistusedtocreatethem.Forexample,thegeneralmanagerofTheGarden
Companymighthavereceivedalargephoneorderfromaclientand,ratherthan
routingitthroughacashregisterattheretailstore,insteadaddedthetotaltothe
companysbooksdirectly.UpdatingthePivotTablesdatalisttoreflectthesalewill
changethevaluesinthePivotTable,butyoudontneedtore-createthePivotTableto
accountforthechange.Instead,youcanclickanycellinthePivotTableandthen,on
thePivotTabletoolbar,clicktheRefreshExternalDatabuttontohaveExcelreexamine
thedatalistandupdatethePivotTable.
AnotherwaytomanipulatethecontentsofaPivotTableistoshoworhideitsdetail
rows.Forexample,thePivotTableinthefollowinggraphicdisplaysitsrowsorga-
nizedbymonth,thenbyweek,andthenbyday.
162
CreatingDynamicListswithPivotTables
9
Double-clickingcellA5,whichholdstheJanuaryvaluefortheMonthfield,hidesthe
detailofallsalesinJanuary,leavingonlytheTotalrowforthemonth.
ToshowthedetailrowsforthemonthofJanuary,double-clickcellA5again.
InversionspriortoExcel2002,youcouldntcreatealinktoacellinaPivotTable.
Nowyouareabletocreatealinkfromacellinanotherworkbooktoacellinyour
PivotTable.Tocreatealink,youclickthecellyouwanttolinktoyourPivotTable,
typeanequalsign,andthenclickthecellinthePivotTablewiththedatayouwant
linked.WhenyouclickthePivotTablecell,aGETPIVOTDATAformulaappearsinthe
formulabaroftheworksheetwiththePivotTable.WhenyoupressF,thecontents
ofthePivotTablecellwillappearinthelinkedcell.
Inthisexercise,youaddafieldtoaPivotTable,filterthecontentsofaPivotTable,
changeaPivotTableslayout,refreshPivotTabledata,showandhidePivotTable
detail,andcreatealinktoaPivotTablefield.
163
9
CreatingDynamicListswithPivotTables
OPEN:EditPivotfromtheSBS\Excel\PivotTablefolder.
1 Ifnecessary,clickthePivotTablesheettabonthetabbartodisplaythePivotTable
worksheet.
2 Ifnecessary,right-clicktheStandardtoolbar,andthen,fromtheshortcutmenuthat
appears,clickPivotTabletoshowthePivotTabletoolbar.
3 ClickanycellinthePivotTable,andthen,onthePivotTabletoolbar,clicktheShow
FieldListbutton.
ThePivotTableFieldListdialogboxappears.
4 FromthePivotTableFieldListdialogbox,dragtheWeekdayfieldtotheDropPage
FieldsHerebox.
TheWeekdayfieldheadappearsintheDropPageFieldsHerebox.
5 OnthePivotTabletoolbar,clicktheHideFieldListbutton.
HideFieldList
ThePivotTableFieldListdialogboxdisappears.
6 DragthePivotTabletoolbartothetopoftheworkbookwindow.
ThePivotTabletoolbardocksbelowtheStandardtoolbar.
7 ClicktheWeekdaydownarrow,clickMon,andthenclickOK.
ExcelfiltersthePivotTablesothatonlydatarepresentingsalesonMondays
appearsinthePivotTable.
8 ClicktheWeekdaydownarrow,click(All),andthenclickOK.
ThePivotTabledisplaysdatafromallweekdays.
164
CreatingDynamicListswithPivotTables
9
9 ClicktheWeekdownarrow,andclearthecheckboxesnextto3,4,and5.ClickOK
toapplythefilter.
ExcelfiltersthePivotTablesothatonlydatarepresentingsalesduringthefirsttwo
weeksofamonthappearsinthePivotTable.
10 ClicktheWeekdownarrow,andselectthe(ShowAll)checkbox.ClickOKtoapply
thefilter.
ThePivotTabledisplaysdatafromallweeks.
11 OnthePivotTabletoolbar,clickPivotTableandthenclickPivotTableWizard.
ThePivotTableandPivotChartWizardappears.
12 ClickLayout.
TheLayoutpageofthePivotTableandPivotChartWizardappears.
13 DragHourfromtheColumnboxtothePagebox.
14 DragWeekdayfromthePageboxtotheColumnbox,andclickOK.
TheLayoutpagedisappears.
15 ClickFinish.
YourPivotTablechangestoreflectthenewlayout.
16 DragtheHourfieldheadtotheDropColumnFieldsHerebox.
YourPivotTablechangesinresponsetothepivot.
17 DragtheWeekdayfieldheadtotheDropPageFieldsHerebox,positionedinrow1.
YourPivotTablechangesinresponsetothepivot.
165
Microsoft
Office
Specialis
9
CreatingDynamicListswithPivotTables
18 Onthetabbar,clicktheAllDatasheettabtodisplaytheAllDataworksheet.
19 ClickcellF5,type2850,andthenpressF.
20 Onthetabbar,clickthePivotTablesheettabtodisplaythePivotTableworksheet.
21 OnthePivotTabletoolbar,clicktheRefreshExternalDatabutton.
ExcelupdatesthedatainyourPivotTabletoreflectthechangeinthesourcedatalist.
22 Double-clickcellA5.
ThedetailrowsoftheJanuarysectionofthePivotTablearehidden,leavingonlythe
JanuaryTotaldatadisplayed.
23 Double-clickcellA5again.
ThedetailrowsoftheJanuarysectionofthePivotTableareunhidden.
24 Onthetabbar,clicktheLinksheettabtomovetotheLinkworksheet.
25 ClickcellC5,type=,andthen,onthetabbar,clickthePivotTablesheettab.
ThePivotTableworksheetappears.
26 ClickcellP115.
=GETPIVOTDATA("Sales",PivotTable!$A$3)appearsintheformulabar.
27 PressF.
ExcelswitchesbacktotheLinkworksheet,and$330,896.00,thevalueinthecell
linkedto,appearsincellC5.
Tip CellC5hadtheCurrencystyleappliedtoitwhentheworksheetwascreated.
IfcellC5wereformattedwiththeGeneralstyle,thevaluewouldbedisplayedas
330896.
28 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:EditPivot.
CreatingPivotTablesfromExternalData
Microsoft
WhilemostofthetimeyouwillcreatePivotTablesfromdatastoredinExcelwork-
Office
Specialistt
sheets,youcanalsobringdatafromoutsidesourcesintoExcel.Forexample,you
mightneedtoworkwithdatacreatedinanotherspreadsheetprogramwithafilefor-
matthatExcelcantreaddirectly.Fortunately,youcantransferworksheetsfromone
programtoanotherbyexportingthedatafromtheoriginalprogramintoatextfile,
whichExcelthentranslatesintoaworksheet.
Spreadsheetprogramsstoredataincells,sothegoalofrepresentingspreadsheetdata
inatextfileistoindicatewherethecontentsofonecellendandthoseofthenext
166
CreatingDynamicListswithPivotTables
9
cellbegin.Thecharacterthatmarkstheendofacellisadelimiter,inthatitmarksthe
end(orlimit)ofacell.Themostcommoncelldelimiteristhecomma,sothedelim-
itedsequence15, 18, 24, 28wouldrepresentdatainfourcells.Theproblemwith
usingcommastodelimitfinancialdataisthatlargervalues,suchas52,802,canbe
writtenwithcommasasthousandsmarkers.Toavoidconfusionwhenimportinga
textfile,themostcommonlyuseddelimiterforfinancialdataistheTabcharacter.
Toimportdatafromatextfile,youopentheDatamenu,pointtoImportExternal
Data,andthenclickImportDatatoopentheSelectDataSourcedialogbox.
FromwithintheSelectDataSourcedialogbox,younavigatetothedirectorywiththe
textfileyouwanttoimport.Double-clickingthefilelaunchestheTextImportWizard.
ThefirstpageoftheTextImportWizardletsyouindicatewhetherthedatafileyouare
importingisdelimitedorfixed-width;fixed-widthmeansthateachcellvaluewillfall
withinaspecificpositioninthefile.ClickingNexttoacceptthedefaultchoice,
167
9
CreatingDynamicListswithPivotTables
Delimited(whichExcelassignsafterexaminingthedatasourceyouselected),
advancesyoutothenextwizardscreen.
Thisscreenletsyouchoosethedelimiterforthefile(inthiscase,Exceldetectedtabs
inthefileandselectedtheTabcheckboxforyou)andgivesyouapreviewofwhat
thetextfilewilllooklikewhenimported.ClickingNextadvancesyoutothefinalwiz-
ardscreen.
Thisscreenletsyouchangethedatatypeandformattingofthecolumnsinyourdata
list.BecauseyouwillassignformatsandAutoFormatsafteryoucreatethePivotTable
fromthedata,youcanclickFinishtoimportthedataintoyourworksheet.Oncethe
dataisinExcel,youcanworkwithitnormally.
Inthisexercise,youimportadatalistintoExcelfromatextfileandthencreatea
PivotTablebasedonthatlist.
168
CreatingDynamicListswithPivotTables
9
OPEN:ExternalfromtheSBS\Excel\PivotTablefolder.
1 OntheDatamenu,pointtoImportExternalDataandthenclickImportData.
TheSelectDataSourcedialogboxappears.
2 NavigatetothePivotTabledirectory,anddouble-clickExport.txt.
TheTextImportWizardappears,withtheDelimitedoptionbuttonselected,1inthe
Startimportatrowbox,andapreviewofthefilescontentsinthePreviewbox.
3 ClickNext.
ThesecondpageoftheTextImportWizardappears.IntheDelimiterspane,theTab
checkboxisselected.Apreviewofyourdataasitwillappearwhenimportedisvis-
ibleintheDataPreviewbox.
4 ClickNext.
ThenextscreenoftheTextImportWizardappears.Thedatatypeforeachcolumn
issettoGeneral.
5 ClickFinishtoacceptthevaluesanddatatypesasassignedbythewizard.
TheImportDatadialogboxappearswiththeExistingworksheetoptionbutton
selectedand=$A$1intheExistingworksheetbox.
6 ClickOKtopastetheimporteddataintotheactiveworksheet,beginningatcellA1.
Thedataappearsinyourworkbook,andtheExternalDatatoolbarappears.
7 ClicktheClosebuttontohidetheExternalDatatoolbar.
Close
8 ClickcellA1,andthen,ontheDatamenu,clickPivotTableandPivotChartReport.
ThePivotTableandPivotChartWizardappearswiththeMicrosoftExcellistordata-
baseoptionbuttonselectedinthetoppane,identifyingyourworksheetasthedata
source,andthePivotTableoptionbuttonselectedinthebottompane,indicating
thatyouwanttocreateaPivotTableonly.
9 ClickNexttomovetothenextpageofthewizard.
Thenextpageofthewizardappears,withtherange$A$1:$F$169intheRangebox.
169
9
CreatingDynamicListswithPivotTables
10 ClickNexttomovetothenextpageofthewizard.
ThefinalpageofthePivotTableandPivotChartWizardappears,withtheNewwork-
sheetoptionbuttonselected,whichtellsthewizardtocreateanewworksheetto
holdthePivotTable.
11 ClickFinish.
Thewizardcloses,andthePivotTabletoolbar,thePivotTableFieldListdialogbox,
andyournewPivotTableappearinanewworksheet.
12 FromthePivotTableFieldListdialogbox,dragWeektotheDropRowFieldsHerebox.
Week appearsintheDropRowFieldsHerebox.
13 FromthePivotTableFieldListdialogbox,dragDaytotheDropRowFieldsHerebox
anddropittotherightoftheWeekfieldhead.
Tip AlargegrayinsertionpointwillappeartotherightoftheWeekfieldhead
whenthemousepointerisinthecorrectposition.
ThePivotTableisupdatedtoreflecttheaddedfield.
14 FromthePivotTableFieldListdialogbox,dragHourtotheDropColumnFields
Herebox.
ThePivotTableisupdatedtoreflecttheaddedfield.
15 FromthePivotTableFieldListdialogbox,dragSalestotheDropDataItemsHerebox.
ThePivotTableisupdatedtoreflecttheaddedfield.
16 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:External.
170
CreatingDynamicListswithPivotTables
9
KeyPoints
APivotTableisaversatiletoolyoucanusetorearrangeyourdatadynamically,
lettingyouemphasizedifferentaspectsofyourdatawithoutcreatingnew
worksheets.
PivotTabledatamustbeformattedasalist.
ThereareseveralAutoFormatsavailableforPivotTables;youllprobablyfind
oneyoulike.
ThePivotTablewizardwalksyouthroughthecreationprocess,butbesureyou
addthefieldthatwillprovidethedataforthebodyofyourPivotTablelast.
Justasyoucanlimitthedatashowninastaticworksheet,youcanusefiltersto
limitthedatashowninaPivotTable.
Ifyouhavedatainacompatibleformat,suchasatextfile,youcanimportthat
dataintoExcelandcreateaPivotTablefromit.
171
Chapter 10 at a Glance
Createadynamicchart
usingPivotCharts,
page185
Performtrendlineanalysis,
page183
Createandformatdiagrams,
page190
Createandcustomizeachart,
page180
172 Chapter 10 at a Glance
10
CreatingCharts
Inthischapteryouwilllearnto:
Createandcustomizeachart.
Performtrendlineanalysis.
CreateadynamicchartusingPivotCharts.
Creatediagramstoillustraterelationshipsandprocesses.
WhenyouenterdataintoaMicrosoftExcelworksheet,youcreatearecordofimpor-
tantevents,whethertheyareindividualsales,salesforanhourofaday,ortheprice
ofaproduct.Whatalistofvaluesincellscantcommunicateeasily,however,arethe
overalltrendsinthedata.Thebestwaytocommunicatetrendsinalargecollectionof
dataisthroughchartsandgraphs,whichsummarizedatavisually.
Youhaveagreatdealofcontroloveryourchartsappearanceyoucanchangethe
colorofanychartelement,modifyachartstypetobettersummarizetheunderlying
data,andchangethedisplaypropertiesoftextandnumbersinachart.Ifthedatain
theworksheetusedtocreateachartrepresentsaprogressionthroughtime,suchas
salesoveranumberofmonths,youcanhaveExcelextrapolatefuturesalesandadd
atrend linetothegraphrepresentingthatprediction.
JustasyoucancreatePivotTablestoreorganizeadatalistdynamically,youcancre-
ateaPivotChartthatreflectsthecontentsandorganizationoftheassociatedPivot-
Table.Youcanalsocreatediagrams,suchasorganizationalcharts,thatareusefulin
manyorganizations.
Inthischapter,youlllearnhowtocreateachartandcustomizeitselements,find
trendsinyouroveralldata,createdynamiccharts,andcreateandformatdiagrams.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesxlviiili.
Important Beforeyoucanusethepracticefilesinthischapter,besureyou
installthemfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsing
theBooksCD-ROMonpagexiformoreinformation.
173
Microsoft
Office
Specialis
10
CreatingCharts
CreatingaChart
TopresentyourExceldatagraphically,youselectthecellsyouwanttorepresent
graphicallyandthenclicktheChartWizardbuttonontheStandardtoolbartolaunch
ChartWizard
theChartWizard.
Microsoft
OnthefirstpageoftheChartWizard,youchoosethetypeandsubtypeofchartyou
Office
Specialistt
wanttocreate.Whenyouclickacharttype,thesubtypesforthattypeappearinthe
Chartsub-typesection,andthedefaultsubtypeisselected,withadescriptionofit
appearinginthedescriptionbox.Youcangobeyondthosedescriptionsandgeta
previewofhowyourdatawouldappearinaspecificchartsubtypebyselectingthe
subtypeandusingthePressandHoldtoViewSamplebutton.Whenyouveselected
thetypeandsubtypeforyourchart,clickNexttomovetothenextwizardpage.
174
CreatingCharts
10
Onthiswizardpage,youensurethattheDatarangeboxhasthereferenceforthe
cellstobeusedtocreatethechart,andyoutellthewizardwhetherthedatatobe
usedtocreatethechartisarrangedincolumnsorrows.
Tip Exceldoesagoodjobofguessingwhetherthecellsarearrangedincolumnsor
rows,butyoushouldcheckthepreviewofthechartthatappearsinthewizardandselect
theotheroptionbuttonifnecessary.
Onceyouhaveensuredthatthecorrectcellsandtheirarrangementhavebeen
selected,youcanclicktheSeriestabtonamethedataseries,orsetofvaluesusedto
definethecontentsofthechart.
Thecellrangeusedtocreatethischarthasthedatalabelsincluded,sothecorrect
labelsappearinthewizard.Youshouldverifythattheserieslabelsandrangesare
indeedcorrectandthenclickNext.
175
10
CreatingCharts
Thiswizardpageletsyousettheappearanceofyourchart,suchasbyaddingachart
titleandlabelsforboththehorizontal(X)andvertical(Y)axes.Afteryoutypealabel
oratitleinabox,thepreviewofthechartwillchangetoreflectthataddition.The
othertabpagesavailableonthiswizardscreenletyouchangetheappearanceofthe
chart,suchasbyaddinggridlinestoreflectchangesinvalue,changingthepositionof
orhidingthelegend,orlabelingthecolumnsorpointsonyourchart.Whenyoure
satisfiedwiththechartsappearance,clickNexttomovetothefinalChartWizardpage.
Onthiswizardpage,youcanchoosetocreateyourchartonanewpagebyselecting
theAsnewsheetoptionbuttonoraspartofanexistingworksheet.Thenameofthe
worksheetwiththedatausedtocreatethechartappearsintheAsobjectinbox,but
youcanchooseanotherworksheetbyclickingthedownarrowattherightedgeof
theAsobjectinboxandclickingthenameofanotherworksheetfromthelistthat
appears.Ifyouplantousethechartasanindependentexhibit,orifyouareprinting
theentirecontentsoftheworksheetonasinglepageandthechartwouldobscure
theunderlyingdata,youcancreatethechartinanewworksheet.Ifyouwantthe
charttobeassociatedwithitsdatawheneveryouoryourcolleaguesopenthework-
sheetwiththedata,orifyouwanttogroupallchartsyoucreateinasinglework-
sheet,youshouldcreatethechartinanexistingworksheet.WhenyouclickFinish,
thechartappearsintheselectedworksheet.
AswithmostotherobjectsinanExcelworksheet,youcancustomizethecharts
appearance.Forexample,youcanresizethechartbydraggingoneofthesizinghan-
dlesattheedgesofthechart.Youcanalsochangethechartsfilleffect,orback-
ground,byopeningtheFormatChartAreadialogbox.Toopenthatdialogbox,you
right-clickthechartsChartArea(wherethebodyofthechartappears)andthen
chooseFormatChartAreafromtheshortcutmenuthatappears.
Youcanchangethechartsbackgroundcolorbyclickinganyofthecolorsquareson
thepaletteintheAreasectionofthedialogbox.Tochangethechartsfilleffect,click
theFillEffectsbutton.
176
CreatingCharts
10
YoucanusethecontrolsintheFillEffectsdialogboxtochoosethecolorscheme,tex-
ture,pattern,orpicturetoserveasthebackgroundfortheactivechart.
Inthisexercise,youcreateachartusingtheChartWizard,resizethechart,customize
thechartsappearance,andthenchangethechartsfilleffect.
OPEN:CreateChartfromtheSBS\Excel\Chartsfolder.
1 SelectcellsC1:G13,andthen,ontheStandardtoolbar,clicktheChartWizard
button.
TheChartWizardappears.
2 Ifnecessary,intheCharttypelist,clickColumnandthen,intheChartsub-typesec-
tion,clickthefirstsubtype.
3 ClickNexttomovetothenextwizardpage.
Thenextwizardpageappears.
4 Ifnecessary,selecttheSeriestab.VerifythattheCategory(X)axislabelsboxspec-
ifiesthemonthsoftheyear(=ByCategory!$C$2:$C$13)andthatthefourseriesare
namedTools,Supplies,Furniture,andPlants.
5 ClickNext.
Thenextwizardpageappears.
6 IntheCharttitlebox,typeMonthlySalesbyCategoryandthenpressD.
Thechartpreviewisupdatedtoreflectthenewcharttitle.
7 IntheCategory(X)axisbox,typeMonthandthenpressD.
ThechartpreviewisupdatedtoreflectthevalueintheCategory(X)axisbox.
8 IntheValue(Y)axisbox,typeSalesandthenclickNext.
Thenextwizardpageappears.
9 ClickFinishtoacceptthedefaultchoicetocreatethechartaspartofthe
ByCategoryworksheet.
ThechartandtheCharttoolbarappearintheByCategoryworksheet.
177
10
CreatingCharts
Note Noticethatthecellswiththechartdataareoutlinedinblue,thecellswith
theseriesnamesareoutlinedingreen,andthecellswiththecategoriesareout-
linedinpurple.
10 DragthechartuntilitcoversapproximatelycellsC17:G30.
11 Grabthesizinghandleatthelowerrightcornerofthechart,anddragittothelower
rightcornerofcellH33.
Thechartbecomeslarger,givingyoumoreroomtoaddotherinformationin
thechart.
12 Right-clickanywhereintheChartAreaofthechart,andthen,fromtheshortcut
menuthatappears,clickFormatChartArea.
TheFormatChartAreadialogboxappears.
178
CreatingCharts
10
13 IntheBordersectionofthedialogbox,selecttheCustomoptionbutton.
14 ClicktheWeightdownarrow,andthen,fromthelistthatappears,clicktheitemat
thebottomofthelist.
15 SelecttheShadowcheckbox.
16 IntheAreasection,clicktheFillEffectsbutton.
TheFillEffectsdialogboxappears.
17 ClicktheTexturetabtodisplaytheTexturetabpage.
18 ClickthetextureintheupperleftcorneroftheTexturesection.
Newsprintappearsinthetextboxbelowthesamples,andapreviewoftheNews-
printtextureappearsintheSamplepane,inthelowerrightcornerofthedialogbox.
19 ClickOK.
TheFormatChartAreadialogboxreappears.
20 ClickOK.
TheFormatChartAreadialogboxdisappears,andthecharttakesonthecharacter-
isticsyouappliedtoit.
179
Microsoft
Office
Specialis
10
CreatingCharts
21 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:CreateChart.
CustomizingChartLabelsandNumbers
Microsoft
Afteryoucreateachart,youcancustomizeitselementstoconformtoaparticular
Office
Specialistt
colorscheme,filleffect,orborderpattern.Youcanalsochangetheappearanceof
thelabelsandnumbersinyourchart.
Tochangethedisplaycharacteristicsofachartlabel,double-clickthelabeltoopena
formattingdialogbox.Youcanusethecontrolsinthedialogboxtoformatthelabel.
Tip Ifyouwanttochangethetextofalabel,clickthelabeltoactivateitandthenclick
intheboxthatappearsaroundthelabel.Whenyouredoneeditingthetext,clickoutside
theboxaroundthelabel.
180
CreatingCharts
10
Youcanalsochangethedisplaycharacteristicsoftheformatusedtodisplaynumeric
valuesinyourcharts.Forexample,thesalesvaluesontheverticalaxisofthechartin
thefollowinggraphicareformattedwiththeAccountingformat.
ThedefaultsettingfortheAccountingformathasathousandsseparator,acurrency
symbol,andtwodigitstotherightofthedecimalpoint.Inthechartabove,theverti-
calaxismeasuressalesin$5,000increments,sothedigitstotherightofthedecimal
pointaresuperfluous.Youcanchangetheformatofthenumbersdisplayedonthe
verticalaxisbydouble-clickingtheaxisandthenclickingtheNumbertabinthedia-
logboxthatappears.
Tochangethenumberofdigitstotherightofthedecimalpoint,typethenewnum-
berintheDecimalplacesbox.WhenyouclickOK,thechartwillchangetoreflect
yourchoice.
Inthisexercise,youcreatealinegraph,changetheformattingofthecharttitle,and
thenchangethedisplaycharacteristicsofthenumbersonthechartsverticalaxis.
OPEN:CustomizefromtheSBS\Excel\Chartsfolder.
1 SelectthecellsintherangeC1:G13,andthen,ontheStandardtoolbar,clickthe
ChartWizardbutton.
ChartWizard
TheCharttypepageoftheChartWizardappears.
2 IntheCharttypelist,clickLineandthenclickNext.
ThenextChartWizardpageappears.
3 ClickNexttomovetothenextwizardpage.
4 IntheCharttitlebox,typeSalesbyMonthandthenpressD.
Sales by Monthappearsasthecharttitleinthepreviewbox.
181
10
CreatingCharts
5 IntheCategory(X)axisbox,typeMonthandthenpressD.
MonthappearsastheCategory(X)axislabel.
6 IntheValue(Y)axisbox,typeSalesandthenpressF.
Thenextwizardpageappears.
7 ClickFinish.
Thechartappearsintheactiveworksheet.
8 DragthechartsothatitcoverscellsintherangeC17:G30.
9 Double-clickSalesbyMonth.
TheFormatChartTitledialogboxappears.
10 ClicktheFonttab.
TheFonttabpageappears.
11 IntheSizebox,click14andthenclickOK.
Thecharttitleappearsin14-pointtype.
12 Double-clicktheValue(Y)axisareaofthechart.
TheFormatAxisdialogboxappears.
13 Ifnecessary,clicktheNumbertabtodisplaytheNumbertabpage.
14 IntheDecimalplacesbox,type0andthenclickOK.
ThevaluesontheValue(Y)axisappearwiththeformattingchangesapplied.
15 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Customize.
182
Microsoft
Office
Specialis
CreatingCharts
10
FindingTrendsinYourData
Microsoft
YoucanusethedatainExcelworkbookstodiscoverhowyourbusinesshasper-
Office
Specialistt
formedinthepast,butyoucanalsohaveExcelmakeitsbestguessastofuturesales
ifthecurrenttrendcontinues.Asanexample,considerthefollowinggraphforThe
GardenCompany.
ThisgraphshowstheSeptembertoDecembersalestotalsfortheyears1997through
2002.Thetotalforeachmonthhasgrownfrom1997to2002,butthegrowthhasnt
beenuniform,soguessinghowmuchsaleswouldincreasceiftheoveralltrendcon-
tinuedwouldrequiremathyoumightnotknow.
Fortunately,Excelknowsthatmath.TohaveExcelprojectfuturesalesforoneof
thedataseriesinthechart,right-clickthefirstcolumnforthatdataseriesandthen,
fromtheshortcutmenuthatappears,clickAddTrendlinetoopentheAddTrendline
dialogbox.
183
10
CreatingCharts
TheTypetabpageoftheAddTrendlinedialogboxletsyouchoosethedatadistribu-
tionthatExcelshouldexpectwhenitmakesitsprojection.Therightchoiceformost
businessdataisLineartheotherdistributions(suchasExponential,Logarithmic,
andPolynomial)areusedforscientificandoperationsresearchapplications.
Tip Basically,ifyoudontknowwhichdistributiontochoose,chooseLinear.
Afteryoupickthedistributiontype,clicktheOptionstabtodisplaytheOptions
tabpage.
Thehorizontalaxisofthechartusedinthisexampleshowssalesbyyearfrom1997
to2002.TotellExcelhowfarinthefuturetolook,youtypeanumberintheForecast
sectionsForwardbox.Inthiscase,tolookaheadtwoyearsyouwouldtype2inthe
ForwardboxandthenclickOKtoaddthetrendlinetothechart.
184
Microsoft
Office
Specialis
CreatingCharts
10
Aswithotherchartelements,youcandouble-clickthetrendlinetoopenaformatting
dialogbox.
Inthisexercise,youaddatrendlinetoachart.
OPEN:TrendLinefromtheSBS\Excel\Chartsfolder.
1 Ifnecessary,onthetabbar,clicktheTrendstab.
TheTrendsworksheetappears.
2 Intheembeddedchart,right-clicktheSeptembercolumnabovethe1995labeland
then,fromtheshortcutmenuthatappears,clickAddTrendline.
TheTypetabpageoftheAddTrendlinedialogboxappears.
3 Ifnecessary,intheTrend/Regressiontypesection,clickLinear.
4 ClicktheOptionstab.
TheOptionstabpageappears.
5 IntheForecastsection,type2intheForwardboxandthenclickOK.
TheAddTrendlinedialogboxdisappears,andthetrendlineyoucreatedappearson
thechart.
6 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:TrendLine.
CreatingaDynamicChartUsingPivotCharts
Microsoft
Justasyoucancreatetablesthatyoucanreorganizeontheflytoemphasizedifferent
Office
Specialistt
aspectsofthedatainalist,youcanalsocreatedynamiccharts,orPivotCharts,to
reflectthecontentsandorganizationofaPivotTable.
YoucancreateaPivotChartintwoways:byclickingacellinanexistingPivotTable
andthenclickingtheChartWizardbuttonontheStandardtoolbar,orbyselectingthe
appropriateoptionbuttononthelastpageofthePivotTableandPivotChartWizard.
ThefirstmethodofcreatingaPivotChartisfairlystraightforward.Inaworksheetwith
anexistingPivotTable,clickacellinthePivotTableandthenclicktheChartWizard
ChartWizard
button.Whenyoudo,aPivotChartappearsinanewworksheet.
185
10
CreatingCharts
AnychangestothePivotTableonwhichthePivotChartisbasedwillbereflectedin
thePivotChart.Forexample,ifthedatainanunderlyingdatalistchanges,clickingthe
RefreshData
RefreshDatabuttononthePivotTabletoolbarwillchangethePivotCharttoreflectthe
newdata.Also,youcouldfilterthecontentsofthePivotTableshownherebyclicking
theWeekdaydownarrow,clickingWedfromthelistthatappears,andthenclicking
OK.ThePivotTablewillthenshowsalesonWednesdays.ThePivotChartwillalso
reflectthefilter.
186
CreatingCharts
10
ThePivotCharthascontrolswithwhichyoucanfilterthedatainthePivotChartand
PivotTable.ClickingtheWeekdaydownarrow,clicking(All)fromthelistthatappears,
andthenclickingOKwillrestorethePivotCharttoitsoriginalconfiguration.
OnceyouhavecreatedaPivotChart,youcansaveitasacharttypethatwillbeavail-
ableintheChartWizard.TosavethePivotChartasauser-definedcharttype,clickthe
chart,andontheChartmenu,clickChartTypetodisplaytheChartTypedialogbox.
OncetheChartTypedialogboxappears,clicktheCustomTypestab.
OntheCustomTypestabpage,clicktheUser-definedoptionbuttonintheSelectFrom
sectiontodisplaytheavailableuser-definedcharttypes.ThelistoftypesintheChart
typelisthasoneentry:Default.Toaddanewtype,clicktheAddbutton.
Typeanameandadescriptionforthenewtype,andthenclickOK.Thenewchart
typewillappearintheChartTypedialogbox.
187
10
CreatingCharts
Ifyoueverwanttochangethecharttypeofanexistingchart,youcandosoby
openingtheChartTypedialogboxandclickinganewtypeforthechart.Whenyou
clickOK,yourdatawillberepresentedbythenewchart.
Caution Ifyourdataisofthewrongtypetoberepresentedbythecharttypeyou
select,anerrormessagewillappear.
Inthisexercise,youcreateaPivotTableandassociatedPivotChart,changetheunder-
lyingdataandupdatethePivotCharttoreflectthatchange,savethePivotChartasa
customcharttype,andthenchangethePivotChartstype.
OPEN:DynamicfromtheSBS\Excel\Chartsfolder.
1 ClickcellA1,andthenontheDatamenu,clickPivotTableandPivotChartReport.
ThefirstpageofthePivotTableandPivotChartWizardappears.
2 SelectthePivotChartreport(withPivotTablereport)optionbutton,andthen
clickNext.
Thenextwizardpageappearswith$A$1:$D$1117intheRangebox.
3 ClickNext.
Thefinalwizardpageappears.
4 BesurethattheNewworksheetoptionbuttonisselected,andthenclickFinish.
Twonewworksheetsappearintheactiveworkbook,onewiththenewPivotTable
andtheotherwiththenewPivotChart.TheworksheetwiththePivotChartisactive
andhasthePivotTableFieldListdialogboxandthePivotTabletoolbardisplayed.
5 FromthePivotTableFieldListdialogbox,dragtheHourfieldtotheDropCategory
FieldsHerebox.
ThePivotChartchangestoreflecttheassignment.
6 FromthePivotTableFieldListdialogbox,dragtheMonthfieldtotheDropPage
FieldsHerebox.
ThePivotChartchangestoreflecttheassignment.
7 FromthePivotTableFieldListdialogbox,dragtheWeekdayfieldtotherightofthe
MonthfieldheadintheDropPageFieldsHerebox.
ThePivotChartchangestoreflecttheassignment.
8 FromthePivotTableFieldListdialogbox,dragtheSalesfieldtotheDropDataItems
Herebox.
188
CreatingCharts
10
ThebodyofthePivotChartfillswithdatafromtheSalesfield,organizedbythecon-
tentsoftheHourfield.
Close
9 InthePivotTableFieldListdialogbox,clicktheClosebutton.
ThePivotTableFieldListdialogboxdisappears.
10 Onthetabbar,inthelowerleftcorneroftheworkbook,clicktheAllDatasheettab.
TheAllDataworksheetappears.
11 IncellD9,type4140.
12 Onthetabbar,clicktheChart1sheettab.
TheChart1worksheetappears.
13 OnthePivotTabletoolbar,clicktheRefreshDatabutton.
Thebarrepresentingtotalsalesforhour9changestoreflectthenewtotal.
14 OntheChartmenu,clickChartType.
TheChartTypedialogboxappears.
15 Ifnecessary,clicktheCustomTypestabtodisplaytheCustomTypestabpage.
16 IntheSelectfromsection,selecttheUser-definedoptionbuttonandthenclickAdd.
TheAddCustomChartTypedialogboxappears.
17 IntheNamebox,typeSalesPivotChart.
189
Microsoft
Office
Specialis
10
CreatingCharts
18 IntheDescriptionbox,typePivotChartcreatedwithMonth,Weekday,Hour,and
SalesfieldsandthenclickOK.
TheAddCustomChartTypedialogboxdisappears,andthenewcharttypeappears
intheChartTypedialogbox.
19 ClicktheStandardTypestab.
TheStandardTypestabpageoftheChartTypedialogboxappears.
20 IntheCharttypelist,clickAreaandthenclickOK.
Thechartchangestoreflectitsnewtype.
21 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:Dynamic.
CreatingDiagrams
Microsoft
TheGardenCompanyisafrequentdestinationforschoolfieldtripsbecauseofits
Office
Specialistt
widevarietyofplants,soCatherinewouldliketomakeupsomediagramsshowing
howrecyclingandweathercyclesrelatetoherbusinessandthekids.Excelhasjust
thetoolsheneedstocreatethosediagrams:theDiagramGallerydialogbox,which
youcandisplaybyopeningtheInsertmenuandclickingDiagram.
190
CreatingCharts
10
SeeAlso Formoreinformationonaddingpicturesfromexistingfilestoyourworksheets,
seeAddingaGraphictoaDocumentonpage34.
ClickingoneofthebuttonsintheDiagramGallerydialogboxselectsthetypeofdia-
gramthebuttonrepresentsandcausesadescriptionofthediagramtypetoappearin
thebottompaneofthedialogbox.Thefollowingtableliststhesixtypesofdiagrams
youcancreateusingtheDiagramGallerydialogbox.
Diagram Description
Organizationchart Usedtoshowhierarchicalrelationships,suchaswithina
company.
Cyclediagram Usedtoshowaprocesswithacontinuouscycle.
Radialdiagram Usedtoshowtherelationshipsofacoreelement.
Pyramiddiagram Usedtoshowfoundation-basedrelationships,suchasaseries
ofskills.
Venndiagram Usedtoshowtheareasofoverlapamongsetsofitems.
Targetdiagram Usedtoshowstepstowardagoal.
Afteryouclickthebuttonrepresentingthetypeofdiagramyouwanttocreate,
clickingOKwilladdthediagramtoyourworksheet.Youcanthenedittheelements
ofthediagramusingthecontrolsontheFormattingtoolbaraswellasontheFormat
menu.Infact,whenoneoftheelementsinadiagramisselected,therewillbea
FormatAutoShapeitemontheFormatmenu;clickingitdisplaystheFormatAuto-
Shapedialogbox.
191
10
CreatingCharts
Note IfyouhaveselectedthetextinanAutoShape,onlytheFonttaboftheFormat
AutoShapedialogboxwillbeavailable.
YoucanusethecontrolsintheFormatAutoShapedialogboxtochangeanyofthe
attributesofthediagram,includingfillcolor,borders,andtextproperties.
Inthisexercise,youcreateanorganizationchart,fillintheshapes,addashape,
changethelayoutofthediagramwithoutchangingtheinformationitembodies,and
changetheformattingofoneofthediagramelements.
OPEN:DiagramfromtheSBS\Excel\Chartsfolder.
1 OntheInsertmenu,clickDiagram.
TheDiagramGallerydialogboxappears.
2 ClicktheOrganizationChartbuttonatthetopleftofthedialogbox,andclickOK.
TheDiagramGallerydialogboxdisappears,adiagramappearsontheactivework-
sheet,andtheOrganizationCharttoolbarappears.
192
CreatingCharts
10
3 Clickinthetopshapeintheorganizationchart,typeOwner,andclickablankspace
intheorganizationchart.
Owner appearsinthetopshape.
4 Clicktheshapeattheleftofthesecondrow,typeProductsManager,andclicka
blankspaceintheorganizationchart.
Products Managerappearsintheleftmostshapeonthesecondrowoftheorganiza-
tionchart.
5 Clicktheshapeinthecenterofthesecondrow,typeSalesManager,andclicka
blankspaceintheorganizationchart.
Sales Managerappearsinthecentershapeonthesecondrowoftheorganization
chart.
6 Clicktheshapeattherightofthesecondrow,typeLandscapingManager,andclick
ablankspaceintheorganizationchart.
Landscaping Manager appearsintherightmostshapeonthesecondrowofthe
organizationchart.
193
10
CreatingCharts
7 ClicktheProductsManagershape.
8 OntheOrganizationCharttoolbar,clicktheInsertShapedownarrow,andclick
Subordinate.
AshapeappearsbelowtheProductsManagershape.
9 Clickthenewshape,typeWarehouse,andclickablankspaceintheorganization
chart.
10 ClicktheOwnershape.
11 OntheOrganizationCharttoolbar,clicktheLayoutdownarrow,andclickRight
Hanging.
TheshapesonelevelbelowtheOwnershapechangetoaright-hanging
arrangement.
12 ClicktheProductsManagershape.
13 OntheOrganizationCharttoolbar,clicktheLayoutdownarrow,andclickRight
Hanging.
TheshapeonelevelbelowtheProductsManagershapechangestoaright-hanging
arrangement.
14 ClicktheborderoftheOwnershape.
15 OntheFormatmenu,clickAutoShape.
TheFormatAutoShapedialogboxappears.
16 Ifnecessary,clicktheFonttab,andthen,intheFontStylelist,clickBold.
194
CreatingCharts
10
17 ClickOK.
ThecontentsoftheOwnershapeappearinboldtype.
18 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:Diagram.
KeyPoints
Youcanusechartstosummarizelargesetsofdatainaneasy-to-followvisual
format.
Yourenotstuckwiththechartyoucreate;ifyouwanttochangeit,youcan.
Addingchartlabelsandalegendmakesyourchartmucheasiertofollow.
Ifyourchartdatarepresentsaseriesofeventsovertime(suchasmonthlyor
yearlysales),youcanusetrendlineanalysistoextrapolatefutureeventsbased
onthepastdata.
APivotChartletsyourearrangeyourchartonthefly,emphasizingdifferent
aspectsofthesamedatawithouthavingtocreateanewchartforeachview.
Excelletsyoucreateandmodifycommonbusinessandorganizationaldia-
grams,suchasorganizationchartsandprocessdiagrams,quickly.
195
Chapter 11 at a Glance
Printachart,
page209
Printpartofadatalist,
page205
Printadatalist,
page197
196 Chapter 11 at a Glance
Microsoft
Office
Specialis
11
Printing
Inthischapteryouwilllearnto:
Printdatalists.
Printpartofadatalist.
Printachart.
Excelgivesyouawiderangeoftoolstocreateandmanipulateyourdatalists.By
usingfilters,bysorting,andbycreatingPivotTablesandcharts,youcanchangeyour
worksheetssothattheyconveythegreatestpossibleamountofinformation.Once
youhaveconfiguredyourworksheetsothatitshowsyourdatatobestadvantage,
youcanprintyourExceldocumentstouseinapresentationorincludeinareport.
Youcanchoosetoprintallorpartofanyofyourworksheets,changehowyourdata
andchartsappearontheprintedpage,andevensuppressanyerrormessagesthat
mightappearinyourworksheets.
Inthischapter,youlllearnhowtoprintallorpartofadatalistandhowto
printcharts.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpagesliliv.
Important Beforeyoucanusethepracticefilesinthischapter,besureyou
installthemfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsing
theBooksCD-ROMonpagexiformoreinformation.
PrintingDataLists
Microsoft
OneofthemostimportantconsiderationsincreatingapapercopyofanExceldocu-
Office
Specialistt
mentisdetermininghowyouwantyourdatatoappearontheprintedpage.For
example,youcandecidehowfarfromtheedgeofthepageyouwantyourdatato
start,changetheorderinwhichExcelprintsthepagesinyourworksheet,andeven
changewhereExcelendsoneprintedpageandbeginsthenext.
Tip Ifyouwanttoprinttheactiveworksheetwithoutchanginganysettings,clickthe
PrintbuttonontheStandardtoolbar.
Print
197
11
Printing
PreviewaWorksheetBeforePrinting
PrintPreview
YoucanviewyourExcelworksheetasitwouldbeprintedbyclickingthePrint
PreviewbuttonontheStandardtoolbar.Whenyoudo,Exceldisplaystheactivework-
sheetinthePrintPreviewwindow.
WhenthePrintPreviewwindowopens,itshowstheactiveworksheetasitwouldbe
printedwithitscurrentsettings.InthelowerleftcornerofthePrintPreviewwindow,
Excelindicateshowmanypagestheworksheetwillrequirewhenprintedandthe
numberofthepageyouareviewing.
Tip YoucanviewthenextprintedpagebypressingtheCkey;tomovetotheprevi-
ouspage,pressthe<key.
ChangeYourPrinterSetup
WhileyouhaveyourworksheetopeninthePrintPreviewwindow,youcanusethe
buttonsatthetopofthewindowtochangehowyourworksheetwillappearwhen
printed.ClickingtheSetupbutton,forexample,opensthePageSetupdialogbox.
Important Anypagesetuporotherchangesyoumaketoaworksheetareconfined
tothatworksheet.
YoucanusethecontrolsinthePageSetupdialogboxtochangetheorientationof
theprintedpagebetweenportraitmode,whichhastheshortedgeofthepaperatthe
top,andlandscapemode,whichhasthelongedgeofthepaperatthetop.Clicking
theMarginstabdisplaysatabpagewithcontrolsforchangingtheamountofspaceto
beleftattheedgesofthepaper(andtheamountofspacededicatedtoheadersand
footers)whenExcelprintsyourworksheet.
Important TheremainingcontrolsonthePagetabarediscussedinthenextsec-
tionofthischapter,PrintingPartofaDataList.
YoucanalsochangethemarginsallottedtoeachareaofyourworksheetinthePrint
Previewwindow.WhenyouclicktheMarginsbutton,Exceldrawslinesonyour
worksheettoindicatewherethesectionsofyourdocumentbeginandend.To
changeamargin,youjustdragitslinetothedesiredposition.
Tip Whenyoudragamargintoanewposition,thedistancefromthemargintothe
nearestedgeappearsinthelowerleftcornerofthePrintPreviewwindow.
ZoomInonPartofaPage
WhileyouareviewingaworksheetinthePrintPreviewwindow,youcanviewthe
detailsofanysectionoftheworksheetbyclickingtheZoombutton.Clickingthe
198
Printing
11
Zoombuttondoublesthesizeofthedocumentinthewindow;clickingitagain
returnsthedocumenttoitsnormaldisplaysize.
ChangethePageBreaksinaWorksheet
Anotherwayyoucanchangehowyourworksheetwillappearontheprintedpageis
tochangewhereExcelassignsitspagebreaks,orthepointwhereExcelprintsall
subsequentdataonanewsheetofpaper.Youcandothatindirectlybychanginga
worksheetsmargins,butyoucandoitdirectlybydisplayingyourdocumentinPage
BreakPreviewmode.TodisplayyourworksheetinPageBreakPreviewmodefrom
thePrintPreviewwindow,clickthePageBreakPreviewbutton.
Thebluelinesinthewindowrepresentthepagebreaks.Tomoveapagebreak,you
dragthelinerepresentingthebreaktoitsnewposition.Excelwillchangethework-
sheetspropertiessothattheareayoudefinedwillbeprintedonasinglepage.You
exitPageBreakPreviewmodebyclickingNormalontheViewmenu.
Tip YoucanviewyourworksheetinPageBreakPreviewmodeatanytimebyclicking
PageBreakPreviewontheViewmenu.
ChangethePagePrintingOrderforaWorksheet
WhenyouviewadocumentinPageBreakPreviewmode,Excelindicatestheorderin
whichthepageswillbeprintedwithlightgraywordsontheworksheetpages.(These
199
11
Printing
indicatorsappearonlyinPageBreakPreviewmode;theywontshowupwhenthe
documentisprinted.)Youcanchangetheorderinwhichthepagesareprintedby
clickingtheSetupbuttonandopeningthePageSetupdialogboxtotheSheetpage.
OntheSheetpage,selectingtheOver,thendownoptionbuttonwillchangetheorder
inwhichtheworksheetswillbeprintedfromthedefaultDown,thenover.Youmight
wanttochangetheorderinwhichyourworksheetsareprintedtokeepcertaininfor
mationtogetheronconsecutiveprintedpages.Forexample,supposeyouhavea
worksheetthatholdshourlysalesinformation;thecolumnsrepresenthoursofthe
day,andtherowsrepresentdaysofthemonth.Ifyouwanttoprintoutconsecutive
daysforeachhour,youuseDown,thenover,asshowninthefollowinggraphic.
Pages1and2letyouseethe9:00a.m.to2:00p.m.salesfortheentiremonth,pages
3and4letyouseethe3:00p.m.to7:00p.m.salesfortheentiremonth,andsoon.
Asthenextgraphicshows,changingtheprintordertoOver,thendownprintsconsecu
tivehoursforeachday.Pages1and2letyouseethe9:00a.m.to7:00p.m.salesfor
thefirst24daysofthemonth,andpages3and4letyouseethe9:00a.m.to7:00p.m.
salesforthelast7daysofthemonth.
200
Printing
11
SuppressErrorsinaWorksheet
AhelpfuloptionontheSheettabpageofthePageSetupdialogboxistheCellerrors
asbox,whichletsyouselecthowExcelwillprintanyerrorsinyourworksheet.You
canprinttheerrorasitnormallyappearsintheworksheet,printablankcellinplace
oftheerror,orchooseoneoftwootherindicatorsthatarenotstandardExcelerror
messages.
Onceyouhavepreparedyourworksheetforprinting,youcanprintitbyopeningthe
Printdialogbox.InthePrintdialogbox,youcanchoosethepagesoftheworksheet
youwanttoprint.Toprinteverypageintheworksheet,selecttheAlloptionbutton
inthePrintrangesectionandthenclickOK.Toprinteveryworksheetintheactive
workbook,selecttheEntireworkbookoptionbuttoninthePrintwhatsection.
PrintNonadjacentSheetsfromaWorkbook
Ifyouwanttoprintmorethanoneworksheetfromtheactiveworkbook,butnot
everyworksheetintheworkbook,youcanselecttheworksheetstoprintfromthe
tabbar.Toselecttheworksheetstoprint,holddowntheHkeywhileyouclickthe
sheettabsoftheworksheetsyouwanttoprintandthenclickthePrinttoolbarbutton.
201
11
Printing
Note Theworksheetsyouselectforprintingdonotneedtobenexttooneanotherin
theworkbook.
Inthisexercise,youpreviewaworksheetbeforeprinting,changeyourprintersetup,
changethedocumentsmargins,zoominonpartofapage,previewandchangeyour
worksheetspagebreaks,changethepageprintingorderforaworksheet,suppress
errorsinaworksheet,andthenprintnonadjacentworksheetsinyourworkbook.
OPEN:PrintingfromtheSBS\Excel\Printingfolder.
1 Ifnecessary,clicktheJanuarysheettab.
2 OntheStandardtoolbar,clickthePrintPreviewbutton.
Theworksheetappearsinpreviewmode.
3 ClickSetup.
ThePageSetupdialogboxappears.
4 ClicktheZoombutton.
Excelincreasesthedisplaysizeofthedocument.
5 ClicktheZoombutton.
Exceldecreasesthedisplaysizeofthedocument.
6 IntheOrientationsectionofthePagetab,selecttheLandscapeoptionbuttonand
thenclickOK.
ThePageSetupdialogboxcloses,andtheactiveworksheetreappearsin
previewmode.
202
Printing
11
7 ClickMargins.
Marginlinesappearonyourworksheet.
8 Movethemousepointeroverthesecondmarginlinefromthebottom,andthen,
whenthemousepointerchangestoaverticaldouble-headedarrow,dragthemar-
ginlineuntilitisabovethelogo.
Exceladjuststhemarginstoreflectyourchange.
9 ClickPageBreakPreview.
10 Ifamessageboxappears,clickOKtocloseit.
ThePrintPreviewwindowcloses.Theactiveworksheetappears,withthepage
breaksindicatedbybluelinesandtheprintingorderoftheworksheetsectionsindi-
catedbygraytextonthebackgroundofthepages.
11 DragthepagebreaklineontheborderofcolumnsIandJtotheborderofcolumns
GandH.
Excelrepaginatesyourdocumenttoreflectthenewpagebreakposition.
12 OntheViewmenu,clickNormal.
ExcelchangesthedocumentviewfromPageBreakPreviewmodetoNormal.
13 OntheFilemenu,clickPageSetup.
ThePageSetupdialogboxappears.
203
11
Printing
14 ClicktheSheettab.
15 InthePageordersection,selecttheOver,thendownoptionbutton.
ThegraphicinthePageordersectionchangestoreflectyourchoice.
16 InthePrintsection,clicktheCellerrorsasboxandthen,fromthelistthatappears,
click<blank>.
17 ClickthePagetab.
18 Ifnecessary,selecttheAdjusttooptionbuttonandthen,intheAdjusttobox,
type100.
Note TheAdjusttovaluemighthavechangedfrom100%to78%whenyou
movedthepagebreakearlierinthisexercise.
19 ClickOK.
ThePageSetupdialogboxcloses.
20 HolddowntheHkeywhileyouclicktheMarchtabonthetabbar.
TheJanuaryandMarchworksheetsarenowactive.
21 OntheFilemenu,clickPrint.
ThePrintdialogboxappears.
22 InthePrintwhatsection,ensurethattheActivesheet(s)optionbuttonisselected.
23 ClickOKtoprinttheselectedworksheets,orclickCanceltoavoidprintingthe
selectedworksheets.
24 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Printing.
204
Microsoft
Office
Specialis
Printing
11
PrintingPartofaDataList
Microsoft
Excelgivesyouagreatdealofcontroloverwhatyourworksheetslooklikewhen
Office
Specialistt
youprintthem,butyoualsohavealotofcontroloverwhatpartsofyourworksheets
willbeprinted.Forexample,youcanusethePrintdialogboxtochoosewhichpages
ofamultipageworksheetyouwanttoprint.
SelectingthePage(s)optionbuttoninthePrintrangesectionofthedialogboxlets
youfillinthepagenumbersyouwanttoprintintheFromandToboxes.
Tip YoucanusethePageBreakPreviewwindowtodeterminewhichpagesyouwantto
print,andifthepagesarentinanorderyoulike,youcanusethecontrolsontheSheet
tabpageofthePageSetupdialogboxtochangetheorderinwhichtheywillbeprinted.
AnotherwayyoucanmodifyhowaworksheetwillbeprintedistohaveExcelfitthe
entireworksheetonaspecifiednumberofpages.Forexample,youcanhaveExcel
resizeaworksheetsothatitwillfitonasingleprintedpage.Fittingaworksheetonto
asinglepageisahandytoolwhenyouneedtoaddasalesorothersummarytoa
reportanddontwanttospreadimportantinformationacrossmorethanonepage.
TohaveExcelfitaworksheetonasetnumberofpages,youopenthePageSetup
dialogboxtothePagetabandselecttheFittooptionbutton.Thedefaultselectionis
tofittheworksheettoaprintareaonepagehighbyonepagewide,butyoucantype
differentvaluesintheboxestochangethetotalpagesonwhichtheworksheetwill
beprinted.
Ifyouwanttoprintaportionofaworksheetratherthantheentireworksheet,youcan
definetheareaorareasyouwanttohaveprinted.Toidentifytheareaofthework-
sheetyouwanttoprint,selectthecellswiththedatayouwanttoprint,andontheFile
menu,pointtoPrintArea,andthenclickSetPrintArea.Excelmarkstheareawitha
dottedlinearoundtheborderoftheselectedcellsandwillprintonlythecellsyou
selected.Toremovetheselection,openthesamesubmenuandclickClearPrintArea.
Tip Youcanincludenoncontiguousgroupsofcellsintheareatobeprintedbyholding
downtheHkeyasyouselectthecells.
Onceyouhavedefinedaprintarea,youcanusethePageSetupdialogboxtoposition
theprintareaonthepage.Specifically,youcanhaveExcelcentertheprintareaonthe
pagebyselectingtheHorizontallyandVerticallycheckboxesontheMarginstabpage.
AnotheroptionatyourdisposalwhenprintinganExcelworksheetistohidespecific
rowsorcolumnsduringtheprinting.Forexample,ifasalespersonweregivingapre
sentationonhowdifferentproductlinessoldatTheGardenCompany,heorshe
mightwanttoshoweveryrowinaworksheetexceptthetotalsbycategory,saving
thatinformationforthenextslide.
205
11
Printing
Collapse
Dialog
ExpandDialog
Youcanhiderowsorcolumnsbyselectingtherowsorcolumns,andthenonthe
Formatmenu,pointingtoRoworColumn,andthenclickingHide.Therowsorcol
umnswillbehiddenuntilyoupointtoRoworColumnontheFormatmenuandclick
Unhide,buttheyarestillthere!Theywouldbeerasedonlyifyouselectedtherowsor
columnsandthenclickedDeleteontheEditmenu.
Ifthecontentsofaworksheetwilltakeupmorethanoneprintedpage,youcanhave
Excelrepeatoneormorerowsatthetopofthepageorcolumnsattheleftofthe
page.Forexample,ifyouwantedtoprintalengthydatalistcontainingthemailing
addressesofcustomerssigneduptoreceiveyourcompanysmonthlynewsletter,you
couldrepeatthecolumnheadingsName,Address,City,andsoforthatthetopofthe
page.Torepeatrowsatthetopofeachprintedpage,ontheFilemenu,clickPage
Setup.InthePageSetupdialogbox,clicktheSheettabtomovetotheSheettabpage.
OntheSheettabpage,youcanusethecontrolsinthePrinttitlessectionofthedialog
boxtoselecttherowsorcolumnstorepeat.Tochooserowstorepeatatthetopofthe
page,clicktheCollapseDialogbuttonnexttotheRowstorepeatattopbox,select
therows,andthenclicktheExpandDialogbutton.Therowsyouselectedappearinthe
Rowstorepeatattopbox.
Similarly,tohaveasetofcolumnsappearattheleftofeveryprintedpage,clickthe
CollapseDialogbuttonnexttotheColumnstorepeatatleftbox,selectthecolumns,and
thenclicktheExpandDialogbutton.Whenyouredone,clickOKtoacceptthesettings.
AfinalfeaturethatcomesinhandywhenyouprintExcelworksheetsisIntelliprint,
whichpreventsanyblankpagesfrombeingprintedattheendofadocument.The
endresultisthatyoudontneedtosetaprintareamanuallyunlessyouwanttoprint
asubsetofthedatainyourworksheet,orifyouwanttoprintblankpagesafterthe
restofyourdata.
Inthisexercise,youprintselectedpagesfromamultipageworksheet,printanentire
worksheetonasinglepage,defineaprintareaandcenteritonapage,hiderowsfor
printing,andthenunhidetherows.
OPEN:PartfromtheSBS\Excel\Printingfolder.
1 Ifnecessary,clicktheJanuarytab.
2 OntheFilemenu,clickPrint.
ThePrintdialogboxappears.
3 InthePrintrangesection,selectthePage(s)optionbutton.
4 IntheFrombox,type2.
5 IntheTobox,type3.
206
Printing
11
6 ClickOKtoprintpages2and3oftheworksheet.
Important Ifyourcomputerisnotconnectedtoaprinter,clickCancel.
7 OntheFilemenu,clickPageSetup.
ThePageSetupdialogboxappears.
8 Ifnecessary,clickthePagetab.
9 IntheScalingsection,selecttheFittooptionbuttonandthen,ifnecessary,type1
inboththepage(s)widebyandtallboxes.
10 ClickOK.
Excelresizesyourworksheetsothatitwillfitononeprintedpage.
11 ClickcellA1anddragtocellG12.
12 OntheFilemenu,pointtoPrintArea,andthenclickSetPrintArea.
Adottedlineappearsonthebordersofthecellsdefinedastheprintarea.
13 OntheStandardtoolbar,clickthePrintPreviewbutton.
PrintPreview Apreviewoftheselectedprintareaappears.
14 ClicktheSetupbutton.
ThePageSetupdialogboxappears.
15 ClicktheMarginstabtodisplaytheMarginstabpage.
16 IntheCenteronpagesection,selecttheHorizontallycheckboxandtheVertically
checkbox.
207
11
Printing
17 ClickOK.
ThePrintPreviewwindowreappears,withtheselectedprintareacenteredon
thepage.
18 InthePrintPreviewwindow,clickClose.
ThePrintPreviewwindowcloses.
19 OntheFilemenu,pointtoPrintAreaandthenclickClearPrintArea.
Excelremovestheprintareayoudefinedearlier.
20 SelectcolumnsDthroughG,andthen,ontheFormatmenu,pointtoColumnand
thenclickHide.
ColumnsDthroughGarehidden.
21 OntheStandardtoolbar,clickthePrintPreviewbutton.
Apreviewofyourworksheetasitwillbeprintedappears.
22 InthePrintPreviewwindow,clickClose.
23 OntheFormatmenu,pointtoColumnandthenclickUnhide.
Thehiddencolumnsreappear.
24 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Part.
208
Microsoft
Office
Specialis
Printing
11
PrintingaChart
Microsoft
Charts,whicharegraphicrepresentationsofyourExceldata,letyoucommunicate
Office
Specialistt
lotsofinformationwithapicture.Dependingonyourdataandthetypeofchart
youmake,youcanshowtrendsacrosstime,indicatetherevenueshareforvarious
departmentsinacompanyforamonth,orprojectfuturesalesusingtrendlineanaly-
sis.Onceyouhavecreatedachart,youcanprintittoincludeinareportoruseina
presentation.
Ifyouembedachartinaworksheet,however,thechartwillprobablyobscuresome
ofyourdataunlessyoumovethecharttoasecondpageintheworksheet.Thatsone
waytohandleprintingachartortheunderlyingworksheet,butthereareotherways
thatdontinvolvechangingthelayoutofyourworksheets.
Youcanprintaworksheetwithoutprintinganembeddedchartbysettingthecharts
propertiessothatitremainshiddenwhentheworksheetinwhichthechartisembed-
dedisprinted.Youcanfindthisoption,whichisdirectlyanalogoustohidingrowsor
columnswhenyouprintaworksheet,byopeningtheFormatChartAreadialogbox
tothePropertiestabpage.
SelectingthePrintobjectcheckboxcausesExceltoprintthechartwhenthework-
sheetisprinted,whileclearingthecheckboxhidesthechart.
Toprintachart,clickthechartandthenontheFilemenu,clickPrinttodisplaythe
Printdialogbox.InthePrintwhatsection,theSelectedChartoptionbuttonisthe
onlyoneavailable.Ifyouweretoclickanywhereontheworksheetoutsidethechart,
thePrintwhatsectionwouldappearwiththeActivesheet(s)optionbuttonselected,
meaningthatthechartandunderlyingworksheetwouldbeprintedastheyappear
onthescreen.
209
11
Printing
Whenyouprintachartbyitself,thedefaultbehavioristoresizethechartsothatit
takesupanentireprintedpage.Ifyouwanttoprintthechartatitsactualsize,such
aswhenafull-pageslidewouldbetoolargeforyourprojectionequipment,you
candosobyopeningthePageSetupdialogboxtotheCharttabpage.Selectingthe
CustomoptionbuttoninthePrintedchartsizesectiontellsExceltoprintthechartat
itsactualsize.
Tip Youcanresizeachartbyselectingitintheworkbookwindowanddraggingoneof
thecornerhandlesuntiltheoutlineofthechartisthedesiredsize.
Inthisexercise,youprintachartbyitself,printtheunderlyingworksheetwithout
thechart,andthenusetheCharttabofthePageSetupdialogboxtosetthecharts
propertiessothatitisprintedatitsactualsize.
OPEN:PrintChartfromtheSBS\Excel\Printingfolder.
1 Clickthechart,andthen,ontheFilemenu,clickPrint.
ThePrintdialogboxappears.
2 InthePrintwhatsection,ensurethattheSelectedChartoptionbuttonisselected.
3 ClickOKtoprintyourchart,orclickCanceltocontinuewithoutprinting.
ThePrintdialogboxdisappears.Ifyouprintedthechart,noticethatthechart
expandedtofittheentirepage.
4 Right-clicktheChartAreaofthechart,andthen,fromtheshortcutmenuthat
appears,clickFormatChartArea.
TheFormatChartAreadialogboxappears.
5 ClickthePropertiestab.
210
Printing
11
Print
PrintPreview
ThePropertiestabpageappears.
6 ClearthePrintobjectcheckbox,andthenclickOK.
TheFormatChartAreadialogboxdisappears.
7 Clickanyspotontheworksheetand,ifyourcomputerisconnectedtoaprinter,on
theStandardtoolbar,clickthePrintbutton.
Important Ifyourcomputerisnotconnectedtoaprinter,continuetothenext
stepwithoutprinting.
Excelprintstheworksheetwithoutthechart.
8 Right-clicktheChartAreaofthechart,andthen,fromtheshortcutmenuthat
appears,clickFormatChartArea.
TheFormatChartAreadialogboxappears.
9 ClickthePropertiestab.
ThePropertiestabpageappears.
10 SelectthePrintobjectcheckbox,andthenclickOK.
11 OntheStandardtoolbar,clickthePrintPreviewbutton.
ThePrintPreviewwindowappears.Noticethatthecharthasbeenresizedtofitthe
entirepage.
211
11
Printing
12 ClicktheSetupbutton.
ThePageSetupdialogboxappears.
13 ClicktheCharttab.
TheCharttabpageappears.
14 SelecttheCustomoptionbutton,andthenclickOK.
ThePrintPreviewwindowreappears,withthechartshownatitsoriginalsize.
15 ClickPrint.
ThePrintdialogboxappears.
16 ClickOKtoprintyourchart,orclickCanceltocontinuewithoutprinting.
Theworksheetwiththechartreappears.
17 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:PrintChart.
KeyPoints
Excelgivesyoucompletecontroloverhowyourworksheetsappearonthe
printedpage.Dontbeafraidtoexperimentuntilyoufindalookyoulike.
UsePrintPreviewtoseewhatyourworksheetwilllooklikeonpaperbeforeyou
print,especiallyifyoureusinganexpensivecolorprinter.
Youcanpreviewwherethepagebreakswillfallwhenyouprintaworksheet
andchangethemifyousodesire.
DontforgetthatyoucanhaveExcelavoidprintingerrorcodes!Besuretouse
yourpowerwisely.
Youcanchooseeithertoprintornotprinthiddenrowsandcolumns,and
repeatrowsorcolumnsinaprintedworksheet.
Whenyouprintaworksheetthatcontainsachart,youcanprintthechartsoit
fillsupanentiresheetofpaper,printthechartatitsactualsize,orprintthe
worksheetwithoutthechart.
212
Chapter 12 at a Glance
Createmenusand
toolbarstoholdmacros,
page223
Openandrunmacros,
page216
Createandmodifymacros,
page220
Runamacrowhena
workbookisopened,
page230
214 Chapter 12 at a Glance
12
AutomatingRepetitive
TaskswithMacros
Inthischapteryouwilllearnto:
Openandrunmacros.
Createandmodifymacros.
Createtoolbarsandmenustoholdmacros.
Runamacrowhenaworkbookisopened.
ManytasksyouperforminMicrosoftExcel,suchasenteringsalesdataforaparticular
dayoraddingformulastoaworksheet,eitheraredoneonceor,likechangingthe
formatofacellrange,canberepeatedquicklyusingavailabletoolsinExcel.How-
ever,youwilloftenperformoneortwotasksfrequentlythatrequirealotofsteps
toaccomplish.Forexample,youmighthaveanumberofcellsinaworksheetthat
containimportantdatayouusequiteofteninpresentationstoyourcolleagues.
Ratherthangothroughalengthyseriesofstepstohighlightthecellswiththeimpor-
tantinformation,youcancreateamacro,orseriesofrecordedactions,toperform
thestepsforyou.Onceyouhavecreatedamacro,youcanrun,edit,ordeleteit
asneeded.
UnderthestandardExcelinterface,yourunandeditmacrosusingtheitemsonthe
Toolsmenu.Youcanmakeyourmacroseasiertoaccessbycreatingnewtoolbarsor
menuswithbuttonsormenuitemstowhichyoucanassignmacros.Ifyouruna
macrotohighlightspecificcellsinaworksheeteverytimeyoushowthatworksheet
toacolleague,youcansavetimebyaddingatoolbarbuttonthatrunsamacroto
highlightthecellsforyou.
AnotherhandyfeatureofExcelmacrosisthatyoucancreatemacrosthatrunwhen
aworkbookisopened.Forexample,youmightwanttoensurethatnocellsina
worksheetarehighlightedwhentheworksheetopens.Youcancreateamacrothat
removesanyspecialformattingfromyourworksheetcellswhenitsworkbookopens,
allowingyoutoemphasizethedatayouwantasyoupresenttheinformationtoyour
colleagues.
Inthischapter,youlllearnhowtoopen,run,create,andmodifymacros;create
toolbarsandmenustoholdmacros;definemacrosecuritysettings;andrunamacro
whenaworkbookisopened.
215
Microsoft
Office
Specialis
12
AutomatingRepetitiveTaskswithMacros
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpageslivlvii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
IntroducingMacros
AfteryouhaveworkedwithyourExceldocumentsforawhile,youwillprobably
discoversomeseriesofactionsyouperformrepeatedly.Whilemanyoftheseactions,
suchassavingyourchangesorprinting,canbeaccomplishedquickly,somesequences
involvemanystepsandtaketimetoaccomplishbyhand.Forexample,youmight
wanttohighlightanumberofcellsinaworksheettoemphasizeanaspectofyour
data.Ratherthanhighlightthecellsbyhandeverytimeyoupresentyourfindings,you
cancreateamacro,orseriesofautomatedactions,todothehighlightingforyou.
Microsoft
Thebestwaytogetanideaofhowmacrosworkistoexamineanexistingmacro.To
Office
Specialistt
dothat,ontheToolsmenu,pointtoMacro,andclickMacrostoopentheMacrodialog
box.YoucanalsoopentheMacrodialogboxbypressingJ+(.
Note IntheMacrodialogbox,youcandisplaythemacrosavailableinotherwork-
booksbyclickingtheMacrosinboxandselectingaworkbookbynameorbyselecting
AllOpenWorkbooks,whichwilldisplayeverymacroinanyopenworkbook.Ifyouselect
eitherofthosechoices,themacronamesdisplayedwillincludethenameofthework-
bookinwhichthemacroisstored.ClickingThisWorkbookdisplaysthemacrosinthe
activeworkbook.
Ifyouhavetroublerunningmacrosinyourworkbooksbecauseofyoursecurityset-
tings,youcanchangethesettingsbyopeningtheToolsmenu,pointingtoMacros,
216
AutomatingRepetitiveTaskswithMacros
12
andclickingSecurity.Onthepagethatappears,clicktheMediumoptionbuttonand
thenclickOK.
ChoosingtheMediummacrosecuritylevelmeansadialogboxaskingifyouwantto
enablemacroswillappearwheneveryoustarttoopenaworkbookthatcontains
macros.ClickingEnableMacroswillallowyoutorunthemacrosintheworkbook,
clickingDisableMacroswillpreventthemacrosfrombeingrun,andclickingCancel
willpreventtheworkbookfrombeingopened.TheHighsettingmeansExcelwill
enableonlydigitallysignedmacrosfromtrustedsources,whiletheLowsettingmeans
Excelwillautomaticallyenableanymacros,regardlessofthesource.
Warning Becauseitispossibletowritemacrosthatactasviruses,potentiallycaus-
ingharmtoyourcomputerandspreadingcopiesofthemselvestoothercomputers,you
shouldneverchoosetheLowsecuritysetting,evenifyouhaveviruscheckingsoftware
installedonyourcomputer.
TheMacrodialogboxhasalistofmacrosinyourworkbook.Toviewthecode
behindamacro,youclickthemacrosnameandthenclickEdit.
ExcelmacrosarerecordedusingtheVisualBasicforApplicationsprogramminglan-
guage(VBA).Theprecedinggraphicshowsthecodeforamacrothathighlightscell
E6,changesthecellsformattingtobold,andthenrepeatstheprocessforcellE8.
Afterintroductoryinformationaboutthemacro(itsnameandwhenitwascreated),
thefirstlineofthemacroidentifiesthecellrangetobeselected(inthiscase,cellE6).
Afterthecellisselected,thenextlineofthemacrochangestheformattingofthe
selectedcelltobold,whichhasthesameresultasclickingacellandthenclickingthe
BoldbuttonontheFormattingtoolbar.Thenexttwolinesofthemacrorepeatthe
processforcellE8.
Toseehowthemacroworks,youcanopentheMacrodialogbox,clickthenameof
themacroyouwanttoexamine,andthenclickStepInto.TheMicrosoftVisualBasic
Editorappears,withahighlightaroundtheinstructionthatwillbeexecutednext.To
executeaninstruction,youpress(.Thehighlightmovestothenextinstruction,and
217
12
AutomatingRepetitiveTaskswithMacros
yourworksheetchangestoreflecttheactionthatresultedfromexecutingthepreced-
inginstruction.
Effectofpreviousinstruction
Nextinstruction
YoucanrunamacrowithoutstoppingaftereachinstructionbyopeningtheMacro
dialogbox,clickingthemacrotorun,andthenclickingRun. Usuallyyoullrunthe
macrothisway;afterall,thepointofusingmacrosistosavetime.
Inthisexercise,youexamineamacrointheMicrosoftVisualBasicEditor,move
throughthemacroonestepatatime,andthenrunthemacrowithoutstopping.
START:MicrosoftExcel.
1 OntheToolsmenu,pointtoMacroandthenclickSecurity.
TheSecuritydialogboxappears.
2 SelecttheMediumoptionbuttonandclickOK.
TheSecuritydialogboxdisappears.
3 OntheFilemenu,clickOpen,navigatetotheSBS\Excel\Macrosfolder,clickView,
andclickOpen.Ifnecessary,clickEnableMacrostoopentheworkbook.
218
AutomatingRepetitiveTaskswithMacros
12
4 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
5 IntheMacronamesection,clickHighlightandthenclickEdit.
TheMicrosoftVisualBasicEditoropens,withthecodefortheHighlightmacrodis-
playedintheModule1(Code)window.
6 ClicktheVisualBasicEditorClosebutton.
TheMicrosoftVisualBasicEditorcloses,andView.xlsreappears.
7 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
8 IntheMacronamesection,clickHighlightandthenclickStepInto.
TheMicrosoftVisualBasicEditoropens,withthefirstlineofthemacrohighlighted.
9 Right-clickthetaskbar,andthen,fromtheshortcutmenuthatappears,clickTile
WindowsVertically.
TheExcelandMicrosoftVisualBasicEditorwindowsappear.
10 ClicktheMicrosoftVisualBasicEditortitlebar,andthenpress(.
IntheMicrosoftVisualBasicEditor,thenextstepinthemacroishighlighted.
11 Press(.
IntheMicrosoftVisualBasicEditor,thenextstepinthemacroishighlighted.Inthe
Excelwindow,cellE6ishighlighted.
219
Microsoft
Office
Specialis
12
AutomatingRepetitiveTaskswithMacros
12 Press(.
IntheMicrosoftVisualBasicEditor,thenextstepinthemacroishighlighted.Inthe
Excelwindow,thevalueincellE6appearsinbold.
13 IntheMicrosoftVisualBasicEditor,clicktheClosebutton.ClickOKtoclosethedia-
Close
logboxthatappears.
Theeditorcloses.
14 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
15 Ifnecessary,intheMacronamesection,clickHighlight.
16 ClickRun.
TheMacrodialogboxdisappears,andExcelrunsthemacro.Thecontentsofcells
E6,E11,E18,F8,andF17appearinboldtype.
17 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:View.
CreatingandModifyingMacros
Thefirststepincreatingamacroistoplaneverystepoftheprocessyouwantto
automate.Computerstodayarequitefast,soaddinganextrastepthatdoesntaffect
theoutcomeofaprocesswontslowyoudownnoticeably,butleavingoutastep
meansyouwillneedtorerecordamacro.
Microsoft
Onceyouhaveplannedyourprocess,youcancreateamacrobypointingtoMacro
Office
Specialistt
ontheToolsmenuandthenclickingRecordNewMacro.Whenyoudo,theRecord
Macrodialogboxappears.
220
AutomatingRepetitiveTaskswithMacros
12
AfteryoutypethenameofyourmacrointheMacronamebox,clickOK.TheRecord
Macrodialogboxdisappears,andtheStopRecordingtoolbarappears.
StopRecording
YoucannowperformtheactionsyouwantExceltorepeatlater;whenyouredone,
clicktheStopRecordingbutton.TheStopRecordingtoolbardisappears,andyour
macroisaddedtothelistofmacrosavailableinyourworkbook.
Tomodifyanexistingmacro,youcanopenitintheMicrosoftVisualBasicEditor
andaddtoorchangethemacrosinstructions.Ifyourenotsurehowtowritethe
necessaryVBAcode,youcansimplydeletethemacroandrerecordit.Todeletea
macro,youopentheMacrodialogbox,clickthemacroyouwanttodelete,andthen
clickDelete.
Inthisexercise,yourecordamacrothatremovestheboldformattingfromfourcells
andthenmodifythemacrotoremovetheboldformattingfromafifthcell.
OPEN:RecordfromtheSBS\Excel\Macrosfolder.
1 Ifawarningdialogboxappears,clickEnableMacros.
2 OntheToolsmenu,pointtoMacroandthenclickRecordNewMacro.
TheRecordMacrodialogboxappears.
3 IntheMacronamebox,deletetheexistingname,andthentypeRemoveHighlight.
4 ClickOK.
TheStopRecordingtoolbarappears.
5 ClickcellE6,andthen,ontheFormattingtoolbar,clicktheBoldbutton.
6 ClickcellE11,andthen,ontheFormattingtoolbar,clicktheBoldbutton.
7 ClickcellE18,andthen,ontheFormattingtoolbar,clicktheBoldbutton.
8 ClickcellF8,andthen,ontheFormattingtoolbar,clicktheBoldbutton.
9 OntheStopRecordingtoolbar,clicktheStopRecordingbutton.
TheStopRecordingtoolbardisappears.
10 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
11 IntheMacronamesection,clickRemoveHighlightandthenclickEdit.
TheMicrosoftVisualBasicEditorappears.
Bold
221
12
AutomatingRepetitiveTaskswithMacros
Close
12 ClickattheendofthelinejustaboveEnd Sub,pressF,andtype
Range("F17").Select.
ThismacrostatementselectscellF17.
Tip TogetmoreinformationaboutVisualBasicforApplications,typeVBAinthe
AskAQuestionboxontheStandardtoolbarandclickGetHelpforVisualBasicfor
Applicationsfromthelistofhelptopicsthatappears.
13 TypeSelection.Font.Bold=False,andthenpressF.
Thismacrostatementremovesboldformattingfromtheselectedcell(F17).
14 OntheStandardtoolbar,clicktheSavebuttontosaveyourchange.
15 ClicktheClosebuttonoftheMicrosoftVisualBasicwindow.
TheMicrosoftVisualBasicEditordisappears,andRecord.xlsappears.
16 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
17 ClickHighlight,andthenclickRun.
ThecontentsofcellsE6,E11,E18,F8,andF17appearinboldtype.
18 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
19 ClickRemoveHighlight,andthenclickRun.
ThecontentsofcellsE6,E11,E18,F8,andF17appearinregulartype.
20 OntheStandardtoolbar,clicktheSavebuttontosaveyourchanges.
CLOSE:Record.
222
Microsoft
Office
Specialis
AutomatingRepetitiveTaskswithMacros
12
CreatingaToolbartoHoldMacros
Microsoft
AlthoughyoucanrunanyofyourmacrosfromtheMacrodialogbox,theabilityto
Office
Specialistt
runamacrobyclickingatoolbarbuttonmakesyourworksheetsmucheasiertouse,
especiallyforcolleagueswithrelativelylittleexperienceusingExcel.Tocreateatool-
bartohostyourmacros,ontheToolsmenu,clickCustomizetoopentheCustomize
dialogbox.
Important TheCustomizedialogboxmustbeopenforyoutobeabletochangeany
ofyourtoolbarsormenus.
TocreateatoolbarintheCustomizedialogbox,youdisplaytheToolbarstabpageand
thenclickNew.TheNewToolbardialogboxappears;typeanameforyournewtool-
barinthespaceprovided,andthenclickOK.Yournewtoolbarappearsnexttothe
Customizedialogbox.
Onceyouhavecreatedthenewtoolbar,youcanassignyourmacrostoit.Todoso,
youdisplaytheCommandstabpageoftheCustomizedialogbox.
OntheCommandstabpage,youpickMacrosfromthelistofoptionsintheCategories
list.TwoitemswillappearintheCommandslist:CustomMenuItemandCustomButton.
Toaddabuttontoyournewtoolbar,dragtheCustomButtonitemtothetoolbar.
223
12
AutomatingRepetitiveTaskswithMacros
Tip Whenyourbuttonisoveraplacewhereitcanbedropped,theindicatoratthe
lowerrightofyourmousepointerchangestoaplussign.
Afteryouhaveaddedthebuttontoyourtoolbar,youcanassignthemacrothatthe
buttonwillrunbyright-clickingthebuttonandthen,fromtheshortcutmenuthat
appears,clickingAssignMacro.TheAssignMacrodialogboxappears;clickthemacro
youwanttorunwhenthetoolbarbuttonisclicked,andthenclickOK.
Afteryoucreateatoolbar,Excelwilldisplayitwheneveryouopentheworkbookin
whichitwascreated.Ifyouwant,youcanhideyourtoolbarsothatonlyyouand
colleagueswhoknowthetoolbarexistscanuseit.Right-clickinganytoolbarshowsa
shortcutmenuwiththenamesoftoolbarsavailableintheactiveworkbooktoolbars
currentlydisplayedhaveacheckmarknexttotheirname.Tohideatoolbar,click
itsnametoremovethecheckmark.Youcanalwaysredisplaythetoolbarbyright-
clickinganytoolbarandclickingthetoolbarsnamefromthelistthatappears.
Ifyouremovethemacrosyouvecreatedfromyourworkbook,orifyoudontwant
tomakethemacrosavailableonatoolbar,youcandeletethetoolbarfromthe
Customizedialogbox.Todoso,clickthetoolbaryouwanttodeleteintheToolbars
listandthenclickDelete.
Warning Becareful!YoucandeleteanyExceltoolbar.Ifyouaccidentallydeletea
toolbarfromthedefaultset,youwillhavetoreinstallExceltorestoreit.
Ifyoulike,youcancustomizethebuttonyouusetorepresentyourmacro.To
changetheappearanceofatoolbarbutton,youopentheCustomizedialogbox,right-
clickthebuttonyouwanttochange,andthen,fromtheshortcutmenuthatappears,
pointtoChangeButtonImagetodisplayasetofimagesyoucanuseforyourbutton.
224
AutomatingRepetitiveTaskswithMacros
12
Inthisexercise,youcreateatoolbartoholdyourmacro,createabuttontorepresent
themacroonthetoolbar,runthemacrofromthetoolbar,andthendeletethetoolbar.
OPEN:ToolbarfromtheSBS\Excel\Macrosfolder.
1 Ifawarningdialogboxappears,clickEnableMacros.
2 OntheToolsmenu,clickCustomize.
TheCustomizedialogboxappears.
3 Ifnecessary,clicktheToolbarstabtodisplaytheToolbarstabpage.
4 ClickNew.
TheNewToolbardialogboxappears.
5 IntheToolbarnamebox,typeCustomMacrosandthenclickOK.
AnewtoolbarnamedCustomMacrosappearsintheworkbookwindow;thetoolbar
isalsolistedintheToolbarslistoftheCustomizedialogbox.
6 IntheCustomizedialogbox,clicktheCommandstab.
TheCommandstabpageappears.
7 IntheCategorieslist,clickMacros.
TheCommandslistchangestoreflectyourchoice.
8 DragtheCustomButtoncommandtotheCustomMacrostoolbar.
TheCustombuttonappearsontheCustomMacrostoolbar.
9 OntheCustomMacrostoolbar,right-clicktheCustombuttonandthen,fromthe
shortcutmenuthatappears,clickName.
ThetextnexttotheNamemenuitemishighlighted.
10 TypeHighlight,andthenpressF.
Themenudisappears,andyourbuttonisnownamedHighlight.
11 OntheCustomMacrostoolbar,right-clicktheHighlightbutton,pointtoChangebut-
tonimageontheshortcutmenuthatappears,andthenclicktheUpArrowbutton
image.
225
Microsoft
Office
Specialis
12
AutomatingRepetitiveTaskswithMacros
TheHighlightbuttonimagechangestoanuparrow.
12 OntheCustomMacrostoolbar,right-clicktheHighlightbuttonandthen,fromthe
shortcutmenuthatappears,clickAssignMacro.
TheAssignMacrodialogboxappears.
13 ClickHighlightandthenclickOK.
TheAssignMacrodialogboxdisappears.ClickingtheHighlightbuttononthe
CustomMacrostoolbarwhentheCustomizedialogboxisclosedwillnowrunthe
Highlightmacro.
14 IntheCustomizedialogbox,clickClose.
TheCustomizedialogboxdisappears.
15 OntheCustomMacrostoolbar,clicktheHighlightbutton.
TheHighlightmacroruns.ThecontentsofcellsE6,E11,E18,F8,andF17appear
inboldtype.
16 Right-clickthetitlebaroftheCustomMacrostoolbar,andthen,fromtheshortcut
menuthatappears,clickCustomMacros.
TheCustomMacrostoolbardisappears.
17 OntheToolsmenu,clickCustomize.
TheCustomizedialogboxappears.
18 Ifnecessary,clicktheToolbarstab.
19 IntheToolbarslist,clickCustomMacros,clickDelete,andthenclickOKinthe
warningdialogboxthatappears.
Thetoolbarisdeleted.
20 ClickClosetoclosetheCustomizedialogbox.
21 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Toolbar.
CreatingaMenutoHoldMacros
Microsoft
Aswithtoolbars,youcancreatecustommenustoholdyourmacros.Tocreateacus-
Office
Specialistt
tommenu,youopentheCustomizedialogboxtotheCommandspageandthen,inthe
Categorieslist,clickNewMenu.TheNewMenuoptionappearsintheCommandslist.
226
AutomatingRepetitiveTaskswithMacros
12
Toaddthenewmenutoanexistingmenubarortoolbar,youdragtheNewMenu
commandfromtheCustomizedialogboxtothedesiredspot.
Note Whenyourmenuisoveraplacewhereitcanbedropped,theindicatoratthe
lowerrightofyourmousepointerchangestoaplussign.
Oncethemenuisinplace,youcanrenameitandadditemstoit.Youcanrenamea
menubyright-clickingthemenuheadandchoosingNamefromtheshortcutmenu
thatappears.Theshortcutmenuwillstayopen,andthemenusnamewillbehigh-
lighted.JusttypethenewnameandpressFtorenameyourmenu.
Toaddamacrotoamenu,clicktheMacrositemintheCategorieslistoftheCustom-
izedialogboxtodisplaythemacrosavailableinthecurrentworkbook.Whenyou
addamacrotoamenu,youneedtocreateanewmenuitemandthenassignthe
macrotothenewitem.Youcanaddanewmenuitemtoamenubyclickingthe
MacrositemintheCategorieslistandthen,fromtheCommandslist,draggingCustom
MenuItemtoyourmenu.
WhenyougetCustomMenuItemtothemenu,holdthemousepointeroverthemenu
headuntilasmallgrayboxappearsbelowthemenuhead.
Dragthemousepointertothatgrayboxtoaddtheitemtothemenu.Onceyouhave
addedtheitemtothemenu,youcanrenameitbyright-clickingit,choosingName
fromtheshortcutmenuthatappears,andthentypingthenameinthespacepro-
vided.Toassignamacrotothemenuitem,right-clickthemenuitem,chooseAssign
227
12
AutomatingRepetitiveTaskswithMacros
Macrofromtheshortcutmenuthatappears,andthenchoosethemacrointheAssign
Macrodialogbox.
Whetheryoucreateatoolbaroramenuisentirelyuptoyoubecausethereisno
functionaldifferencebetweenrunningamacrobyclickingatoolbarbuttonandclick-
ingamenuitem.Remember,clickingtheSavebuttonontheStandardtoolbarand
clickingSaveontheFilemenuperformthesametask!
Ifyouremovethemacrosyouvecreatedfromyourworkbook,orifyoudontwant
tomakethemacrosavailableonamenu,youcandeletethemenuwhiletheCustom-
izedialogboxisopen.Todoso,right-clickthemenuheadandthen,fromtheshort-
cutmenuthatappears,clickDelete.Ifyouwanttodeleteamenuitem,butnotthe
entiremenu,right-clicktheitemandclickDelete.
Warning Becareful!YoucandeleteanyExcelmenu.Ifyouaccidentallydeletea
menufromthedefaultset,youwillhavetoreinstallExceltorestoreit.
Inthisexercise,youcreateandnameamenu,addanitemtothatmenuandname
theitem,andthenassignamacrotoberunwhenthemenuitemisclicked.Youthen
deletethecustommenu.
OPEN:MenufromtheSBS\Excel\Macrosfolder.
1 Ifawarningdialogboxappears,clickEnableMacros.
2 OntheToolsmenu,clickCustomize.
TheCustomizedialogboxappears.
3 Ifnecessary,clicktheCommandstabtodisplaytheCommandstabpage.
4 IntheCategorieslist,clickNewMenu.
NewMenuappearsintheCommandslist.
5 DragNewMenutotheendofthemainmenubar.
Aninsertionpointappearsatthepositiononthemainmenubarwherethenew
menuwillbeinserted.Whenyoureleasethemousebutton,thenewmenuappears
onthemainmenubar.
6 Right-clicktheNewMenuheading,andthen,fromtheshortcutmenuthatappears,
clickName.
Theshortcutmenustaysopen,withthenewmenusnamehighlightedontheshort-
cutmenu.
7 TypeCustomMacros,andthenpressF.
228
AutomatingRepetitiveTaskswithMacros
12
ThenewmenusnamechangestoCustomMacros.
8 IntheCategorieslistoftheCustomizedialogbox,clickMacros.
ThecontentsoftheCommandslistchangetoreflectyourchoice.
9 IntheCommandslist,dragtheCustomMenuItemcommandtotheCustomMacros
menuhead.WhenaboxappearsundertheCustomMacrosmenuhead,drag
CustomMenuItemontoit.
TheCustomMenuItemcommandappearsontheCustomMacrosmenu.
10 OntheCustomMacrosmenu,right-clickCustomMenuItemandthen,fromthe
shortcutmenuthatappears,clickName.
Theshortcutmenustaysopen,withthemenuitemsnamehighlightedontheshort-
cutmenu.
11 TypeHighlight,andthenpressF.
ThenameofthemenuitemchangestoHighlight.
12 OntheCustomMacrosmenu,right-clickHighlightandthen,fromtheshortcutmenu
thatappears,clickAssignMacro.
TheAssignMacrodialogboxappears.
13 IntheMacronamebox,clickHighlightandthenclickOK.
ExcelassignstheHighlightmacrototheselectedmenuitemandclosestheAssign
Macrodialogbox.
14 ClickClosetoclosetheCustomizedialogbox.
15 OntheCustomMacrosmenu,clickHighlight.
TheHighlightmacroruns.ThecontentsofcellsE6,E11,E18,F8,andF17appear
inboldtype.
16 OntheToolsmenu,clickCustomize.
TheCustomizedialogboxappears.
17 Right-clicktheCustomMacrosmenuhead,andthen,fromtheshortcutmenuthat
appears,clickDelete.
TheCustomMacrosmenuisdeleted.
229
Microsoft
Office
Specialis
12
AutomatingRepetitiveTaskswithMacros
18 IntheCustomizedialogbox,clickClose.
TheCustomizedialogboxdisappears.
19 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Menu.
RunningaMacroWhenaWorkbookIsOpened
Microsoft
OneadvantageofwritingExcelmacrosinVBAisthatyoucanhaveExcelruna
Office
Specialistt
macrowheneveraworkbookisopened.Forexample,ifyouuseaworksheetforpre
sentations,youcancreatemacrosthatrenderthecontentsofselectedcellsinbold
type,italics,ordifferenttypefacestosetthedataapartfromdatainneighboringcells.
Ifyoushouldcloseaworkbookwithoutremovingthatformatting,however,thecon-
tentsofyourworkbookwillhavehighlightswhenyouopenit.Whilethisisnota
catastrophe,returningtheworkbooktoitsoriginalformattingwilltakeonlyafew
secondstoaccomplish.
Ratherthanrunamacrobyhand,orevenfromatoolbarbuttonoramenu,youcan
haveExcelrunamacrowheneveraworkbookisopened.Thetricktomakingthat
happenisinthenameyougivethemacro.WheneverExcelfindsamacrowitha
namestartingwithAuto_(Autofollowedbyanunderscore),itrunsthemacrowhen
theworkbooktowhichitisattachedisopened.
Inthisexercise,youcreateamacrothatwillrunwheneversomeoneopensthework-
booktowhichitisattached.
OPEN:RunOnOpenfromtheSBS\Excel\Macrosfolder.
1 Ifawarningdialogboxappears,clickEnableMacros.
RunOnOpen.xlsopens.NoticethatthecontentsofcellsE6,E11,E18,F8,andF17
appearinbold.
2 OntheToolsmenu,pointtoMacroandthenclickRecordNewMacro.
TheRecordMacrodialogboxappears.
3 IntheMacronamebox,typeAuto_OpenandthenclickOK.
TheRecordMacrodialogboxdisappears,andtheStopRecordingtoolbarappears.
4 SelectthecellrangeD6:O36,andthen,ontheFormatmenu,clickCells.
TheFormatCellsdialogboxappears.
5 Ifnecessary,clicktheFonttab.
6 IntheFontstylebox,clickRegularandthenclickOK.
TheFormatCellsdialogboxdisappears,andthecontentsofcellsE6,E11,E18,
F8,andF17appearinregulartype.
230
AutomatingRepetitiveTaskswithMacros
12
StopRecording
Save
Close
7 OntheStopRecordingtoolbar,clicktheStopRecordingbutton.
Excelstopsrecordingyourmacro,andtheStopRecordingtoolbardisappears.
8 OntheToolsmenu,pointtoMacroandthenclickMacros.
TheMacrodialogboxappears.
9 ClickHighlight,andthenclickRun.
ThecontentsofcellsE6,E11,E18,F8,andF17appearinboldtype.
10 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
11 ClicktheClosebuttontocloseRunOnOpen.xls.
12 OpentheFilemenu,andthenclickRunOnOpen.xls.Ifawarningdialogboxappears,
clickEnableMacros.
RunOnOpen.xlsopens,withthecontentsofcellsE6,E11,E18,F8,andF17
appearinginregulartype.
13 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
14 ClicktheClosebuttontocloseRunOnOpen.xls.
KeyPoints
Macrosarehandytoolsyoucanusetoperformrepetitivetasksquickly,suchas
insertingblocksoftext.
Youdonthavetobeaprogrammertousemacros;youcanrecordyouractions
andhaveExcelsavethemasamacro.
Alwayskeepcontroloverwhetheryouwanttoenablemacrosinaparticular
workbookbysettingyoursecurityleveltoMediumorHigh.
Ifyourecuriousaboutwhatamacrolookslike,youcandisplayitintheVisual
BasicEditor.IfyouknowalittleVBA,orifyoujustwanttoexperiment,feel
freetomodifythemacrocodeandseewhathappens.
Youcancreatetoolbarbuttonsormenuitemsthat,whenclicked,willruna
macro.
StartingamacronamewithAuto_tellsExceltorunthemacrowhenitopens
theworkbooktowhichthemacroisattached.
231
Chapter 13 at a Glance
InsertanExcelchart
intoanotherdocument,
page243
StoreanExceldocumentas
partofanotherOfficedocument,
page237
IncludeanOffice
documentinaworksheet,
page234
Createahyperlink,
page239
232 Chapter 13 at a Glance
13
WorkingwithOther
MicrosoftOffice
Programs
Inthischapteryouwilllearnto:
IncludeanOfficedocumentinaworksheet.
StoreanExceldocumentaspartofanotherOfficedocument.
Createahyperlink.
PasteanExcelchartintoanotherdocument.
Byitself,MicrosoftExcelisapowerfulprogramthatgivesyouabroadrangeoftools
sothatyoucanstore,present,andsummarizeyourfinancialdata.OtherMicrosoft
Officeprogramsextendyourcapabilitiesevenfurther,lettingyoucreatedatabases,
presentations,writtenreports,andcustomWebpagesthroughwhichyoucanorga
nizeandcommunicateyourdatainprintandovernetworks.
AtremendousbenefitofExcelbeingpartoftheOffice2003suiteisthattheprograms
caninteractinmanyusefulways.Forexample,youcanincludeafilecreatedwith
anotherOfficeprograminanExcelworksheet.IfyouuseMicrosoftWordtowritea
quicknoteonwhytoolsalesincreasedsignificantlyinJanuary,youcanincludethe
reportinyourworkbook.Similarly,youcanincludeyourExcelworkbooksindocu
mentscreatedwithotherOfficeprograms.Ifyouwanttocopyonlypartofawork-
book,suchasachart,toanotherOfficedocument,youcandothataswell.
OneofthehallmarksoftheWorldWideWebisthehyperlink,orconnectionfroma
documenttoaplaceinthesamefileortoanotherfileanywhereonanetworkthe
userscomputercanreach.YoucancreatehyperlinksinExceldocuments,connecting
toothercellsorworksheetsintheactiveworkbook,tootherOfficefilesanywhereon
yourcomputer,ortofilesanywhereelseonyourcompanysintranetortheInternet.
Inthischapter,youlllearnhowtoincludeanOfficedocumentinaworksheet,store
anExcelworkbookaspartofanotherOfficedocument,createhyperlinks,andpaste
anExcelchartintoanotherdocument.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpageslviilviii.
233
13
WorkingwithOtherMicrosoftOfficePrograms
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
IncludinganOfficeDocumentinanExcelWorksheet
AbenefitofworkingwithExcelisthat,becauseExcelispartoftheMicrosoftOffice
programsuite,itispossibletocombinedatafromExcelandotherOfficeprogramsto
createinformativepresentations.JustlikecombiningdatafrommorethanoneExcel
document,combininginformationfromotherOfficefileswithanExcelworkbook
entailseitherpastinganotherOfficedocumentintoanExcelworkbookorcreatinga
linkbetweenaworkbookandtheotherdocument.
TherearetwoadvantagestocreatingalinkbetweenyourExcelworkbookand
anotherfile.Thefirstbenefitisthatlinkingtotheotherfile,asopposedtocopying
theentirefileintoyourworkbook,keepsyourExcelworkbooksmall.Ifthework-
bookiscopiedtoanotherdriveorcomputer,youcanmaintainthelinkbycopying
thelinkedfilealongwiththeExcelworkbook,re-creatingthelinkifthelinkedfileis
onthesamenetworkastheExcelworkbook.Itisalsopossibletousetheworkbook
withoutthelinkedfile.Thesecondbenefitoflinkingtoanotherfileisthatany
changesinthefiletowhichyoulinkwillbereflectedinyourExcelworkbook.
Tip Usually,youmustcloseandreopenyourExcelworkbookforanychangesinthe
linkeddocumenttoappearinyourworkbook.Theexceptiontothisruleoccurswhenyou
openthefileforeditingfromwithinyourExcelworkbook(asdiscussedlaterinthischapter).
YoucreatealinkbetweenanExcelworkbookandanotherOfficedocumentbyclick
ingObjectontheInsertmenutodisplaytheObjectdialogbox.OncetheObjectdialog
boxappears,clicktheCreatefromFiletab.
234
WorkingwithOtherMicrosoftOfficePrograms
13
TheCreatefromFiletabpageappears.ClickingtheBrowsebuttonopenstheBrowse
dialogbox,fromwhichyoucannavigatetothefolderwiththefileyouwanttolink
toExcel.Onceyoulocatethefile,double-clickingitclosestheBrowsedialogboxand
addsthefilesnameandpathtotheFilenameboxoftheObjectdialogbox.Tocreate
alinktothefile,selecttheLinktofilecheckboxandclickOK.Thefileappearsin
yourworkbook.
Ifyouwanttolinkafiletoyourworkbookbutdontwantthefilesimagetotakeup
muchspaceonthescreen,youcanalsoselecttheDisplayasiconcheckbox.After
youselectthefileandclickOK,thefilewillberepresentedbythesameiconusedto
representitinMyComputer.
OnceyouhavelinkedafiletoyourExcelworkbook,youcaneditthefilebyright-
clickingitsimageinyourworkbookandthen,fromtheshortcutmenuthatappears,
pointingtoPresentationObjectandclickingEdit.Thefilewillopeninitsnativeappli
cation(inthiscase,MicrosoftPowerPoint).Whenyouredoneeditingthefile,your
changeswillbereflectedinyourworkbook.
Note Thespecificmenuitemyoupointtochangestoreflecttheprogramusedtocre-
atethefiletowhichyouwanttolink.ForaWorddocument,forexample,themenuitem
youpointtoisDocumentObject.
Inthisexercise,youlinkaPowerPointpresentationshowingayearlybusinesssum
marytoanExcelworkbookandtheneditthepresentationfromwithinExcel.
Important YoumusthavePowerPointinstalledonyourcomputertocompletethis
exercise.
OPEN:IncludefromtheSBS\Excel\OtherProgramsfolder.
1 OntheInsertmenu,clickObject.
TheObjectdialogboxappears.
2 ClicktheCreatefromFiletabtodisplaytheCreatefromFiletabpage.
3 ClickBrowse.
TheBrowsedialogboxappears.
4 NavigatetotheOtherProgramsfolder,anddouble-clickYearEndSummary.ppt.
TheBrowsedialogboxcloses,andtheObjectdialogboxreappears.
235
13
WorkingwithOtherMicrosoftOfficePrograms
5 SelecttheLinktofilecheckbox,andthenclickOK.
Excelcreatesalinktotheexternalfile,andthefileappearsintheworkbook.
Tip Addingthelinkmeansthatchangesintheexternalfilewillbereflectedin
theworksheet.
6 Right-clickthepresentation,andthen,fromtheshortcutmenuthatappears,point
toPresentationObjectandthenclickEdit.
ThepresentationopensinaPowerPointwindow.
7 ClickYear2000Summary.
ThetextboxcontainingYear 2000 Summaryisactivated.
8 Clicktotheleftofthetextinthebox,andtypeCalendar.
9 OntheStandardtoolbar,clicktheSavebutton.
Save PowerPointsavesyourchanges.
10 ClicktheClosebutton.
Close PowerPointcloses,andyourchangeisreflectedinInclude.xls.
11 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Include.
236
WorkingwithOtherMicrosoftOfficePrograms
13
StoringanExcelDocument
asPartofAnotherOfficeDocument
Intheprecedingsectionofthischapter,youlearnedhowtolinktoanotherfilefrom
withinyourExcelworkbook.Theadvantagesoflinkingtoanotherfilearethatthesize
ofyourworkbookiskeptsmallandthatanychangesinthedocumenttowhichyou
linkwillbereflectedinyourworkbook.Thedisadvantageisthatthelinkeddocument
mustbecopiedalongwiththeworkbook,oratleastbeonanetwork-accessiblecom
puter.IfExcelcantfindoraccessthefilewherethelinksaysitislocated,Excelwont
beabletodisplayit.
Iffilesizeisntanissueandyouwanttoensurethattheotherdocumentwillalways
beavailable,youcanembedthefileinyourworkbook.Embeddinganotherfileinan
Excelworkbookmeansthattheentiretyoftheotherfileissavedaspartofyour
workbook.Whereveryourworkbookgoes,theembeddedfilegoesalongwithit.Of
course,thisfileisnolongerconnectedtotheoriginalfile,sochangesinonearent
reflectedintheother.
Important Toviewtheembeddedfile,youwillneedtohavetheprogramusedto
createitinstalledonthecomputerwhereyouopentheworkbook.
YoucanembedafileinanExcelworkbookbyfollowingtheproceduredescribedin
theprecedingsection,withtheexceptionthattheLinktofilecheckboxshouldnotbe
selected.
ItisalsopossibletoembedyourExcelworkbooksinotherOfficedocuments.In
PowerPoint,forexample,youcanembedanExcelfileinapresentationbyclicking
ObjectonthePowerPointInsertmenutodisplaytheInsertObjectdialogbox.
WhentheInsertObjectdialogboxappears,selecttheCreatefromfileoptionbutton.
Toidentifythefileyouwanttoembed,clicktheBrowsebuttonandthen,inthe
Browsedialogboxthatappears,navigatetothefolderwherethefileisstoredand
237
13
WorkingwithOtherMicrosoftOfficePrograms
double-clickit.TheBrowsedialogboxdisappears,andthefileappearsintheFile
namebox.ClickOKtoembedyourworkbookinthepresentation.
Ifyouwanttoembedaworkbookinafilecreatedwithanotherprogrambutdont
wanttheworksheettotakeupmuchspaceonthescreen,youcanselecttheDisplay
asiconcheckbox.AfteryouselectthefiletoembedandclickOK,thefilewillberep
resentedbythesameiconusedtorepresentitinMyComputer.Double-clickingthe
iconopenstheembeddeddocumentinitsoriginalapplication.
ToedittheembeddedExcelworkbook,right-clicktheworkbook(ortheiconrepre
sentingit)andthen,fromtheshortcutmenuthatappears,pointtoWorksheetObject
andclickEdit.Theworkbookopensforediting.Whenyouaredonemakingyour
changes,youcanclickanywhereoutsidetheworkbooktoreturntothepresentation.
Inthisexercise,youembedanExcelworkbookcontainingsalesdatainaPowerPoint
presentationandthenchangetheformattingoftheworkbookfromwithinPowerPoint.
Important YoumusthavePowerPointinstalledonyourcomputertocompletethis
exercise.
1 Double-clickMyComputer,andnavigatetotheC:\SBS\Excel\OtherPrograms
directory.
ThecontentsoftheC:\SBS\Excel\OtherProgramsdirectoryappear.
2 Double-clickWorksheet.ppt.
Worksheet.pptopens.
3 OntheInsertmenu,clickObject.
TheInsertObjectdialogboxappears.
4 SelecttheCreatefromfileoptionbutton.
TheInsertObjectdialogboxchangestoreflectyourchoice.
5 ClicktheBrowsebutton.
TheBrowsedialogboxappears.
6 NavigatetotheC:\SBS\Excel\OtherProgramsdirectory,andthendouble-click
SalesByCategory.xls.
TheBrowsedialogboxcloses,andC:\SBS\Excel\OtherPrograms\
SalesByCategory.xlsappearsintheFilebox.
7 ClickOK.
TheworksheetthatwasactivewhenSalesByCategory.xlswaslastclosedappears
inthepresentation.
238
Microsoft
Office
Specialis
WorkingwithOtherMicrosoftOfficePrograms
13
8 Right-clicktheworksheet,andthen,fromtheshortcutmenuthatappears,pointto
WorksheetObjectandthenclickEdit.
Theworkbookopensforediting.
9 SelectcellsD15:H15,andthen,ontheFormattingtoolbar,clicktheBoldbutton.
ThecontentsofcellsD15:H15appearwithoutboldformatting.
10 Clickanyblankspotonthepresentationtodeactivatetheincludedworkbook.
11 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Worksheet.pptandPowerPoint.
CreatingaHyperlink
Microsoft
OneofthehallmarksoftheWorldWideWebisthatdocumentspublishedonthe
Office
Specialistt
Webcanhavereferences,orhyperlinks,topointsinthesamedocumentortoother
Webdocuments.Ahyperlinkfunctionsmuchlikealinkbetweentwocellsor
betweentwofiles,buthyperlinkscanreachanycomputerontheWeb,notjustthose
onacorporatenetwork.Hyperlinksthathaventbeenclickedusuallyappearas
underlinedbluetext,andfollowedhyperlinksappearasunderlinedpurpletext,but
thosesettingscanbechanged.
239
13
WorkingwithOtherMicrosoftOfficePrograms
Tocreateahyperlink,right-clickthecellinwhichyouwanttoinsertthehyperlink
andthen,fromtheshortcutmenuthatappears,clickHyperlink.TheInsertHyperlink
dialogboxappears.
Tip YoucanalsoopentheInsertHyperlinkdialogboxbypressingH+k.
Youcanchooseoneoffourtypesoftargetsforyourhyperlink:anexistingfileor
Webpage,aplaceinthecurrentdocument,anewdocumentyoucreateonthespot,
orane-mailaddress.
Tip ThedefaulttargetfortheInsertHyperlinkdialogboxisanexistingfileorWeb
page.
TocreateahyperlinktoanotherfileorWebpage,youcanusetheLookinboxsnav
igationtooltolocatethefile.IfyourecentlyopenedthefileorWebpagetowhich
youwanttolink,youcanclickeithertheBrowsedPagesortheRecentFilesbuttonto
displaytheWebpagesorfilesinyourHistorylist.
IfyouwanttocreateahyperlinktoanotherplaceinthecurrentExcelworkbook,you
clickthePlaceinThisDocumentbuttontodisplayalistofavailabletargetsinthecur-
rentworkbook.
240
WorkingwithOtherMicrosoftOfficePrograms
13
Toselecttheworksheettowhichyouwanttorefer,youclicktheworksheetnamein
theOrselectaplaceinthisdocumentbox.Whenyoudo,a3-Dreferencewiththename
oftheworksheetandcellA1onthatworksheetappearsintheTexttodisplaybox.
Ifyouwanttorefertoaspecificcellonaworksheet,clicktheworksheetsnamein
theOrselectaplaceinthisdocumentbox,andthenchangethecellreferenceinthe
Typethecellreferencebox.
Youcanalsocreatehyperlinksthatgeneratee-mailmessagestoanaddressofyour
choice.Tocreatethistypeofhyperlink,whichiscalledamailtohyperlink,clickthe
E-mailAddressbutton.
Inthedialogboxthatappears,youcantypetherecipientse-mailaddressinthe
E-mailaddressboxandthesubjectlineformessagessentviathishyperlinkinthe
Subjectbox.
Tip IfyouuseOutlookorOutlookExpressasyoure-mailprogram,alistofrecently
usedaddresseswillappearintheRecentlyusede-mailaddressesbox.Youcaninsertany
ofthoseaddressesintheE-mailaddressboxbyclickingtheaddress.
241
13
WorkingwithOtherMicrosoftOfficePrograms
Whenthehyperlinkisclicked,theusersdefaulte-mailprogramwillopenandanew
e-mailmessagewillbecreated.Thee-mailwillbeaddressedtotheaddressyou
enteredintheE-mailaddressboxandthesubjectwillbesettothetextyoutypedin
theSubjectbox.
Regardlessofthetypeofhyperlinkyoucreate,youcanspecifythetextyouwantto
representthehyperlinkinyourworksheet.YoutypethattextintheTexttodisplay
box.WhenyouclickOK,thetextyoutypetherewillappearinyourworksheet,for-
mattedasahyperlink.
Tip IfyouleavetheTexttodisplayboxempty,theactuallinkwillappearinyour
worksheet.
Youcaneditanexistinghyperlinkbyclickingthecellcontainingthehyperlinkand
then,fromtheshortcutmenuthatappears,clickingEditHyperlink.Youcanalsoclick
OpenHyperlinktogotothetargetdocumentorcreateanewe-mailmessage,orclick
RemoveHyperlinktodeletethehyperlink.
Tip Ifyoudeleteahyperlinkfromacell,thetextfromtheTexttodisplayboxremains
inthecell,butitnolongerfunctionsasahyperlink.
Inthisexercise,youcreateahyperlinktoanotherdocumentandthenasecond
hyperlinktoadifferentlocationinthecurrentworkbook.
OPEN:HyperlinkfromtheSBS\Excel\OtherProgramsfolder.
1 Right-clickcellD17,andthen,fromtheshortcutmenuthatappears,click
Hyperlink.
TheInsertHyperlinkdialogboxappears.
2 Ifnecessary,clicktheExistingFileorWebPagebutton.
3 NavigatetotheC:\SBS\Excel\OtherProgramsfolder.
4 ClickProductList.xls.
5 IntheTexttodisplaybox,typeProductListandthenclickOK.
AhyperlinkwiththetextProduct ListappearsincellD17.
242
WorkingwithOtherMicrosoftOfficePrograms
13
6 Right-clickcellI2,andthen,fromtheshortcutmenuthatappears,clickHyperlink.
TheInsertHyperlinkdialogboxappears.
7 ClickthePlaceinThisDocumentbutton.
TheInsertHyperlinkdialogboxchangestoreflectyourchoice.
8 IntheOrselectaplaceinthisdocumentbox,clickJanuary.
9 IntheTexttodisplaybox,typeJanuarydetailsandthenclickOK.
AhyperlinkwiththetextJanuary detailsappearsincellI2.
10 Right-clickcellI2,andclickEditHyperlink.
TheEditHyperlinkdialogboxappears.
11 IntheTexttodisplaybox,typeJanuarysalesandthenclickOK.
ThetextdisplayedincellI2changestoJanuary sales.
12 ClickthehyperlinkincellI2.
TheJanuaryworksheetappears.
13 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Hyperlink.
PastingaChartintoAnotherDocument
Afinalwaytoincludeobjectsfromoneworkbookinanotherworkbookistocopy
theobjectyouwanttoshareandthenpasteitintoitsnewlocation.Oneobjecttype
forwhichthisabilityisparticularlyhandyischartimages.Youcouldcopythework-
sheetwiththedatausedforachartandthenre-createthechartinitsnewlocation,
butifyoujustwanttocopytheimageofthechartinitscurrentformtoanotherdoc
ument,simplyright-clickthechartimage,clickCopyfromtheshortcutmenuthat
appears,andthenpastetheimageintotheotherdocument.
243
13
WorkingwithOtherMicrosoftOfficePrograms
Inthisexercise,youcopyachartimagecontainingsalesinformationtotheClipboard
andpastetheimageintoaPowerPointpresentation.
OPEN:PasteChartfromtheSBS\Excel\OtherProgramsfolder.
1 Right-clickablankspotonthechart,andthen,fromtheshortcutmenuthat
appears,clickCopytocopythechartimagetotheClipboard.
2 OntheWindowsdesktop,double-clickMyComputer,navigatetothe
C:\SBS\Excel\OtherProgramsdirectory,andthendouble-clickChartTarget.ppt.
ChartTarget.pptopensinPowerPoint.
3 Right-clickablankspotontheactiveslide,andfromtheshortcutmenuthat
appears,clickPaste.
Thechartappearsontheslide.
4 OntheStandardtoolbar,clicktheSavebuttontosavethepresentation.
5 InPowerPoint,opentheFilemenuandclickExit.
PowerPointcloses.
6 InPasteChart.xls,ontheStandardtoolbar,clicktheSavebuttontosaveany
changes.
CLOSE:PasteChart.
244
WorkingwithOtherMicrosoftOfficePrograms
13
KeyPoints
Excelisaversatileprogram.YoucanexchangedatabetweenExcelandquitea
fewotherprogramsinjustafewsteps.
OnebenefitofExcelbeingpartoftheOfficeprogramsuiteisthatyoucan
embedExcelworksheetsinotherOfficedocuments,andembedotherOffice
documents(suchasPowerPointpresentations)inExcelworkbooks.
ExcelworkssmoothlywiththeWeb;addinghyperlinkstoWebpages,other
documents,orspecificlocationsinthecurrentworkbookispossiblethrough
theInsertHyperlinkdialogbox.
Onceyouvecreatedahyperlink,youcanchangeanypartofit.
ExcelisprobablytheeasiestOfficeprograminwhichtocreatecharts.Once
youvecreatedachartinExcel,youcanpasteitdirectlyintoanotherOffice
document.
245
Chapter 14 at a Glance
Summarizedatausing
databasefunctions,
page257
Retrievedatafrom
adatabase,
page251
Lookupinformation
inadatalist,
page248
246 Chapter 14 at a Glance
14
Workingwith
DatabaseData
Inthischapteryouwilllearnto:
Lookupinformationinadatalist.
Retrievedatafromadatabase.
Summarizedatausingdatabasefunctions.
AlloftheprogramsintheMicrosoftOffice2003suiteworkwelltogether,buttwopro-
gramsthathaveaparticularlystrongsynergyareMicrosoftExcelandMicrosoftAccess.
Access,whichletsyoucreateandmanagedatabases,andExcelbothworkwithlistsof
data.InExcel,thatdataisoftenstoredincomplexlistssuchasPivotTables,butthe
datausedtocreatePivotTablesandotherdatalistscanberepresentedasaseriesof
rowsinaworksheet.
Exceldoeshaveacapabilityyoumightexpecttofindonlyinadatabaseprogram
theabilitytohaveausertypeavalueinacellandhaveExcellookinanamedrange
tofindacorrespondingvalue.Forinstance,youcanhaveatwo-columnnamedrange
withonecolumndisplayingtheISBNofabookandthesecondcolumndisplaying
thetitleofthesamebook.ByusingaVLOOKUPformulathatreferencesthenamed
range,youcanletcolleaguesusingyourworkbooktypeanISBNinacellandhave
thenameofthebookwiththatISBNappearinthecellwiththeformula.
IfyouhavedatainadatabasethatyoudliketobringintoExcel,youcancreatea
query,orstatementthatlocatesdatabaserecordsthatmeetspecificcriteria,tolocate
thedesireddata.Similarly,ifyouhaveadatalistinaworksheetthatisstructuredin
thesamewayasadatabasetable,youcanusethedatabasefunctionsbuiltintoExcel
toquerythedatalistandsummarizethedataitcontains.
Inthischapter,youlllearnhowtolookupinformationinadatalist,retrievedata
fromadatabase,andsummarizeinformationinanExcellistusingdatabasefunctions.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpageslviiilx.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
247
Microsoft
Office
Specialis
14
WorkingwithDatabaseData
LookingUpInformationinaDataList
Microsoft
Wheneveryoucreateaworksheetthatholdsinformationaboutalistofdistinctitems,
Office
Specialistt
suchasproductsofferedforsalebyacompany,youshouldensurethatatleastone
columninthelistcontainsauniquevaluethatdistinguishesthatrow(andtheitem
therowrepresents)fromeveryotherrowinthelist.Assigningeachrowacolumn
withauniquevaluemeansthatyoucanassociatedatainoneworksheetwithdatain
anotherworksheet.Forexample,ifeverycustomerisassignedauniqueidentification
number,youcanstoreacustomerscontactinformationinoneworksheetandallof
thatcustomersordersinanotherworksheet,andbeabletoassociatethecustomers
ordersandcontactinformationwithoutwritingthecontactinformationinawork-
sheeteverytimethecustomerplacesanorder.
InthecaseofproductssoldbyTheGardenCompany,thecolumnwiththoseunique
values,orprimary keycolumn,istheProductIDcolumn.
IfyouknowaproductsProductID,itsnotroubletolookthroughalistof20or30
productstofindtheproductrepresentedbyaparticularID.If,however,youhavea
listofseveralhundredproducts,lookingthroughthelisttofindaproductwouldtake
quiteabitoftime.Instead,youcanusetheVLOOKUPfunctiontoletyourcolleagues
typeaProductIDinacellandhavethecorrespondingproductinformationappearin
anothercell.
TheVLOOKUPfunctionfindsavalueintheleftmostcolumnofanamedrangeand
thenreturnsthevaluefromthespecifiedcelltotherightofthecellwiththefound
value.AproperlyformedVLOOKUPfunctionhasfourarguments(datathatispassed
tothefunction),asshowninthefollowingdefinition:=VLOOKUP(lookup_value,
table_array, col_index_num, range_lookup).Thefollowingtablesummarizesthe
valuesExcelexpectsforeachofthesearguments.
248
WorkingwithDatabaseData
14
Argument ExpectedValue
lookup_value Thevaluetobefoundinthefirstcolumnofthenamedrange
specifiedbythetable_arrayargument.Thelookup_value
argumentcanbeavalue,acellreference,oratextstring.
table_array Themulticolumnrangeornameoftherangetobesearched.
col_index_num Thenumberofthecolumninthenamedrangewiththevalueto
bereturned.
range_lookup ATRUEorFALSEvalue,indicatingwhetherthefunctionshould
findanapproximatematch(TRUE)oranexactmatch(FALSE)
forthelookup_value.Ifleftblank,thedefaultvalueforthis
argumentisTRUE.
Important Whenrange_lookupisleftblankorsettoTRUE,forVLOOKUPtowork
properlytherowsinthenamedrangespecifiedinthetable_arrayargumentmustbe
sortedinascendingorderbasedonthevaluesintheleftmostcolumnofthenamedrange.
TheVLOOKUPfunctionworksabitdifferentlydependingonwhethertherange_lookup
argumentissettoTRUEorFALSE.Thefollowinglistsummarizeshowthefunction
worksbasedonthevalueofrange_lookup.
Iftherange_lookupargumentisleftblankorsettoTRUEandVLOOKUP
doesntfindanexactmatchforlookup_value,thefunctionreturnsthelargest
valuethatislessthanlookup_value.
Iftherange_lookupargumentisleftblankorsettoTRUEandlookup_valueis
smallerthanthesmallestvalueinthenamedrange,an#N/Aerrorisreturned.
Iftherange_lookupargumentisleftblankorsettoTRUEandlookup_valueis
largerthanallvaluesinthenamedrange,thelargestvalueinthenamedrange
isreturned.
Iftherange_lookupargumentissettoFALSEandVLOOKUPdoesntfindan
exactmatchforlookup_value,thefunctionreturnsan#N/Aerror.
AsanexampleofaVLOOKUPfunction,considerthefollowingworksheetandthe
accompanyingVLOOKUPformula.
249
14
WorkingwithDatabaseData
Passifloranamedrange Namedrangecolumn
Settingtherange_lookup
argumenttoFALSE
requirestheVLOOKUP
functiontofindanexact
matchtothevalueentered
incellA9orreturnan
#N/Aerror.
Cellreferenceforthelookup_valueargument
WhenyoutypePF0202incellA9andpressF,theVLOOKUPfunctionsearches
thefirstcolumnofthePassifloranamedrange,findsanexactmatch,andreturnsthe
valueIncense Passion FlowertocellB9.
Tip ArelatedfunctionisHLOOKUP,whichmatchesavalueinacolumnofthefirstrow
ofatableandreturnsthevalueinthespecifiedrownumberofthesamecolumn.Formore
informationonusingtheHLOOKUPfunction,typeHLOOKUPintheAskAQuestionbox.
Inthisexercise,youcreateaVLOOKUPfunctiontoreturnthenamesofproducts
withProductIDstypedinaspecificcell.
OPEN:LookupfromtheSBS\Excel\Databasefolder.
1 SelectthecellrangeA4:C18.
2 ClickintheNamebox,typeToolList,andthenpressF.
Excelcreatesarange,namedToolList,thatismadeupofcellsA4:C18.
3 IncellE6,type=VLOOKUP(E4,ToolList,2,FALSE)andpressF.
ExceladdstheVLOOKUPfunctiontoyourworksheet.Becausethereisnovaluein
cellE4,the#N/AerrorcodeappearsincellE6.
4 IncellE4,typeTL0038andpressF.
Nutcracker appearsincellE6.
withvaluetobereturned
bythefunction
250
WorkingwithDatabaseData
14
5 IncellE4,typeTL3001.
Pruners, Left-handedappearsincellE6.
6 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Lookup.
RetrievingDatafromaDatabase
JustasyoucansaveanExcelworkbookasatab-delimitedtextfileandthenopenit
inotherspreadsheetprograms,youcanalsosavedatalists,ortables,thatyouvecre-
atedinotherdatabaseandspreadsheetprogramsandthenimportthosetablesinto
anExcelworksheet.Excelletsyougoonestepfurther,however.InExcel,youcan
reachdirectlyintoanAccess,dBASE,MicrosoftFoxPro,orMicrosoftVisualFoxPro
databaseandretrievedatafromthatdatabasestables.
ThreestepsarerequiredtobringdatafromadatabaseintoExcel:definingadata
source,buildingaquerytocreatealinktothatdatasource,and,ifdesired,creatinga
filtertolimittherowsthatappearinyourExcelworksheet.
Todefineadatasource,ontheDatamenu,pointtoImportExternalDataandthen
clickNewDatabaseQuery.IntheChooseDataSourcedialogboxthatappears,you
clickthe<NewDataSource>itemandthenclickOKtomovetotheCreateNewData
Sourcedialogbox.YouusethefirsttwocontrolsintheCreateNewDataSourcedialog
boxtonamethedatasourceandthenpickthedriver(aprogramthatcontrolsaccess
toafileordevice)Excelshouldusetoconnectwithandopenthetargetdatabase.
Onceyouhaveidentifiedthetypeofdatabaseyouwanttoconnectwith,youclick
theConnectbuttontoopenthedialogboxfromwhichyouselectthetargetdatabase.
Note ThenameofthedialogboxthatappearsafteryouclicktheConnectbutton
dependsonthedatabasedriveryouchoseearlier.
251
14
WorkingwithDatabaseData
Add
Remove
RemoveAll
WhenyouchooseAccessasthedatabasetypetowhichyouwanttoconnect,the
ODBCMicrosoftAccessSetupdialogboxappears.ODBC,whichisshortforOpen
DataBase Connectivity,isaprotocolthatfacilitatesdatatransferamongdatabasesand
relatedprograms(suchasspreadsheetprograms).ClickingtheSelectbuttonopensa
navigationdialogboxyoucanusetopickthedatabasefromwhichyouwantto
importtabledata.Onceyouhavechosenthetargetdatabase,youcanclosethenavi-
gationdialogboxandclickOKintheODBCMicrosoftAccessSetupdialogboxto
returntotheCreateNewDataSourcedialogbox,wherethedatabasespathappears
nexttotheConnectbutton.Youcanthenpickthedefaulttabletouseintheselected
database.ClickingOKcreatesthesource,whichnowappearsontheDatabasestabof
theChooseDataSourcedialogbox.
Tocreateaquerytopullinformationfromadatasource,clickthesourceandthen
clickOKtolaunchtheQueryWizard.OntheChooseColumnspageoftheQueryWizard,
youcanaddacolumntothedatabroughtintoExcelbyclickingthecolumnnamein
theleftboxandthenclickingtheAddbutton.Thecolumnnameappearsinthe
Columnsinyourquerybox.
YoucanremoveaspecificcolumnbyclickingthecolumnnameintheColumnsin
yourqueryboxandthenclickingtheRemovebutton,oryoucanresetyourselection
completelybyclickingtheRemoveAllbutton.Whenyouveselectedthecolumnsyou
wantincludedinyourquery,clickNexttomovetotheFilterDatawizardpage.
Ifyouwanttoimporttheentiretabletowhichyouhavelinked,justclickNextto
movetothenextwizardpage.Ifyouwanttolimitthedatareturnedbythequery,
especiallyifthetablehashundredsofrecordsormore,youcanfilterthetablebased
onthecontentsofoneormorecolumns.Tofilterthequeryresults,clickthefirstcol-
umnbywhichyouwanttofilter,clickthedownarrowinthefirstbox,andclickthe
comparisonoperator(forexample,islessthanorequalto)forthefilter.Then,inthe
secondbox,typethevaluetobeusedinthecomparison.IfyouselectthePricecol-
umn,selectislessthanorequaltointhefirstbox,andthentype50inthesecond
box,yourquerywillreturnonlyproductsthatcost$50.00orless.
Tip Youcanfilterbasedonmorethanonecriterion.Afteryouvecreatedthefirstfilter,
thesecondfieldboxwillbecomeactive.
Whenyouredonesettingyourcriteria,clickNexttomovetotheSortOrderpage.On
thispage,youcanspecifyasortordertodeterminetheorderinwhichthetablerows
areimportedintoyourworksheet.Tosetthecriteria,clicktheSortbydownarrow,
clickthecolumnbywhichyouwanttosorttheimportedrows,andthenselectthe
AscendingorDescendingoptionbuttontodeterminetheorderinwhichtherows
shouldbearranged.Youcansorttheimportedrowsbythecontentsofmorethan
onecolumnbyenteringadditionalcriteriaintheThenbyboxes.
252
WorkingwithDatabaseData
14
Whenyouredone,clickNexttomovetotheFinishpageoftheQueryWizard,where
youcansaveyourquerysothatyoudonthavetore-createiteverytimeyouwantto
runit.Productpriceschange,forinstance,soifTheGardenCompanypublisheda
monthlyflyerfeaturingallproductsthatcostlessthan$30,anemployeecouldsave
thequerythatlocatesthoseitemsintheProductsdatabaseandreruniteverymonth.
Tosaveyourquery,clicktheSaveQuerybuttonandthen,inthedialogboxthat
appears,typethenameofthequeryintheFilenameboxandclickSave.
Torunanexistingquery,ontheDatamenu,pointtoImportExternalDataandthen
clickNewDatabaseQuerytoopentheChooseDataSourcedialogbox.Clickingthe
Queriestabwilldisplayallsavedqueries.Torunasavedquery,clickitsnameand
thenclickOpen.
Inthisexercise,youdefineatableinanAccessdatabaseasadatasourceandthen
createaquerytoimportdatafromthatsourceintoExcel.
OPEN:QueryfromtheSBS\Excel\Databasefolder.
1 OntheDatamenu,pointtoImportExternalDataandthenclickNewDatabase
Query.
MicrosoftQuerylaunches,andtheChooseDataSourcedialogboxappears.
2 Ifnecessary,clicktheDatabasestab.
3 Click<NewDataSource>,andthenclickOK.
TheCreateNewDataSourcedialogboxappears.
4 Inthefirstbox,typeProductInformationasthenameofthesource.
Thesecondboxbecomesactive.
5 Inthesecondbox,clickthedownarrowandthen,fromthelistthatappears,click
MicrosoftAccessDriver(*.mdb).
TheConnectbuttonbecomesactive.
253
14
WorkingwithDatabaseData
6 ClickConnect.
TheODBCMicrosoftAccessSetupdialogboxappears.
7 ClickSelect.
TheSelectDatabasedialogboxappears.
8 NavigatetotheC:\SBS\Excel\Databasefolder,clickProducts.mdb,andthen
clickOK.
TheSelectDatabasedialogboxdisappears,andC:\SBS\Excel\Database\
Products.mdbappearsintheODBCMicrosoftAccessSetupdialogbox.
9 ClickOK.
TheODBCMicrosoftAccessSetupdialogboxdisappears,andtheCreateNewData
Sourcedialogboxreappears.
10 Inthefourthbox,clickthedownarrowandthen,fromthelistthatappears,click
Products.
ExcelassignsProductsasthedefaulttableforthisdatasource.
254
WorkingwithDatabaseData
14
11 ClickOK.
Product InformationislistedasanewdatasourceintheChooseDataSource
dialogbox.
12 ClickProductInformationifnecessary,andthenclickOK.
TheQueryWizardappears;thecolumnsintheProductstableappearinthe
Availabletablesandcolumnsbox.
13 ClicktheProductIDcolumnname,andthenclicktheAddbutton.
ProductIDappearsintheColumnsinyourquerybox,andProductNameisselected
intheleftbox.
14 ClicktheAddbutton.
ProductNameappearsintheColumnsinyourquerybox,andPriceisselectedin
theleftbox.
15 ClicktheAddbutton.
Price appearsintheColumnsinyourquerybox.
16 ClickNext.
TheFilterDatapageoftheQueryWizardappears.
17 IntheColumntofilterlist,clickPrice.
IntheOnlyincluderowswheresection,thefirstcomparisonoperatorboxbecomes
active.
18 Inthefirstcomparisonoperatorbox,clickthedownarrowandthen,fromthelist
thatappears,clickisgreaterthanorequalto.
Thewords is greater than or equal toappearinthecomparisonoperatorbox,and
thefirstvalueboxbecomesactive.
255
14
WorkingwithDatabaseData
19 Inthefirstvaluebox,type50andthenclickNext.
Note Thisfilterlimitsthedatabroughtintotheworkbooktoproductsthatcost
$50ormore.
TheSortOrderpageoftheQueryWizardappears.
20 IntheSortbybox,clickthedownarrowandthen,fromthelistthatappears,click
ProductID.
ProductIDappearsintheSortbybox,andtheAscendingandDescendingoption
buttonsbecomeactive,withtheAscendingoptionbuttonselected.TheThenbybox
alsobecomesactive.
21 ClickNext.
TheFinishpageoftheQueryWizardappears,withtheReturnDatatoMicrosoft
Exceloptionbuttonselected.
22 ClickSaveQuery.
TheSaveAsdialogboxappears.
23 IntheFilenamebox,typeProducts50AndOverandthenclickSave.
Excelsavesyourquery,andtheSaveAsdialogboxdisappears.
24 ClickFinish.
TheQueryWizarddisappears,andQuery.xlsreappearswiththeImportDatadialog
boxopen.
25 IntheImportDatadialogbox,clickOK.
Note ClickingOKacceptstheactiveworkbookcellastheupperleftcornercell
fortherangetoholdthequeryresults.
256
Microsoft
Office
Specialis
WorkingwithDatabaseData
14
Thequeryresultsappearintheworkbook.
26 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Query.
SummarizingListData
Microsoft
Afinal,usefulaspectoftherelationshipbetweenspreadsheetprogramsanddata-
Office
Specialistt
basesisthatitispossibletobuildmanyofthedatasummaryfunctionsfoundindata-
basesintospreadsheetprograms,andviceversa.Forexample,Chapter3mentioned
severalfunctionsyoucanusetocreateformulasthatsummarizethevaluesinranges
ofcells.ThefivefunctionsmentionedinChapter3wereSUM,AVERAGE,COUNT,
MAX,andMIN.Eachofthosefunctionsexaminedeverycellintherangenamedin
theformulaandusedeachcellsvaluetocalculatetheformularesult.
SimilarfunctionsareavailableforusewithExceldatalists:DSUM,DAVERAGE,
DCOUNT,DMAX,andDMIN.Eachfunctionoperatesinthesamewayasthesimpler
version,butwithanimportantdifference:withthedatabasefunctions,youcandefine
criteriatolimitthecellsthefunctionconsiderswhenitgeneratesitsresult.Eachdata-
basefunctionfollowsthisformat(usingDSUMasanexample):
=DSUM(values, "field", criteria)
wherevaluesistherangeofcellscomprisingthedatalist,fieldisthenameofthe
field(nottheletteroftheworksheetcolumninwhichthedataisstored),andcriteria
istherangeofcellsthatcontainsthefieldnamesandcriteria.
257
14
WorkingwithDatabaseData
SeeAlso Formoreinformationondatalistsandtheirproperties,seeCreatingDynamic
ListswithPivotTablesonpage152.
Asanexample,considerthefollowingworksheet,whichhasasetofcriteriadefined
abovethedatalist.
ThecriteriadefinedincellsA1:F2(whichincludesthefieldheads),whenreferenced
inadatabasefunction,limitthefunctiontocellsthatcontaindatarelatingtosales
after1:00pm(hour13oftheday)onWednesdaysinMarch.(Inthisexample,the
dataisinthecellrangeA11:F1127.)ADSUMformulatofindthetotalofsalesusing
thecriteriawouldlooklikethis:
=DSUM(A11:F1127,"Sales",A1:F2)
Important Yourcriteriamustnotoverlapanypartofthedatalist,norshouldthe
criteriabeplacedbelowthedatalist(placingthecriteriabelowthelistwouldmakeit
appearasifthecriteriawereadditionalrowsinthelist).Thebestplacesforyourcriteria
areabovethedatalistortotheside.
Ifyouwanttocreatecomplexcriteriaforafield,suchasincludingsalesfromtwo
daysorwithinarangeofhours,youcancreateasecondfieldheadingforthefield
withthemulti-partcriteriaanduseoperatorssuchas<and>,asintheexamplesin
thefollowinggraphic.
Inthisexercise,youcreateaseriesofdatabasefunctionstosummarizethevaluesin
anExceldatalist.
OPEN:SummaryfromtheSBS\Excel\Databasefolder.
1 IncellG1,typeHour.
Note CreatingasecondHourheadingletsyouplacemorethanoneconstraint
onvaluesintheHourfield.
2 SelectcellsA1:G1,andthen,ontheStandardtoolbar,clicktheCopybutton.
3 ClickcellA3,andthen,ontheStandardtoolbar,clickthePastebutton.
ThecolumnheadingsfromthecopiedcellsarepastedincellsA3:G3.
258
WorkingwithDatabaseData
14
4 ClickcellA5,andthen,ontheStandardtoolbar,clickthePastebutton.
ThecolumnheadingsfromthecopiedcellsarepastedincellsA5:G5.
5 IncellA2,typeFebruary;incellC2,typeTue;incellE2,type>12;andincellG2,
type<17.
6 IncellA4,typeMarch;incellB4,type2;andincellF4,type>200.
7 IncellA6,typeJanuary.
8 IncellH8,typeTotalTuesalesfrom1pmto4pminFeb.
9 IncellH9,typeNumberofMarchhoursinweek2withsalesover$200.
10 IncellH10,typeHighesthourlysalesinJan.
11 IncellI8,type=DSUM(A11:F1127,"Sales",A1:G2)andpressF.
$4,964.00appearsincellI8.
12 IncellI9,type=DCOUNT(A11:F1127,"Hour",A3:G4)andpressF.
51appearsincellI9.
13 IncellI10,type=DMAX(A11:F1127,"Sales",A5:G6)andpressF.
$1,028.00appearsincellI10.
14 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Summary.
259
14
WorkingwithDatabaseData
KeyPoints
UsetheVLOOKUPfunctiontolookupavalueinonecolumnofadatalistand
returnavaluefromanothercolumnofthesamerow.
Youcancreatedatabasequeriestopullselectedrecordsfromdatabasetables
intoyourExcelworksheets.
Excelknowsaboutmanytypesofdatasources,sotherearefewlimitsonwhat
datayoucanbringintoyourworksheets.
Ifyouwanttolimitthedatayourdatabasequeriesbringin,youcandefinefil
terstoactonaquerysresults.
ByusingdatabasefunctionssuchasDSUMandDAVERAGE,youcansummarize
thedatainanExceldatalist.
Justaswithdatabasequeries,youcansetcriteriatolimitthelistrowsconsid
eredbydatabasefunctions.
260
Chapter 15 at a Glance
Savea
workbook
fortheWeb,
page264
SmartTags,
page272
page277
ontheWeb,
page270
Publishworksheets
ontheWeb,
page266
PublishaPivotTable
Importandexport
workbooksas
structureddata,
Retrievedatafromthe
Webusingqueriesand
262 Chapter 15 at a Glance
15
PublishingInformation
ontheWeb
Inthischapteryouwilllearnto:
SaveaworkbookfortheWeb.
PublishworksheetsontheWeb.
PublishaPivotTableontheWeb.
RetrievedatafromtheWebusingqueriesandSmartTags.
ImportandexportworkbooksasstructuredXMLdata.
Create,apply,andmodifycustomXMLdatamaps.
OneofthehallmarksofMicrosoftExcelhasbeenthatitletsyousaveyourExcel
workbooksandworksheetsasfilesthatcanbeaccessedandinteractedwithviathe
WorldWideWeb.PreviousversionsofExcelalsoletyoubringdatafromtheWeb
intoyourworkbooksbycreatingqueries.
Excel2003extendsthosecapabilities,addingentirelynewfunctionsandmaking
existingcapabilitieseasiertouse.Forexample,previousversionsofExcelcreated
copiesofworkbooksorworksheetsthathadbeensavedfortheWebandthatwere
notconnectedtotheoriginalfile,meaningthatanyupdatesintheoriginalfilewould
notbereflectedinthefilepublishedontheWeb.InExcel2003,youcancreatestand-
alonefilesorcreatealinkedfilethatisupdatedwhenevertheoriginalfileissaved.
OneofthehallmarktechnologiesusedinExcel2003isExtensible Markup Language
(XML).XMLisacontentmarkuplanguage,meaningthatanXMLfilehasinformation
aboutthedatacontainedwithinit(ascomparedwithHypertextMarkupLanguage
(HTML),whichtellsaWebbrowserhowtodisplayafilescontents).SavingExcel
workbooksasXMLfilesmeansthatyourExceldatawillbereadablebyawiderange
ofprograms,notjustthoselistedintheSaveAsdialogboxsSaveastypedrop-down
list.OneapplicationofXMLisSmart Tags,atechnologythatrecognizescertaintypes
ofinformation,suchasstocksymbols,andlooksuprelatedinformationontheWeb.
YoucanalsocreatecustomXMLdataarrangements,calleddata maps,thatallowyou
fine-grainedcontroloverhowdataisbroughtintoyourworksheets.
Inthischapter,youlllearnhowtosaveaworkbookforpostingontheWeb,publish
worksheetsandPivotTablesontheWeb,retrievedatafromtheWeb,movedatafrom
oneapplicationtoanother,saveExcelfilesasXMLfiles,createXMLdatamaps,and
defineXMLoptions.
263
Microsoft
Office
Specialis
15
PublishingInformationontheWeb
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpageslxlxiii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
SavingaWorkbookfortheWeb
Microsoft
OneofthestrengthsofExcel2003isthatyoucansaveExcelworkbooksasWebdoc-
Office
Specialistt
uments,allowingyouandyourcolleaguestoviewworkbooksovertheInternetora
corporateintranet.ForadocumenttobeviewedviatheWorldWideWeb,thedocu-
mentmustbesavedasaHypertext Markup Language (HTML)file.HTMLfiles,which
endwitheitherthe.htmorthe.htmlextension,includetagsthattellaWebbrowser
suchasMicrosoftInternetExplorerhowtodisplaythecontentsofthefile.
Forexample,youmightwanttosetthedatalabelsinaworkbookapartfromtherest
ofthedatabyhavingthelabelsdisplayedwithboldtext.TheHTMLtagpairthatindi-
catestexttobedisplayedasboldtextis<B>...</B>,wheretheellipsispointsbetween
thetagsarereplacedbythetexttobedisplayed.SotheHTMLfragment
<B>Excel</B>
wouldbedisplayedasExcel.
YoucancreateHTMLfileswithMicrosoftFrontPage,butyoucanalsocreateafile
inExcelandthenclickSaveasWebPageontheFilemenutoopentheSaveAs
dialogbox.
TosaveaworkbookasanHTMLfile,verifythattheEntireWorkbookoptionbuttonis
selected,typeanameforthefileintheFilenamebox,andthenclickSavetohave
ExcelcreateanHTMLdocumentforeachsheetintheworkbook.
OnceyouhavesavedanExcelworkbookasaseriesofHTMLdocuments,you
canopenitinInternetExplorer4.01orlater.ToopentheExcelfile,startInternet
Explorer,opentheFilemenu,andthenclickOpentodisplaytheOpendialogbox.In
theOpendialogbox,clickingtheBrowsebuttonopenstheMicrosoftInternetExplorer
dialogbox.Usethecontrolsinthatboxtoidentifythefileyouwanttoopen.
Note ExcelrepresentstheHTMLfilesasasingleMicrosoftHTML5fileinthe
MicrosoftInternetExplorerdialogbox.
Whenyoudouble-clickthefiletoopen,theMicrosoftInternetExplorerdialogboxdis-
appearsandthefilesnameandpathappearintheOpenbox.TodisplaytheExcel
workbook,clickOK,andtheworkbookappearsinInternetExplorer.Youcanmove
264
PublishingInformationontheWeb
15
betweenpagesintheworkbookbyclickingtheHTMLrepresentationofthesheet
tabsinthelowerleftcorneroftheworkbook.
Note Whenyoumovethemousepointeroverasheettab,theaddressoftheHTML
pagerepresentingthatworksheetappearsonthestatusbar.
Inthisexercise,yousaveanExcelworkbookasaseriesofHTMLfilesandthenview
thefilesinInternetExplorer.
OPEN:SavingfromtheSBS\Excel\Webfolder.
1 OntheFilemenu,clickSaveasWebPage.
TheSaveAsdialogboxappears.
2 Ifnecessary,intheSavesection,selecttheEntireWorkbookoptionbutton.
3 VerifythatSaving.mhtappearsintheFilenamebox,andthenclickSave.
ExcelsavestheworkbookasasetofHTMLdocuments.
4 ClicktheClosebuttontocloseSaving.htm.
Close 5 StartInternetExplorer.
6 InInternetExplorer,ontheFilemenu,clickOpen.
TheOpendialogboxappears.
7 ClickBrowse.
TheBrowsedialogboxappears.
8 NavigatetotheC:\SBS\Excel\Webfolder,andthendouble-clickSaving.mht.
TheBrowsedialogboxdisappears,andC:\SBS\Excel\Web\Saving.mhtappearsin
theOpenbox.
265
Microsoft
Office
Specialis
15
PublishingInformationontheWeb
9 ClickOK.
Saving.mhtappearsinInternetExplorer.
10 ClicktheMarchsheettab.
TheMarchworksheetappears.
CLOSE:InternetExplorer.
PublishingWorksheetsontheWeb
Microsoft
InadditiontotheabilitytosaveanExcelworkbookasanHTMLfile,youalsohave
Office
Specialistt
theoptionofchoosingtosaveindividualworksheetsasHTMLdocuments.Tosavea
singleworksheetasanHTMLdocument,ontheFilemenu,clickSaveasWebPageto
opentheSaveAsdialogbox.
SelectingtheSelection:SheetoptionbuttontellsExceltosavetheactiveworksheetas
anHTMLdocument.Youcanalsochangethetitlethatappearsonthetitlebarofthe
filewhenitisopenedinaWebbrowser,allowviewerstointeractwiththefileafterit
ispublishedontheWeb,andhaveExcelupdatetheWebfilewheneverthefileon
whichitisbasedisupdated.
Ifyoulike,youcanstoreanyHTMLfilesinaseparatefolder.Tocreateafolderin
Excel,ontheFilemenu,clickOpen.IntheOpendialogbox,clicktheCreateNew
Folderbuttontocreateanewfolderwithinthecurrentfolder.Youcanrenamethe
newfolderbyright-clickingitsicon,choosingRenamefromtheshortcutmenuthat
appears,andthentypingthefoldersnewname.
266
Commands
andOptions
PublishingInformationontheWeb
15
WhenyouopenanHTMLdocumentinaWebbrowser,atitleappearsonthedocu-
mentstitlebar.YoucansetthedocumentstitlewithanHTMLtag;ifyoudont,the
filesnameappearsonthetitlebar.InExcel,youcansetatitleforaworkbookor
worksheetyousavetotheWebbyclickingthePublishbuttontodisplaythePublishas
WebPagedialogbox.ClickingtheChangebuttoninthePublishassectionofthedialog
boxopensanotherdialogbox,inwhichyoucantypeatitlefortheExceldocument.
ThereareseveralotheroptionsyoucansetinthePublishasWebPagedialogbox.
Forexample,youcanletcolleaguesinteractwithaworkbookorworksheetyousave
asanHTMLdocument.Toallowinteraction,selecttheAddinteractivitywithcheck
box,selectSpreadsheetfunctionalityfromtheadjoiningdrop-downlist,verifythatthe
Openpublishedwebpageinbrowsercheckboxisselected,andthenclickPublish.
Bydefault,yourWebpagewillbepublishedtoyourharddiskinthesamefolderas
yourExcelfile.However,ifyouhaveaccesstoanintranetoraWebsite,youcan
entertheaddressofthesiteandthenameoftheWebpageyouarepublishinginthe
Filenamebox,suchashttp://www.microsoft.com/publish.mht.Youllbepromptedfor
ausernameandpasswordforthesite,thenthepagewillbeuploadedimmediately
(ifyouhaveanactiveInternetconnection.)Thenwhenyouworkwiththeoriginal
fileinthefutureandsavechanges,thechangedfilewillberepublishedtothesame
Website.
Youandyourcolleaguescannowinteractwiththeworksheetbyeditingcellvalues,
sorting,filtering,orcalculatingvalueswithformulas.Itsalsopossibletochangecell
formatting;togetaccesstotheformattingtoolswhenyouviewanExcelworksheet
viatheWeb,clicktheCommandsandOptionsbuttontodisplaytheCommandsand
Optionsdialogbox.
AutoRepublish,afeatureintroducedinExcel2002,tellsExceltoretainalinktotheWeb
fileyoucreateandtoupdatetheWebversionofthatfilewhenevertheoriginaldocu-
mentissaved.YouturnonAutoRepublishbyopeningthePublishasWebPagedialog
boxandselectingtheAutoRepublisheverytimethisworkbookissavedcheckbox.
Inthisexercise,youpublishaworksheettotheWeb,setatitlefortheworksheet,
maketheworksheetinteractive,changetheformatofworksheetelementsinaWeb
browser,andturnonAutoRepublishsothatanychangesintheoriginaldocument
willbereflectedintheWebdocumentcreatedfromit.
OPEN:PublishfromtheSBS\Excel\Webfolder.
1 Ifnecessary,onthetabbar,clicktheJanuarysheettabtodisplaytheJanuary
worksheet.
2 OntheFilemenu,clickSaveasWebPage.
TheSaveAsdialogboxappears.
267
15
PublishingInformationontheWeb
3 IntheFilenamebox,typePublish.
4 IntheSavesectionofthedialogbox,selecttheSelection:Sheetoptionbuttonto
publishtheactiveworksheetontheWeb.
5 IntheSavesectionofthedialogbox,selecttheAddinteractivitycheckbox,and
thenclickPublish.
ThePublishasWebPagedialogboxappears.
6 InthePublishassectionofthedialogbox,clicktheChangebutton.
TheSetTitledialogboxappears.
7 IntheTitlebox,typeJanuarySalesDataandthenclickOK.
TheSetTitledialogboxdisappears,andJanuary Sales Dataappearsasthetitleof
theWebpage.
8 SelecttheAutoRepublisheverytimethisworkbookissavedcheckbox.
9 SelecttheOpenpublishedwebpageinbrowsercheckbox,andthenclickPublish.
TheworkbookappearsinInternetExplorer.
268
PublishingInformationontheWeb
15
10 ClickcellB5,andthen,ontheInteractivitytoolbar,clicktheCommandsandOptions
button.
TheCommandsandOptionsdialogboxappears.
11 Ifnecessary,clicktheFormattab.
12 IntheTextformatsectionofthedialogbox,clicktheAlignLeftbutton.
AlignLeft
ThecontentsofcellB5arealignedwiththeleftedgeofthecell.
13 IntheCommandsandOptionsdialogbox,clicktheClosebutton.
TheCommandsandOptionsdialogboxcloses.
CLOSE:InternetExplorer.
269
15
PublishingInformationontheWeb
PublishingaPivotTableontheWeb
WhenyoupublishanExcelworkbookontheWeb,youcanallowuserstointeract
withtheworksheets.Theprecedingsectionofthischapterdescribedhowtoletyou
andyourcolleaguesinteractwithanExceldocumentovertheWeb.Thissection
continuesthatthemebydemonstratinghowtoexportaPivotTabletotheWeb.If
CatherineTurner,TheGardenCompanysowner,wereonvacationbutwantedto
participateinameeting,shecouldstilluseherlaptoptoconnecttothecompanys
WebsiteanduseaPivotTablepublishedtheretoviewanyupdatedinformation.
OnceyouhavecreatedaPivotTable,youcanpublishitontheWebbyclickingany
cellinthePivotTableandclickingSaveasWebPageontheFilemenutoopenthe
SaveAsdialogbox.TopublishjusttheworksheetwiththePivotTable,selectthe
Selection:Sheetoptionbutton,selecttheAddinteractivitycheckbox,andthenclick
PublishtoopenthePublishasWebPagedialogbox.
ThePublishasWebPagedialogboxshowsthenameoftheworksheetcontainingthe
PivotTableintheChoosebox,withtheitemsonthatworksheetinthelowerpaneof
thebox.InthelowerpaneoftheChoosebox,clicktheentrybeginningwithPivot-
Table.ThecontentsoftheAddinteractivitywithboxintheViewingoptionssectionof
thedialogboxwillchangetoreflectthatyouarepublishingaPivotTable.
Important Ifyoupublishanentireworksheet,ratherthanjustthePivotTable,view-
erswillnotbeabletointeractwiththePivotTable.
TofinishpublishingthePivotTableontheWeb,selecttheOpenpublishedwebpagein
browsercheckbox,andthenclickPublishtosavethePivotTableasaWebdocument
andtoshowthePivotTableinInternetExplorer.
YouandyourcolleaguescannowinteractwiththePivotTablebyreorganizingand
filteringthePivotTablescontentswithInternetExplorer4.01orlater.Toexpandthe
ShowDetails
PivotTablesothatitshowseverycell,andnotjustthetotalsandgrandtotals,click
theShowDetailsbutton.
Inthisexercise,youpublishaPivotTableonyourharddiskandthenfilterthePivot-
TablescontentsusingInternetExplorer.
OPEN:PivotfromtheSBS\Excel\Webfolder.
1 Ifnecessary,onthetabbar,clickthePivotsheettabandthenclickanycellinthe
PivotTable.
2 OntheFilemenu,clickSaveasWebPage.
TheSaveAsdialogboxappears.
3 IntheFilenamebox,typePivot.
270
PublishingInformationontheWeb
15
4 IntheSavesectionofthedialogbox,selecttheSelection:Sheetoptionbutton.
5 IntheSavesectionofthedialogbox,selecttheAddinteractivitycheckboxand
thenclickPublish.
ThePublishasWebPagedialogboxappears.
6 IfItemsonPivotdoesnotappearintheChoosebox,clicktheChoosedownarrow
andthen,fromthelistthatappears,clickItemsonPivot.
Items on Pivot appearsintheChoosebox,andtheitemsinthePivotworksheet
appearinthelistbelowtheChoosebox.
7 InthelistbelowtheChoosebox,clicktheitembeginningwithPivotTable.
IntheViewingoptionssectionofthedialogbox,selecttheAddinteractivitywith
checkboxandselectPivotTablefunctionalityinthedrop-downlist.
8 Ifnecessary,inthebottomsectionofthedialogbox,selecttheOpenpublishedweb
pageinbrowsercheckbox.
Note IfyouhaveaccesstoyourownWebsite,youcanenteralocationonyour
siteintheFilenamebox,inaformlikehttp://www.microsoft.com/subfolder/
pivot.mht.
9 ClickPublish.
ThePivotTableissavedasaWebpageandappearsinInternetExplorer.
Important IfyourepublishingtoanintranetorWebsite,Excelwillpromptyou
foravalidusernameandpassword.
271
Microsoft
Office
Specialis
15
PublishingInformationontheWeb
10 ClicktheShowDetailsbutton.
ThePivotTableexpandstoshoweverycell.
11 InthePageAreaofthePivotTable,clicktheWeekdaydownarrowandthen,from
thelistthatappears,cleartheMon,Tue,Wed,Thu,andFricheckboxes.
12 ClickOK.
ThePivotTableisfilteredsothatonlysalesforSaturdaysandSundaysareshown.
13 InthePageAreaofthePivotTable,clicktheWeekdaydownarrowandthen,from
thelistthatappears,selecttheAllcheckboxandclickOK.
Thefilterisremoved.
Close 14 ClicktheClosebuttontocloseInternetExplorer.
15 InExcel,ontheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:Pivot.
RetrievingDatafromtheWeb
Microsoft
TheWorldWideWebisagreatsourceofinformation.Fromstockquotestoproduct
Office
Specialistt
descriptions,manycompaniespublishusefulinformationontheirWebsites.The
mostcommonHTMLstructureusedtopresentfinancialinformationisthetable,
272
PasteOptions
PublishingInformationontheWeb
15
which,likeaspreadsheet,organizesthedataintorowsandcolumns,asinthefollow-
inggraphic.
Excel2003makescreatingaWebqueryeasybylettingyoucopydatadirectlyfroma
WebpageintoExcelandthencreateaquerytoretrievedatafromtheHTMLtable
youcopied.TocreateaCopyPasteWebQuery,openthetargetWebpageinInternet
Explorer,copythedatatotheClipboard,clickacellintheExcelworkbook,andthen
pastethedataintotheworkbook.Thedatawillappearintheworkbook,withaPaste
Optionsbuttonnexttoit.
ClickingthePasteOptionsbuttonandthenclickingCreateRefreshableWebQuery
fromthelistthatappearsopenstheNewWebQuerydialogbox,whichcontainsthe
datayoucopiedfromtheWebpage.
ToselectatabletoimportintoExcel,clickthetableiconnexttoit.Theiconwill
changetoaselectedtableicon,andthetablewillbeoutlinedandhighlightedto
identifyitashavingbeenselected.Afteryouselectthetable,clickImporttocreate
thequery.
Tip YoucanselectanentireWebpagebyclickingthetoptableiconinthedisplaypane.
Torefreshquerydata,right-clickanycellinthequeryandthen,fromtheshortcut
menuthatappears,clickRefreshData.Thenewdatawillappearinyourworkbook.
Inthisexercise,youcreateaWebquerytoretrievedatausingthenewCopyPaste
WebQuerymethod.
OPEN:WebDatafromtheSBS\Excel\Webfolder.
1 StartInternetExplorer,andthen,ontheFilemenu,clickOpen.
TheOpendialogboxappears.
273
15
PublishingInformationontheWeb
Paste
Tableicon
2 ClickBrowse.
TheMicrosoftInternetExplorerdialogboxappears.
3 NavigatetotheC:\SBS\Excel\Webdirectory,andthendouble-clickFinancial.htm.
TheMicrosoftInternetExplorerdialogboxdisappears,and
C:\SBS\Excel\Web\Financial.htmappearsintheOpenbox.
4 ClickOK.
Financial.htmappearsinInternetExplorer.
5 Selectthetabledata,andthenpressH+ctocopythedatatotheClipboard.
6 InMicrosoftExcel,clickcellA1,andthen,ontheStandardtoolbar,clickthePaste
button.
TheHTMLtabledataispastedintotheworksheet,andthePasteOptionsbutton
appearsnexttothedata.
7 ClickthePasteOptionsbutton,andthen,fromthelistthatappears,clickCreate
RefreshableWebQuery.
TheNewWebQuerydialogboxappears,withFinancial.htmdisplayed.
8 ClickthetableiconnexttoCompany Name (itchangestoacheckmark),andthen
clickImport.
TheHTMLtabledataappearsintheworksheet,withitsoriginalHTMLformatting.
274
PublishingInformationontheWeb
15
9 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:WebData.
AcquiringWebDatawithSmartTags
AnotherusefulcapabilityinExcel2003isthatofbringinginformationfromtheWeb
thatisrelatedtothecontentsofaworksheetcell.Thetechnologythataccomplishes
thisiscalledSmartTags.
TheclearestexampleofhowSmartTagsworkiswithstocksymbols,theabbrevia-
tionsofcompanynamesonstockmarkettickers.YoucanturnonSmartTagsand
haveExcellookforknownstocksymbols(suchasMicrosoftsstocksymbol,MSFT)
andconnecttoaWebsitethathasinformationrelatedtothatsymbol.
ToturnonSmartTags,ontheToolsmenu,clickAutoCorrectOptionstodisplaythe
AutoCorrectdialogbox.IntheAutoCorrectdialogbox,clicktheSmartTagstabtodis-
playtheSmartTagstabpage.
SelecttheLabeldatawithsmarttagscheckboxtoactivateSmartTags,andthen,in
theRecognizersbox,selectthecheckboxesnexttothesetsofSmartTagsyouwant
Exceltouse.YoucanalsodeterminehowExcelindicatesthatacellhasavaluerec-
ognizedbySmartTagsbyopeningtheShowsmarttagsasdrop-downlistandchoos-
ingwhetherthecellwillhaveanindicatorinthelowerrightcornerofthecell,a
buttonthatappearsbesidethecellwhenthemousepointerisoverit,orboth.Select-
ingtheEmbedsmarttagsinthisworkbookcheckboxmeansthatExcelwillsavethe
referencetoanycellswithvaluesrecognizedbySmartTagsandcopythelistofSmart
Tagsintothebodyoftheworkbook.
TochecktheworkbookforcellvaluesrecognizedasSmartTags,clicktheCheck
Workbookbutton.TheAutoCorrectdialogboxwilldisappear,andcellswithrecog-
nizedvalueswillhaveanindicatorinthelowerrightcorner.
275
15
PublishingInformationontheWeb
SmartTag
Actions
Movingthemousepointeroverthecellwilldisplayanindicatorbutton.Clickthe
indicatorbutton,andthenchoosethetypeofinformationyouwantfromthelistthat
appears.IfyouclickStockQuoteonMSNMoneyCentral,forexample,InternetExplorer
willlaunchandfindtheMSNMoneyCentralpageforMicrosoft.
TodeleteanindividualSmartTag,clicktheindicatorbuttonnexttothecellwiththe
SmartTagandthenclickRemovethisSmartTag.ToturnoffSmartTagsentirely,open
theAutoCorrectdialogbox,displaytheSmartTagstabpage,cleartheLabeldatawith
smarttagscheckbox,andthenclickOK.
Inthisexercise,youturnonSmartTags,checkaworksheetforSmartTags,andthen
usetheSmartTagyoufindtogetstockinformationaboutthecompanyrepresented
byastocksymbol.
OPEN:SmartfromtheSBS\Excel\Webfolder.
1 OntheToolsmenu,clickAutoCorrectOptions.
TheAutoCorrectdialogboxappears.
2 ClicktheSmartTagstabtodisplaytheSmartTagstabpage.
3 SelecttheLabeldatawithsmarttagscheckbox.
TheRecognizersboxbecomesactive.
4 VerifythatallfivecheckboxesintheRecognizerspaneareselected.
5 SelecttheEmbedsmarttagsinthisworkbookcheckbox.
SmartTagswillnowbesavedaspartoftheworkbookfile.
276
PublishingInformationontheWeb
15
6 ClickCheckWorkbook.
TheAutoCorrectdialogboxdisappears,andaSmartTagindicatorappearsincellB3.
7 MovethemousepointerovercellB3.
ASmartTagActionsbuttonappearsnexttothecell.
8 ClicktheSmartTagActionsbutton,pointtoFinancialSymbol,andclickInsert
refreshablestockprice.
TheInsertStockPricedialogboxappears.
9 SelecttheStartingatcelloptionbutton,verifythatC3appearsintheStartingat
cellbox,andthenclickOK.
Thestockquoteappearsintheworkbook.
10 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Smart.
WorkingwithStructuredData
HTMLletsyoudeterminehowadocumentwillbedisplayedinaWebbrowser,such
asbytellingInternetExplorertodisplaycertaintextinboldtypeortostartanew
paragraph.However,HTMLdoesnttellyouanythingaboutthemeaningofdataina
document.InternetExplorermightknowitshoulddisplayasetofdatainatable,
butitwouldntknowthatthedatarepresentedanExcelspreadsheet.
Youcanaddmetadata,ordataaboutdata,toWebdocumentsusingExtensibleMarkup
Language(XML).WhileafulldiscussionofXMLisbeyondthescopeofthisbook,the
followingbitofXMLcodeshowshowtoidentifyanExcelworkbookinXML:
<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
277
15
PublishingInformationontheWeb
Also,XMLcanidentifyrowsandcellswithinthespreadsheet,asinthefollowing
example:
<R ow>
<Cell><Data ss:Type="String">January</Data></Cell>
<Cell><Data ss:Type="Number">1</Data></Cell>
<Cell><Data ss:Type="String">Tue</Data></Cell>
<Cell><Data ss:Type="Number">2</Data></Cell>
<Cell><Data ss:Type="Number">9</Data></Cell>
<Cell><Data ss:Type="Number">161</Data></Cell>
</ Row>
Thisrepresentsthefollowingworksheetrow.
ThegoalofXMListobeauniversallanguage,allowingdatatomovefreelyfromone
applicationtoanother.Inthiscase,thatmeansthatsavinganExcelworkbookasan
XMLdocumentwouldallowanotherspreadsheetprogramtoreadtheXMLfile,sepa-
rateoutthecelldata,andusethemetadatatodecidehowtostructureaworksheetto
containthatdata.
TosaveanExceldocumentasanXMLfile,clickSaveAsontheFilemenutoopenthe
Open
SaveAsdialogbox.IntheSaveAsdialogbox,clicktheSaveastypedownarrow,
clickXMLSpreadsheet(*.xml)fromthelistthatappears,andthenclickSave.Youcan
openExcelspreadsheetssavedasXMLdocumentsbyclickingtheOpenbutton,dis-
playingallExcelfiles,andthenclickingOpen.
Inthisexercise,yousaveanExcelworkbookasanXMLdocumentandthenimport
anXMLdocumentintoExcel.
OPEN:StructuredfromtheSBS\Excel\Webfolder.
1 OntheFilemenu,clickSaveAs.
TheSaveAsdialogboxappears.
2 ClicktheSaveastypedownarrow,andthen,fromthelistthatappears,clickXML
Spreadsheet(*.xml).
278
Newin
Office2003
PublishingInformationontheWeb
15
ThefiletypechangestoXML.
3 ClickSave.
Amessageboxappears,indicatingthatanyMicrosoftVisualBasicprojectsor
headerorfooterimageassociatedwiththeworkbookwillnotbesaved.
4 ClickYestoclearthemessageboxandsavetheworkbookasanXMLspreadsheet.
5 ClicktheClosebuttontocloseStructured.xml.
Close 6 OntheStandardtoolbar,clicktheOpenbutton.
TheOpendialogboxappears.
7 NavigatetotheC:\SBS\Excel\Webfolder,anddouble-clickStructured.xml.
Structured.xmlopens.
CLOSE:Structured.xml.
UseProfessionalXMLDataCapabilities
XMLData SupportforXML,includingtheabilitytosavefilesasXMLdocuments,wasintroduced
Structuring
inMicrosoftOfficeXP,butthetechnologyisoneofthefocalpointsofOffice2003.If
Newin
youworkinanenterprisethatexchangesdatawithotherorganizationsintheformof
Office2003
purchaseorders,partsdata,financialdata,orproductcatalogs,youcanuseXMLto
transferthedataregardlessoftheprogramusedtocreatethedata.
279
Microsoft
Office
Specialis
Newin
Office2003
15
PublishingInformationontheWeb
Microsoft
AttheheartofXML-baseddatainterchangeistheschema,whichisadocumentthat
Office
definesthestructureofasetofXMLfiles.Creatingaschema,whichinExcelisstored
Specialistt
ina.xsdfile,isbeyondthescopeofthisbook,butitshelpfultoknowwhatone
lookslike.Thefollowingcodelistingshowstheschemausedintheexerciseatthe
endofthissection.
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://schemas.thegardencompany.com/product"
elementFormDefault="qualified"
xmlns="http://schemas.thegardencompany.com/product"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:documentation>Defines a product with a "product" root
element.</xs:documentation>
</xs:annotation>
<xs:complexType name="productType">
<xs:sequence>
<xs:element name="productId" type="xs:string" />
<xs:element name="productName" type="xs:string" />
<xs:element name="priceEach" type="xs:decimal" />
</xs:sequence>
</xs:complexType>
<xs:element name="product" type="productType"></xs:element>
</xs:schema>
Thetoppartofthefile(downtotheannotation),containstechnicalinformation
abouttheschema,suchastheXMLversionusedtocreateit(1.0),theURLofthedoc-
umentagainstwhichthestructureoftheschemacanbeverified(http://www.w3.org/
2001/XMLSchema),andacommentabouttheschema(theannotation).
Thedatadefinitionfoundinthe<xs:complexType name=productType>statement
tellsExceltoexpectasingleinstanceofaproductwiththreeattributes,whichwill
appearinthenamedorder:productId,productName,andpriceEach.
XMLSource OnceyouhavecreatedanXMLschema,thenextstepinbringingassociatedXML
TaskPane
dataintoyourworksheetistoaddthestructureoftheschematotheworksheet.To
Newin
doso,youestablishadata map,orpatternofdatarepresentedinafile,inyour
Office2003
worksheet.ThefirststepintheprocessistoopentheDatamenu,pointtoXML,
andclickXMLSourcetodisplaytheXMLSourcetaskpane.
280
PublishingInformationontheWeb
15
Important TheXMLSourcemenuitemisonlyavailableiftheactiveworksheet
isblank.
ClickWorkbookMapstodisplaytheXMLMapsdialogbox,andclickAdd.Youthen
usethecontrolsintheXMLSourcedialogboxtolocatetheschematoadd,andclick
OpentoaddtheschematotheXMLMapsdialogbox.ClickOKtomakethestructure
intheselectedXMLmapappearintheXMLSourcetaskpane.
281
15
PublishingInformationontheWeb
Youcannowdragtheelementsfromthemaptotheworksheetcellswhereyouwant
thedatatoappear.Afteryoudraganelementtotheworksheet,aniconwillappear
nexttothecell.Clicktheicon,andselectwhereyouwanttheelementlabel(theele-
mentsname,suchasproductId)toappear.
Note Thenamesofelementsyouhavemappedtoacellinaworksheetappearin
boldtype.
Afteryouveaddedthedesiredelementstoyourworkbook,youcandeletethemas
youwoulddeleteanyotherworkbookcontents.Youcanalsoremoveanelement
fromaworksheetbyright-clickingtheelementintheXMLSourcetaskpaneandclick-
ingRemoveElementontheshortcutmenu.
IfyouwanttochangehowtheXMLdataisinsertedintoyourworksheet,clickthe
OptionsbuttonintheXMLSourcetaskpane.Youcanusetheoptionstopreviewyour
datainthetaskpane,hidehelpmessagesinthetaskpane,andletExcelknowyou
havealreadyaddeddatalabelssothatitwontaskeverytimeyouinsertafield.
YoucanalsochangehowExcelimportsXMLdatabyopeningtheDatamenu,point-
ingtoXML,andclickingXMLMapProperties.YoucanusethecontrolsintheXMLMap
PropertiesdialogboxtochangewhetherExcelresizesthecolumnstoreflectthesize
ofthedata,preservesnumberformatting,andvalidatesXMLdataagainsttheassoci-
atedschemabeforeimportingorexportingthatdata.
282
PublishingInformationontheWeb
15
Onceyouhaveassignedtheschemaelementstoworksheetcells,youcanimportdata
intotheworksheetfromanXMLdatafilethatmatchesthestructureoftheschema.
Hereisadatafilethatmatchestheschemashownearlier:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<product xmlns="http://schemas.thegardencompany.com/product">
<productId>TL2539</productId>
<productName>Grafting Knife</productName>
<priceEach>18.95</priceEach>
</product>
Notethatthedatafilereferstotheschemadefinedearlier(http://schemas.thegarden
company.com/product)andthenliststhedataforeachfield.Toimportthedatafrom
thisfileintoyourworksheet,opentheDatamenu,pointtoXML,andclickImport.In
theImportXMLdialogbox,clickthedatafileandclickImport.
START:MicrosoftExcel.
1 OntheDatamenu,pointtoXML,andthenclickXMLSource.
TheXMLSourcetaskpaneappears.
Important Remember,theXMLSourcemenuitemisonlyavailableifthe
activeworksheetisblank.
2 ClickXMLMaps.
TheXMLMapsdialogboxappears.
3 ClickAdd.
TheSelectXMLSourcedialogboxappears.
4 NavigatetotheSBS\Excel\Webfolder,clickProduct.xsd.xml,andclickOpen.
AnentryrepresentingProduct.xsd.xmlappearsintheXMLMapsdialogbox.
5 ClickOK.
AnoutlineoftheProductschemaappearsintheXMLSourcetaskpane.
6 DragtheproductIdelementfromthetaskpanetoB2.Clicktheiconthatappears
nexttothecell,andclickPlaceXMLHeadingtotheLeft.
Thenameoftheelement,productId,appearsincellA2.
7 DragtheproductNameelementfromthetaskpanetoB3.Clicktheiconthat
appearsnexttothecell,andclickPlaceXMLHeadingtotheLeft.
Thenameoftheelement,productName,appearsincellA3.
283
15
PublishingInformationontheWeb
8 DragthepriceEachelementfromthetaskpanetoB4.Clicktheiconthatappears
nexttothecell,andclickPlaceXMLHeadingtotheLeft.
Thenameoftheelement,priceEach,appearsincellA4.
9 OntheDatamenu,pointtoXML,andclickImport.
TheImportXMLdialogboxappears.
10 ClickProduct.xml,andthenclickImport.
ThedatafromProduct.xmlappearsincellsB2:B4.
11 IntheXMLSourcetaskpane,clickOptions,andthenclickHideBorderofInactive
Lists.
12 Clickanycellthatisnotinthelist.
Theborderaroundthelistdisappears.
13 IntheXMLSourcetaskpane,right-clicktheproductNameelement,andclick
RemoveElement.ClickOKtoacknowledgethatthedeletionwillcausedatatobe
lost.
ExcelremovestheXMLfieldincellB3andthedatathatwasreadintoit,butthe
fieldslabelremainsincellA3.
14 ClickXMLMapsintheXMLSourcetaskpane.
TheXMLMapsdialogboxappearswiththeentryrepresentingProduct.xsd
highlighted.
15 ClickDelete,andthenclickOKtoclearthemessageboxthatappears.ClickOK
againtoclosetheXMLMapsdialogbox.
ExcelremovestheassociationbetweenProduct.xsdandyourworkbook,butthe
dataremainsinplace.
16 OntheFilemenu,clickSave.
17 TheSaveAsdialogboxappears.
284
PublishingInformationontheWeb
15
18 TypeXMLExampleintheFilenameboxandclickSave.
19 ExcelsavesXMLExample.
CLOSE:XMLExample.
KeyPoints
SavingaworkbookasaWeb-accessibleHTMLdocumentisaseasyassavingit
asaregularExcelfile,andopeningaworkbooksavedfortheWebisjustas
easyasopeninganyotherWebpage.
Excelletsyouaddinteractivitytoworkbooksandworksheetssavedforthe
Web.YoucanevenpublishPivotTables!
UsetheAutoRepublishfacilitytoupdateExcelfilesontheWeb.Wheneverthe
originalworkbookischanged,theeditswillbewrittentotheHTMLversionof
thefile.
Webpagesoftencontainusefuldatasuchasstockpricesandsalesfigures.You
cancreateaWebQuerytodownloadthatdataintoanExcelworksheet.
SmartTagsextendthebasiccapabilitiesofExcel,makingiteasytocreatelinks
toexternaldata.
XMLisaterrifictoolformakingExceldatareadableinmanyotherprograms,
andforreadingindatacreatedinotherprograms.
YoucancreatecustomXMLdatamapstofacilitateelectronicdatainterchange
betweenyouandyourclients.
285
Chapter 16 at a Glance
Managecomments,
Identifywhich
revisionsto
keep,
page296
Shareadatalist,
page288
page291
Trackand
manage
colleagues
changes,
page293
Protectworkbooks
andworksheets,
page298
286 Chapter 16 at a Glance
16
Collaboratingwith
Colleagues
Inthischapteryouwilllearnto:
Shareadatalist.
Managecomments.
Trackandmanagecolleagueschanges.
Identifywhichrevisionstokeep.
Protectworkbooksandworksheets.
Signaworkbookusingadigitalsignature.
Eventhoughasingleindividualmightbetaskedwithmanagingacompanysfinancial
dataandrelatedinformation,thereisalsousuallyagroupofindividualswhoeither
enterdataintoworkbooksthemselvesorhaveinputintofuturesalesorgrowthprojec-
tions.Youandyourcolleaguescanalsoenhanceworkbookdatabyaddingcomments
thatofferinsightintowhysalesweresogoodonaparticulardayorwhetheraproduct
mightbediscontinued.Iftheworkbookinwhichthoseprojectionsandcommentswill
bestoredisavailableonalocalareanetwork(LAN)orintranet,youcanallowmore
thanoneusertoaccesstheworkbookatatimebyturningonworkbooksharing.
Onceaworkbookhasbeensharedwithyourcolleagues,youcanmarkandrecord
anychangesmadetotheworkbook.Onceallchangeshavebeenmade,thework-
booksadministratorcandecidewhichchangestokeepandwhichtoreject.Ifseveral
individualsneedtomakechangestoaworkbookandtheycantaccessitviaanet-
work,youcancreateseveralcopiesoftheoriginalfileanddistributethemviae-mail
toyourcolleagues.Afteryoureceiveallofthechangedfiles,youcanmergethe
changesintotheoriginalfileandchoosewhichchangestokeep.
Ifyouwouldprefertolimitwhichofyourcolleaguesisabletoviewandedityour
workbooks,youcanaddpasswordprotectiontoaworkbook,worksheet,orcell
range(includinganindividualcell).Addingpasswordprotectionletsyouprevent
changestocriticalelementsofyourworkbooksand,ifyoulike,hideformulasused
tocalculatevalues.
Finally,ifyouworkinanenvironmentwhereyouandyourcolleaguesexchangefiles
frequently,includingexchangeswithindividualsfromoutsideyourorganization,you
287
Microsoft
Office
Specialis
16
CollaboratingwithColleagues
canuseadigitalsignaturetohelpverifythatyourworkbooks,andanymacrosthey
contain,arefromatrustedsource.
Inthischapter,youlllearnhowtoshareadatalist,managecommentstoworkbook
cells,trackandmanagechangesmadebycolleagues,identifywhichchangestoa
workbookyoullkeep,protectworkbooksandworksheets,anddigitallysignyour
workbooks.
SeeAlso Doyouneedaquickrefresheronthetopicsinthischapter?Seethequickrefer-
enceentriesonpageslxivlxvii.
Important Beforeyoucanusethepracticefilesinthischapter,besureyouinstall
themfromthebookscompanionCD-ROMtotheirdefaultlocation.SeeUsingtheBooks
CD-ROMonpagexiformoreinformation.
SharingaDataList
Microsoft
Thefirststepinmakingaworkbookavailabletoyourcolleaguesistoturnonwork-
Office
Specialistt
booksharing.Whenyouturnonworkbooksharing,youletmorethanoneuseredit
aworkbooksimultaneously,whichisperfectforafair-sizedbusinesssuchasThe
GardenCompany,whereemployeesneedtolookupcustomer,sales,andproduct
datafrequently.
Toturnonworkbooksharing,ontheToolsmenu,clickShareWorkbook.IntheShare
Workbookdialogboxthatappears,youturnonworkbooksharingbyselectingthe
Allowchangesbymorethanoneuseratthesametimecheckbox.Youcanthensetthe
sharingoptionsfortheactiveworkbookbyclickingtheAdvancedtab.
ThereareseveralsettingsyoucanchangeontheAdvancedtabpageoftheShare
Workbookdialogbox,buttwosettingsareofgreaterinterestthantheothers.Thefirst
settinghastodowithwhetherMicrosoftExcelshouldmaintainahistoryofchanges
madetotheworkbookand,ifso,forhowmanydaysExcelshouldkeepthechanges.
Thedefaultsettingistoretainarecordofallchangesmadeinthepast30days,butyou
canenteranynumberofdaysyoulike.Unlessitscriticalthatyoukeepallchanges
madetoaworkbook,youshouldprobablystaywiththedefaultsettingof30days.
TheotherimportantsettingonthistabpagedealswithhowExcelwilldecidewhich
oftwoconflictingchangesinacellshouldbeapplied.Forexample,aproductsprice
mightchange,andtwoofyourcolleaguescouldtypeinwhattheythinkisthenew
price.SelectingtheAskmewhichchangeswinoptionbuttonletsyoudecidewhich
pricetokeep.
Anotherwaytoshareaworkbookistosendacopyofittoyourcolleaguesviae-mail.
If,forexample,TheGardenCompanysowner,CatherineTurner,wereonabusiness
tripvisitingasupplier,shecouldreceiveacopyofaworkbookasane-mailattachment. Attach
288
CollaboratingwithColleagues
16
Whilethespecificcommandtoattachafiletoane-mailmessagewillbedifferentin
everyprogram,themostcommonmethodofattachingafileistocreateanewe-mail
messageandthenclicktheAttachbutton,asinMicrosoftOutlookExpress.
Inthisexercise,youturnonworkbooksharingandthenattachthefiletoanOutlook
Expresse-mailmessage.
Important YouwillneedOutlookExpresstocompletethisexercise.
OPEN:SharingfromtheSBS\Excel\Collaboratingfolder.
1 OntheToolsmenu,clickShareWorkbook.
TheShareWorkbookdialogboxappearswithalistofeveryuserwhoisaccessing
theworkbook.
2 SelecttheAllowchangesbymorethanoneuseratthesametimecheckbox,and
thenclicktheAdvancedtab.
TheAdvancedtabpageappears.
3 ClickOKtoacceptthedefaultsettings.
4 Ifamessageboxappears,clickOKtocloseit,andthensavetheworkbook.
5 ClickthedocumentsClosebuttontocloseSharing.xls.
Close 6 OntheMicrosoftWindowstaskbar,opentheStartmenu,andopenOutlook
Express.
TheOutlookExpresswindowopens.
289
16
CollaboratingwithColleagues
7 ClicktheNewMailbutton.
Anewe-mailmessageappears.
NewMail
8 ClicktheAttachbutton.
TheInsertAttachmentdialogboxappears.
9 NavigatetotheC:\SBS\Excel\Collaboratingdirectory,andthendouble-click
Sharing.xls.
TheInsertAttachmentdialogboxdisappears,andSharing.xlsappearsinthe
headerintheAttachfield.
10 ClicktheClosebuttontoclosethemessage,andthenclickNointhemessagebox
thatappears,toclosethemessagewithoutsavingit.
Note Thereisnoe-mailaddressintheTobox,soclickingtheSendbuttonwouldhave
noeffect.
CLOSE:OutlookExpress.
290
Microsoft
Office
Specialis
CollaboratingwithColleagues
16
ManagingComments
Microsoft
Excelmakesiteasyforyouandyourcolleaguestoinsertcommentsinworkbook
Office
Specialistt
cells,addinginsightsthatgobeyondthecelldata.Forexample,ifsaleswereexcep-
tionallyhighforanhourofaparticularday,themanagerondutycouldadda
commenttothecellinwhichsherecordsthesalesforthathour,notingthattwo
exceptionallylargepurchasesaccountedforthedisparity.
Whenyouaddacommenttoacell,aflagappearsintheupperrightcornerofthe
cell.Whenthemousepointerhoversoveracellwithacomment,thecommentcan
appearinaboxnexttothecell,alongwiththenameoftheuserloggedontothe
computeratthetime.
Important Notethatthenameattributedtoacommentmightnotbethesameas
thepersonwhoactuallycreatedit.Enforcingaccesscontrols,suchasrequiringusersto
enteraccountnamesandpasswordswhentheyaccessacomputer,canhelptrackwho
madewhatcommentorchange.
YoucanaddacommenttoacellbyclickingthecellandclickingCommentonthe
Insertmenu.Whenyoudo,thecommentflagappearsinthecellandacommentbox
appearsnexttothecell.Youcantypethecommentintheboxand,whenyoure
done,clickanothercelltoclosetheboxforediting.Whenyoumovethemouse
pointeroverthecellwiththecomment,thecommentwillappearnexttothecell.
Ifyouwantthecommenttobeshowntheentiretimetheworkbookisopen,right-
clickthecellwiththecommentandthenclickShowCommentfromtheshortcut
menuthatappears.YoucanhidethecommentbyclickingHideCommentfromthe
samemenu,deletethecommentbyclickingDeleteComment,oropenthecomment
foreditingbyclickingEditComment.
Note Whensomeoneotherthantheoriginalusereditsacomment,thatpersons
inputismarkedwiththenewusersnameandisaddedtotheoriginalcomment.
Ifyouwanttoselecteverycellwithacomment,youcandosousingtheGoTodialog
box.TodisplaytheGoTodialogbox,opentheEditmenuandclickGoTo.IntheGo
Todialogbox,clickSpecialtodisplaytheGoToSpecialdialogbox,whichhasthe
controlstoselectcellswithcomments(orformulas,orconstants,orotherspecial
typesofcontents).WhenyouselecttheCommentsoptionbuttonandclickOK,Excel
willselecteverycellthatcontainsacomment.
Inthisexercise,youaddcommentstotwocells.Youthenhighlightthecellswith
comments,reviewacomment,anddeletethatcomment.
291
16
CollaboratingwithColleagues
OPEN:CommentsfromtheSBS\Excel\Collaboratingfolder.
1 ClickcellD3.
2 OntheInsertmenu,clickComment.
Acommentfieldappears.
3 Inthecommentfield,typeRemembertofigureinourtwonewlinesandthenclick
cellF5.
AredcommentflagappearsintheupperrightcornerofcellD3.
4 MovethemousepointerovercellD3.
ThecommentincellD3appears.
5 OntheInsertmenu,clickComment.
AcommentfieldappearsforcellF5.
6 Inthecommentfield,typeHopetobuildourownfurnitureby2006.Clickon
anotherfieldtoclosethecomment.
7 OntheEditmenu,clickGoTo.
TheGoTodialogboxappears.
8 ClickSpecial.
TheGoToSpecialdialogboxappears.
9 Ifnecessary,selecttheCommentsoptionbutton,andclickOK.
CellsD3andF5,whichcontaincomments,areselected.
10 ClickanycellotherthanD3orF5tocleartheselection.
11 Right-clickcellD3,andthen,fromtheshortcutmenuthatappears,clickDelete
Comment.
ThecommentisdeletedfromcellD3.
292
Microsoft
Office
Specialis
CollaboratingwithColleagues
16
12 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:Comments.
TrackingandManagingColleaguesChanges
Microsoft
Wheneveryoucollaboratewithanumberofyourcolleaguesinproducingoreditinga
Office
Specialistt
document,youshouldconsidertrackingthechangeseachusermakes.Whenyouturn
onchangetracking,anychangesmadetotheworkbookarehighlightedinacolor
assignedtotheuserwhomadethechanges.Onebenefitoftrackingchangesisthatif
youhaveaquestionaboutachange,youcanquicklyidentifywhomadethechange
andverifythatitiscorrect.InExcel,youcanturnonchangetrackinginaworkbook
bypointingtoTrackChangesontheToolsmenuandthenclickingHighlightChanges.
IntheHighlightChangesdialogboxthatappears,youselecttheTrackchangeswhile
editingcheckbox.Selectingthischeckboxsavesyourworkbook,turnsonchange
tracking,andalsosharesyourworkbook,allowingmorethanoneusertoaccessthe
workbooksimultaneously.YoucanusethecontrolsintheHighlightChangesdialog
boxtochoosewhichchangestotrack,butclearingtheWhen,Who,andWherecheck
boxeswillhaveExceltrackallchanges.Nowwheneveranyonemakesachangeto
theworkbook,thechangewillbeattributedtotheuserloggedintothecomputer
fromwhichthechangewasmade.Eachuserschangeswillbedisplayedinaunique
color.Aswithacomment,whenyoumovethemousepointeroverachange,thedate
andtimethechangewasmadeandthenameoftheuserwhomadeitappearasa
ScreenTip.
Onceyouandyourcolleaguesarefinishedmodifyingaworkbook,youcandecide
whichchangestoacceptandwhichchangestoreject.Tostarttheprocess,onthe
Toolsmenu,pointtoTrackChanges,andthenclickAcceptorRejectChanges.Afteryou
clearthemessageboxindicatingthatExcelwillsaveyourworkbook,theSelect
ChangestoAcceptorRejectdialogboxappears.
YoucanusetheWhendownarrowtochoosewhichchangestoreview.Thedefault
choiceisNotyetreviewed,butyoucanalsoclickSincedatetoopenadialogboxinto
whichyoucanenterthestartingdateofchangesyouwanttoreview.Toreviewall
changesinyourworkbook,cleartheWhen,Who,andWherecheckboxes.
Whenyouarereadytoacceptorrejectchanges,clickOK.TheAcceptorReject
Changesdialogboxappears,withthefirstchangedescribedinthebodyofthedialog
box.ClickingtheAcceptbuttonletsthechangetakeeffect,whileclickingtheReject
buttonremovesthechange,restoresthecelltoitspreviousvalue,anderasesany
recordofthechange.ClickingAcceptAllorRejectAllwillimplementallchangesor
restoreallcellstotheiroriginalvalues,butyoushouldchooseoneofthoseoptions
onlyifyouareabsolutely certainyouaredoingtherightthing.
293
16
CollaboratingwithColleagues
Ifyouwantanitemizedrecordofallchangesyouhavemadesincethelasttimeyou
savedtheworkbook,youcanaddaHistoryworksheettoyourworkbook.Toadda
Historyworksheet,opentheHighlightChangesdialogboxandselecttheListchanges
onanewsheetcheckbox.WhenyouclickOK,anewworksheet,namedHistory,
appearsinyourworkbook.Thenexttimeyousaveyourworkbook,theHistory
worksheetisdeleted.
Inthisexercise,youturnonchangetrackinginaworkbook,acceptorrejectchanges,
andcreateaHistoryworksheet.
OPEN:TrackingfromtheSBS\Excel\Collaboratingfolder.
1 OntheToolsmenu,pointtoTrackChangesandthenclickHighlightChanges.
TheHighlightChangesdialogboxappears.
2 SelecttheTrackchangeswhileeditingcheckbox.
Tip SelectingtheTrackchangeswhileeditingcheckboxalsoturnsonworkbook
sharing.
3 Ifnecessary,cleartheWhencheckbox.
4 Ifnecessary,cleartheWhocheckbox.
5 Ifnecessary,selecttheHighlightchangesonscreencheckbox.
6 ClickOK.
TheHighlightChangesdialogboxdisappears.
7 ClickOKtosavetheworkbookandclearthemessageboxthatappears.
8 IncellD3,type235000andpressF.
Thevalue$235,000appearsincellD3,thecellisoutlinedinthecolorassignedto
thecurrentuser,andaflagappearsintheupperleftcornerofthecell.
9 IncellD4,type300000andpressF.
294
CollaboratingwithColleagues
16
Thevalue$300,000appearsincellD4,thecellisoutlinedinthecolorassignedto
thecurrentuser,andaflagappearsintheupperleftcornerofthecell.
Save
10 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
11 OntheToolsmenu,pointtoTrackChangesandthenclickHighlightChanges.
TheHighlightChangesdialogboxappears.
12 SelecttheListchangesonanewsheetcheckbox,andthenclickOK.
Tip Iftheworkbookhadsharingturnedonwhenyouenabledchangetracking,
theListchangesonanewsheetcheckboxwouldhavebeenavailablewhenyou
openedtheHighlightChangesdialogboxearlier.
AnewworksheetnamedHistoryappearsintheworkbook.
13 Ifnecessary,onthetabbar,clicktheHistorysheettab.
TheHistoryworksheetappears.
295
Microsoft
Office
Specialis
16
CollaboratingwithColleagues
14 Onthetabbar,clicktheSheet1sheettab.
TheSheet1worksheetappears.
15 ClickcellA1.
16 OntheToolsmenu,pointtoTrackChangesandthenclickAcceptorRejectChanges.
17 ClickOKtosavetheworkbookandclearthemessageboxthatappears.
TheSelectChangestoAcceptorRejectdialogboxappears.
18 VerifythattheWhencheckboxisselectedandthatNot yet reviewedappearsinthe
Whenbox.
19 ClickOK.
TheAcceptorRejectChangesdialogboxappearswiththefirstchangelisted.
20 ClickAccepttoacceptthechange.
Thesecondchangeappearsinthedialogbox.
21 ClickReject.
ThevalueincellD4isremoved,andtheHistoryworksheetisdeleted.
22 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
CLOSE:Tracking.
IdentifyingWhichRevisionstoKeep
Microsoft
Trackingchangesletsyouandyourcolleaguesmodifyadocument,maintainarecord
Office
Specialistt
ofthechanges,andchoosewhichchangestokeepinthefinalversion.Whenevery
individualwithinputintoadocumentcantaccessthesamecopyoftheworkbook,
suchasifaseniormanagerisawayonabusinesstrip,youcanstillallowyourcol-
leaguesinputintothefinalversionofadocumentbysendingthemduplicatesofthe
originaldocumentandthenmergingthechangesintheircopiesintotheoriginal
document.
296
CollaboratingwithColleagues
16
Todistributecopiesofadocumentandmergethechangesintotheoriginal,thefiles
involvedmustmeetthesecriteria:
Alldistributedfilesmustbecopiesofthesameworkbook,whichmusthavehad
sharing,changetracking,andchangehistoryturnedonwhenitwascopied.
Allfilesmusthavedifferentfilenames.
Allfilesmusteitherhavenopasswordorhavethesamepassword.
Alldistributedfilesmusthavemaintainedachangehistorycontinuouslysince
distribution(thatis,neverhadsharing,changetracking,orchangehistory
turnedoff).
Whenallfilesmeetthesecriteria,youcanmergechangesfromthedistributedcopies
ofafileintotheoriginalfileandthenchoosewhichchangestokeep.Tobeginmerg-
ingfiles,opentheoriginalfileandthen,ontheToolsmenu,clickCompareandMerge
Workbooks.Whenyoudo,theSelectFilestoMergeIntoCurrentWorkbookdialogbox
appears.
HolddownHwhileyouclickthefilestomergeintotheactiveworkbook,andthen
clickOKtomakethechangesappearintheactiveworkbook.
Troubleshooting Ifthechangedcellsdontdisplaywithaflagintheupperleftcor-
nerorwithanoutlinearoundthecells,ontheToolsmenu,pointtoTrackChanges,and
thenclickHighlightChangestoopentheHighlightChangesdialogbox.IntheHighlight
Changesdialogbox,cleartheWhencheckboxandthenclickOK.Thedialogboxwilldis-
appear,andthechangedcellswillhavechangeflagsandoutlines.
Topickwhichchangestokeep,ontheToolsmenu,pointtoTrackChanges,andthen
clickAcceptorRejectChanges.ClickOKtocleartheSelectChangestoAcceptorReject
dialogboxanddisplaytheAcceptorRejectChangesdialogbox.Youcanthenaccept
orrejectindividualchanges.Ifthereareconflictingchangesforacell,allchangesfor
thatcellwillappearintheAcceptorRejectChangesdialogbox.Youselectwhich
changestokeepbyclickingthedesiredchangeandthenclickingAccept.
Inthisexercise,youmergechangesfromtwoworkbooksintoamasterworkbook.
OPEN:MergeTargetfromtheSBS\Excel\Collaboratingfolder.
1 OntheToolsmenu,clickCompareandMergeWorkbooks.
TheSelectFilestoMergeIntoCurrentWorkbookdialogboxappears.
2 HolddownHwhileclickingBuyer.xlsandOwner.xls,andthenclickOK.
ThechangesfromtheotherfilesappearinMergeTarget.xls.
297
Microsoft
Office
Specialis
16
CollaboratingwithColleagues
Troubleshooting Iftherearenoflagsinthecornersofcellswithchanges,
ontheToolsmenu,pointtoTrackChanges,andthenclickHighlightChanges.Inthe
HighlightChangesdialogbox,cleartheWhencheckboxandthenclickOK.
3 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
4 OntheToolsmenu,pointtoTrackChangesandthenclickAcceptorRejectChanges.
TheSelectChangestoAcceptorRejectdialogboxappears.
5 VerifythattheWhencheckboxisselectedandthatNot yet reviewedappearsinthe
Whenbox,thattheWhocheckboxiscleared,andthattheWherecheckboxis
cleared.
6 ClickOK.
TheSelectChangestoAcceptorRejectdialogboxdisappears,andtheAcceptor
RejectChangesdialogboxappearswithalistofchangesintheSelectavaluebox.
7 Clickthechangestartingwith$265,000.00,andthenclickAccept.
Thechangeyouacceptedtakeseffect,andthenextchangeappearsintheAccept
orRejectChangesbox.
8 ClickAccepttoacceptthechange.
ThevalueincellF4is$175,000,andtheAcceptorRejectChangesboxdisappears.
9 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:MergeTarget.
ProtectingWorkbooksandWorksheets
Microsoft
ExcelgivesyoutheabilitytoshareyourworkbooksovertheWeb,viaacorporate
Office
Specialistt
intranet,andbycopyingfilesforotheruserstotakewiththemonbusinesstrips.An
importantpartofsharingfiles,however,isensuringthatonlythoseusersyouwantto
haveaccesstothefilescanopenormodifythem.Forexample,TheGardenCompany
mighthaveaseriesofcomputersavailableonthesalesfloorsothatsalesassociates
canlookuppricesandinventoryinformation.Whilethosecomputersarevitaltoolsin
298
CollaboratingwithColleagues
16
makingsales,itwouldnthelpthecompanytohavecustomers,eventhosewithgood
intentions,accessingcriticalworkbooks.
Youcanlimitaccesstoyourworkbooks,orelementswithinaworkbook,bysetting
passwords.SettingapasswordforanExcelworkbookmeansthatanyuserswho
wanttoaccesstheprotectedworkbookmustentertheworkbookspasswordinadia-
logboxthatappearswhentheytrytoopenthefile.Ifthepersondoesntknowthe
password,heorshewillbeunabletoopentheworkbook.
Tosetapasswordforaworkbook,opentheworkbooktobeprotected,andonthe
Filemenu,clickSaveAs.TheSaveAsdialogboxappears,withthenameoftheopen
workbookintheFilenamebox.
Onthetoolbar,clicktheToolsmenuheadandthenclickGeneralOptionstoopenthe
SaveOptionsdialogbox.IntheSaveOptionsdialogbox,youcanrequireusersto
enteronepasswordtoopentheworkbookandanothertomodifyit.Afteryouclick
OK,aConfirmPassworddialogboxwillappearsothatyoucanverifythepasswords
requiredtoaccessandmodifytheworkbook.Afteryouhaveconfirmedthepass-
words,clickSaveintheSaveAsdialogboxtofinishaddingpasswordprotectionto
theworkbook.Tolaterremovethepasswordsfromaworkbook,repeatthesesteps,
butdeletethepasswordsfromtheSaveOptionsdialogboxandsavethefile.
Tip Thebestpasswordsarerandomstringsofcharacters,butrandomcharactersare
hardtoremember.Onegoodmethodofcreatinghard-to-guesspasswordsistocombine
elementsoftwowordswithanumberinbetween.Forexample,youmighthaveapass-
wordwbk16pro,whichcouldbereadasworkbook,Chapter16,protection.Inanyevent,
avoiddictionarywordsinEnglishoranyotherlanguage,astheycanbefoundeasilyby
password-guessingprogramsavailableontheInternet.
Ifyouwanttoallowanyonetoopenaworkbookbutwanttopreventunauthorized
usersfromeditingaworksheet,youcanprotectaworksheetbydisplayingthatwork-
sheet,pointingtoProtectionontheToolsmenu,andthenclickingProtectSheetto
opentheProtectSheetdialogbox.
IntheProtectSheetdialogbox,youselecttheProtectworksheetandcontentsoflocked
cellscheckboxtoprotectthesheet.Youcanalsosetapasswordthatausermust
typeinbeforeprotectioncanbeturnedoffagainandchoosewhichelementsofthe
worksheetausercanchangewhileprotectionisturnedon.Toallowausertochange
aworksheetelementwithoutenteringthepassword,selectthecheckboxnexttothat
elementsname.
Thecheckboxatthetopoftheworksheetmentionslocked cells.Alockedcellisa
cellthatcantbechangedwhenworksheetprotectionisturnedon.Youcanlockor
unlockacellbyright-clickingthecellandchoosingFormatCellsfromtheshortcut
menuthatappears.IntheFormatCellsdialogbox,youclicktheProtectiontabtodis-
playtheProtectiontabpageandselecttheLockedcheckbox.
299
16
CollaboratingwithColleagues
Whenworksheetprotectionisturnedon,selectingtheLockedcheckboxprevents
unauthorizedusersfromchangingthecontentsorformattingofthelockedcell,while
selectingtheHiddencheckboxhidestheformulasinthecell.Youmightwanttohide
theformulainacellifyoudrawsensitivedata,suchascustomercontactinformation,
fromanotherworkbookanddontwantcasualuserstoseethenameofthework-
bookinaformula.
Finally,youcanpassword-protectacellrange.Forexample,youmightwanttolet
usersentervaluesinmostworksheetcellsbutalsowanttoprotectthecellswithfor-
mulasthatperformcalculationsbasedonthosevalues.Topassword-protectarangeof
cells,selectthecellstoprotect,andthenontheToolsmenu,pointtoProtectionand
clickAllowUserstoEditRanges.TheAllowUserstoEditRangesdialogboxappears.
Tocreateaprotectedrange,clicktheNewbuttontodisplaytheNewRangedialog
box.TypeanamefortherangeintheTitlebox,andthentypeapasswordinthe
Rangepasswordbox.WhenyouclickOK,Excelwillaskyoutoconfirmthepassword;
afteryoudo,clickOKintheConfirmPassworddialogboxandagainintheAllowUsers
toEditRangesdialogboxtoprotecttherange.Nowwheneverausertriestoedita
cellintheprotectedrange,heorshewillbepromptedforapassword.
Tip Rememberthatarangeofcellscanmeanjustonecell!
Inthisexercise,youpassword-protectaworkbook,aworksheet,andarangeofcells
andthenhideandunhidetheformulainacell.
OPEN:ProtectionfromtheSBS\Excel\Collaboratingfolder.
1 OntheFilemenu,clickSaveAs.
TheSaveAsdialogboxappears.
2 ClicktheToolsmenuhead,andthenclickGeneralOptions.
TheSaveOptionsdialogboxappears.
3 InthePasswordtoopenbox,typewbk16proandthenclickOK.
TheConfirmPassworddialogboxappears.
300
CollaboratingwithColleagues
16
4 IntheReenterpasswordtoproceedbox,typewbk16proandthenclickOK.
TheConfirmPassworddialogboxdisappears.
5 ClickSave.
6 Ifamessageboxappears,clickYestocloseit.
Excelsavestheworkbook,andtheSaveAsdialogboxdisappears.
7 Onthetabbar,clicktheMarchsheettabtomovetotheMarchworksheet.
8 OntheToolsmenu,pointtoProtectionandthenclickProtectSheet.
TheProtectSheetdialogboxappears.
9 InthePasswordtounprotectsheetbox,typewbk16proandthenclickOK.
TheConfirmPassworddialogboxappears.
10 Typewbk16prointhespaceprovided,andthenclickOK.
TheConfirmPassworddialogboxdisappears.
11 OntheToolsmenu,pointtoProtectionandthenclickUnprotectSheet.
TheUnprotectSheetdialogboxappears.
12 InthePasswordbox,typewbk16proandthenclickOK.
TheUnprotectSheetdialogboxdisappears,andthepasswordisremoved.
13 SelectcellsL36:O36.
14 OntheToolsmenu,pointtoProtectionandthenclickAllowUserstoEditRanges.
TheAllowUserstoEditRangesdialogboxappears.
301
16
CollaboratingwithColleagues
15 ClickNew.
TheNewRangedialogboxappears,with=$L$36:$O$36intheReferstocellsbox.
16 IntheTitlebox,typeLastDay.
17 IntheRangepasswordbox,typewbk16proandthenclickOK.
TheConfirmPassworddialogboxappears.
18 Typewbk16pro,andthenclickOK.
TheConfirmPassworddialogboxdisappears.
19 ClickOK.
TheAllowUserstoEditRangesdialogboxdisappears.
20 OntheToolsmenu,pointtoProtectionandthenclickAllowUserstoEditRanges.
TheAllowUserstoEditRangesdialogboxappears.
21 IntheRangesbox,clickLastDayandthenclickDelete.
Therangedisappearsfromthedialogbox.
22 ClickOKtoclosetheAllowUserstoEditRangesdialogbox.
23 Right-clickcellQ38,andthen,fromtheshortcutmenuthatappears,clickFormat
Cells.
TheFormatCellsdialogboxappears.
24 ClicktheProtectiontabtodisplaytheProtectiontabpage.
302
Microsoft
Office
Specialis
CollaboratingwithColleagues
16
25 SelecttheHiddencheckbox,andthenclickOK.
TheFormatCellsdialogboxdisappears.
26 OntheToolsmenu,pointtoProtectionandthenclickProtectSheet.
TheProtectSheetdialogboxappears.
27 ClickOKtoclosetheProtectSheetdialogbox.
TheProtectSheetdialogboxdisappears.CellQ38stillhasthevaluecalculatedby
itsformula,buttheformuladoesntappearintheformulabar.
28 OntheToolsmenu,pointtoProtectionandthenclickUnprotectSheet.
TheformulaincellQ38appearsintheformulabar.
29 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:Protection.
AuthenticateWorkbooks
Microsoft
Theunfortunaterealityofexchangingfilesovernetworks,especiallyovertheInternet,
Office
Specialistt
isthatyouneedtobesureyouknowwherethefilesyoureworkingwithcamefrom.
Onewayanorganizationcanguardagainstfileswithvirusesorsubstitutedataisto
authenticateeveryworkbookusingadigitalsignature.Adigitalsignatureisavalue,
createdbycombiningausersuniquesecretdigitalsignaturefilemathematicallywith
303
16
CollaboratingwithColleagues
thecontentsoftheworkbook,thatprogramssuchasExcelcanrecognizeanduseto
verifytheidentityoftheuserwhosignedthefile.Agoodanalogforadigitalsignature
isawaxseal,whichwasusedforthousandsofyearstoverifytheintegrityandorigin
ofadocument.
Note Thetechnicaldetailsofandprocedureformanagingdigitalcertificatesare
beyondthescopeofthisbook,butyournetworkadministratorshouldbeabletocreatea
digitalcertificateforyou.Youcanalsodirectlypurchaseadigitalsignaturefromathird
party,whichcanusuallyberenewedannuallyforasmallfee.Forthepurposesofthis
book,youllusetheselfcert.exeOfficeaccessoryprogramtogenerateacertificatewith
whichtoperformtheexerciseattheendofthechapter.Thistypeofcertificateisuseful
forcertifyingadocumentonyourowncomputerbutisnotavalidcertificatetoverifyyour-
selftoothersacrossyournetworkorontheInternet.
Readtheinformationthatexplainsthelimitationsofaself-signeddigitalcertificate.
NoticetoothatyoucanclickthelinkClickhereforalistofcommercialcertificate
authoritiesifyouwanttopurchaseadigitalcertificatethatcanbeusedtoverifyyour
identityoveranetworkortheInternet.Tocreateadigitalcertificateyoucanuseasa
demonstration,youwouldopentheStartmenuandclickRun.IntheOpenbox,type
C:\ProgramFiles\MicrosoftOffice\OFFICE11\Selfcert.exe(orthedirectorywhere
Officeisinstalled,ifnotinthedefaultdirectory)andpressF.IntheCreateDigital
Certificatedialogbox,typeanameforyourcertificateandclickOKtohavethepro-
gramcreateyourtrialcertificate.Then,ontheToolsmenu,clickOptions.Inthe
Optionsdialogbox,clicktheSecuritytab,andclickDigitalSignatures.IntheDigital
Signaturesdialogbox,clickAddtodisplaytheSelectCertificatedialogbox.
IntheSelectCertificatedialogbox,clickthecertificatewithwhichyouwanttosign
theworkbookandclickOK.TheSelectCertificatedialogboxwilldisappear,andthe
certificatewithwhichyousignedtheworkbookwillbelistedintheThefollowinghave
digitallysignedthisdocumentbox.ClickOKtoclosetheDigitalSignaturesdialogbox,
andagaintoclosetheOptionsdialogbox.
Inthisexercise,youcreateadigitalcertificateanddigitallysignaworkbookwiththe
certificate.
OPEN:SignaturefromtheSBS\Excel\Collaboratingfolder.
1 OntheStartmenu,clickRun.
TheRundialogboxappears.
2 TypeC:\ProgramFiles\MicrosoftOffice\OFFICE11\Selfcert.exeintheOpenbox,and
pressF.
Note IfOffice2003isinstalledinadifferentlocationthanindicatedabove,you
willneedtoadjustthepathaccordingly.
304
CollaboratingwithColleagues
16
TheCreateDigitalCertificatedialogboxappears.
3 IntheYourCertificatesNamebox,typeExcelTrial,andclickOK.
Selfcert.execreatesyourtrialcertificate.
4 ClickOKtoclosetheSelfCertSuccessmessagebox.
5 OntheToolsmenu,clickOptions.
TheOptionsdialogboxappears.
6 ClicktheSecuritytabtodisplaytheSecuritytabpage,andclickDigitalSignatures.
TheDigitalSignaturesdialogboxappears.
7 ClickAdd.
TheSelectCertificatedialogboxappearsandlistsavailablecertificates.
8 ClicktheExcelTrialcertificateandclickOK.
TheSelectCertificatedialogboxdisappears,andthecertificatewithwhichyou
signedtheworkbookwillbelistedintheThefollowinghavedigitallysignedthis
documentbox.
9 ClickOKtoclosetheDigitalSignaturesdialogbox,andagaintoclosetheOptions
dialogbox.
10 OntheStandardtoolbar,clicktheSavebuttontosaveyourwork.
Save
CLOSE:Collaborating.
305
16
CollaboratingwithColleagues
KeyPoints
Sharingaworkbookletsmorethanoneuserviewandeditthedataatonetime,
whichisusefulingroupprojectswhereeachmemberhasadistinctareaof
responsibility.
Sendingfilesbye-mailisaveryefficientmeansofcollaboratingwithcolleagues.
Addingcommentstocellsisaquickwaytoletyourcolleaguesknowwhat
yourethinking,withouttakingupvaluablespaceinacell.
UsetheGoTodialogboxtofindcellswithspecialcontents,suchascomments,
constants,orformulas.
Trackingchangesisvitalwhenyoushareresponsibilityforaworkbookwith
severalotherpeople.
Ifyourcolleaguesarentintheofficewhenyouare,youcandistributecopiesof
yourworkbookandlatermergeyourcolleagueschangesallatonce.
Whenyourworkbooksdataistooimportanttoleavelyingaroundintheopen,
usepasswordstoprotectallorpartofthefile!
Authenticatingworkbookswithdigitalsignatureshelpstoidentifythesourceof
yourfiles,soyouwonthavetoguessabouttheoriginsofthatnextattachment
inyoure-mailinbox.
306
Glossary
3-Dreference Apatternforreferringtotheworkbook,worksheet,andcellfrom
whichavalueshouldberead
activecell Thecellthatiscurrentlyselectedandopenforediting
Add-In AsupplementalprogramthatcanbeusedtoextendExcelsfunctions
alignment Themannerinwhichacellscontentsarearrangedwithinthatcell(for
example,centered)
arguments Specificdataafunctionrequirestocalculateavalue
aspectratio Therelationshipbetweenagraphicsheightandwidth
auditing Theprocessofexaminingaworksheetforerrors
AutoComplete Theabilitytocompletedataentryforacellbasedonsimilarvaluesin
othercellsinthesamecolumn
AutoFill Theabilitytoextendaseriesofvaluesbasedonthecontentsofasinglecell
AutoFilter AMicrosoftExceltoolyoucanusetocreatefilters
AutoFormats Predefinedformatsthatcanbeappliedtoaworksheet
AutoRepublish AnExceltechnologythatmaintainsalinkbetweenaWebdocument
andtheworksheetonwhichtheWebdocumentisbasedandupdatestheWeb
documentwhenevertheoriginalworksheetissaved
browser AprogramthatletsusersviewWebdocuments
cell Theboxattheintersectionofarowandacolumn
cellrange Agroupofcells
cellreference Theletterandnumbercombination,suchasC16,thatidentifiesthe
rowandcolumnintersectionofacell
charts Visualsummariesofworksheetdata,alsocalledgraphs
columns Cellsthatareonthesameverticallineinaworksheet
conditionalformats Formatsthatareappliedonlywhencellcontentsmeetcertain
criteria
conditionalformula Aformulathatcalculatesavalueusingoneoftwodifferent
expressions,dependingonwhetherathirdexpressionistrueorfalse
dataconsolidation Summarizingdatafromasetofsimilarcellranges
309
Glossary
datalist Oneormorecolumnsofdatadepictingmultipleinstancesofasinglething
(suchasanorder)
datamap ApatternofdatarepresentedinanXMLfile
dependents Thecellswithformulasthatusethevaluefromaparticularcell
driver Aprogramthatcontrolsaccesstoafileordevice
dynamic-linklibrary Afilewithprogrammingcodethatcanbecalledbyaworksheet
function
embed Tosaveafileaspartofanotherfile,asopposedtolinkingonefileto
another
errorcode Abriefmessagethatappearsinaworksheetcell,describingaproblem
withaformulaorafunction
ExtensibleMarkupLanguage(XML) Acontent-markingsystemthatletsyoustore
dataaboutthecontentsofadocumentinthatdocument
field Acolumninadatalist
fillhandle Thesquareatthelowerrightcornerofacellyoudragtoindicateother
cellsthatshouldholdvaluesintheseriesdefinedbytheactivecell
FillSeries Theabilitytoextendaseriesofvaluesbasedonthecontentsoftwocells,
wherethefirstcellhasthestartingvaluefortheseriesandthesecondcell
showstheincrement
filter ArulethatExcelusestodeterminewhichworksheetrowstodisplay
formats Predefinedsetsofcharacteristicsthatcanbeappliedtocellcontents
formula Anexpressionusedtocalculateavalue
freeze Toassigncellsthatwillremainatthetopofaworksheetregardlessofhow
fardowntheworksheetauserscrolls
function Apredefinedformula
GoalSeek Ananalysistoolthatfindsthevalueforaselectedcellthatwould
produceagivenresultfromacalculation
graphs Visualsummariesofworksheetdata,alsocalledcharts
hyperlink AreferencetoafileontheWorldWideWeb
HypertextMarkupLanguage(HTML) Adocument-formattingsystemthattellsaWeb
browsersuchasInternetExplorerhowtodisplaythecontentsofafile
landscapemode Adisplayandprintingmodewherebycolumnsrunparalleltothe
shortedgeofasheetofpaper
310
Glossary
link Aformulathathasacellshowthevaluefromanothercell
lockedcells Cellsthatcannotbemodifiediftheirworksheetisprotected
macro Aseriesofrecordedautomatedactionsthatcanbereplayed
mailto Aspecialtypeofhyperlinkthatletsausercreateane-mailmessagetoa
particulare-mailaddress
MergeandCenter Anoperation,initiatedbyclickingtheMergeandCentertoolbar
button,thatcombinesacontiguousgroupofcellsintoasinglecell.Selectinga
mergedcellandclickingtheMergeandCentertoolbarbuttonsplitsthemerged
cellsintotheoriginalgroupofseparatecells.
metadata Datathatdescribesthecontentsofafile
namedrange Agroupofrelatedcellsdefinedbyasinglename
OpenDataBaseConnectivity(ODBC) Aprotocolthatfacilitatesdatatransferbetween
databasesandrelatedprograms
PasteOptions Abutton,whichappearsafteryoupasteanitemfromtheClipboard
intoyourworkbook,thatletsyoucontrolhowtheitemappearsintheworkbook
PickfromList Theabilitytoenteravalueintoacellbychoosingthevaluefromthe
setofvaluesalreadyenteredintocellsinthesamecolumn
pivot ToreorganizethecontentsofaPivotTable
PivotChart AchartthatislinkedtoaPivotTableandthatcanbereorganized
dynamicallytoemphasizedifferentaspectsoftheunderlyingdata
PivotTable Adynamicworksheetthatcanbereorganizedbyauser
portraitmode Adisplayandprintingmodewherebycolumnsrunparalleltothe
longedgeofasheetofpaper
precedents Thecellsthatareusedinaformula
primarykey Afieldorgroupoffieldswithvaluesthatdistinguisharowinadatalist
fromallotherrowsinthelist
property Afiledetail,suchasanauthornameorprojectcode,thathelpsidentify
thefile
query Astatementthatlocatesrecordsinadatabase
range Agroupofrelatedcells
refresh Toupdatethecontentsofonedocumentwhenthecontentsofanother
documentarechanged
311
Glossary
relativereference Acellreferenceinaformula,suchas=B3,thatreferstoacellthat
isaspecificdistanceawayfromthecellthatcontainstheformula.Forexample,
iftheformula=B3wereincellC3,copyingtheformulatocellC4wouldcause
theformulatochangeto=B4.
report Aspecialdocumentwithlinkstooneormoreworksheetsfromthesame
workbook
rows Cellsthatareonthesamehorizontallineinaworksheet
scenarios Alternativedatasetsthatletyouviewtheimpactofspecificchangeson
yourworksheet
schema AdocumentthatdefinesthestructureofasetofXMLfiles
sharing Makingaworkbookavailableformorethanoneusertoopenandmodify
simultaneously
sheettab Theindicatorforselectingaworksheet,locatedinthelowerleftcornerof
theworkbookwindow
smarttags AMicrosoftOfficetechnologythatrecognizesvaluesinaspreadsheet
andfindsrelatedinformationontheWeb
sort Toreorderthecontentsofaworksheetbasedonacriterion
splitbar Alinethatdefineswhichcellshavebeenfrozenatthetopofaworksheet
subtotals Partialtotalsforrelateddatainaworksheet
tables Datalistsinadatabase
tags Marksusedtoindicatedisplaypropertiesortocommunicatedataaboutthe
contentsofadocument
template Aworkbookusedasapatternforcreatingotherworkbooks
trendline Aprojectionoffuturedata(suchassales)basedonpastperformance
validationrule Atestthatdatamustpasstobeenteredintoacellwithoutgenerating
awarningmessage
what-ifanalysis Analysisofthecontentsofaworksheettodeterminetheimpactthat
specificchangeshaveonyourcalculations
workbook ThebasicExceldocument,consistingofoneormoreworksheets
worksheet ApageinanExcelworkbook
workspace AnExcelfiletype(.xlw)thatallowsyoutoopenseveralfilesatonce
312
CurtisFrye
CurtFryeisafreelancewriterfromPortland,Oregon.Heistheauthoroffivebooks
fromMicrosoftPress:Microsoft Excel 2003 Step by Step,Microsoft Access 2002 Plain &
Simple,Microsoft Excel 2002 Plain & Simple,Microsoft Excel 2002 Step by Step,and
Faster Smarter Home Networking.HecontributedsixchapterstoMicrosoft Office v. X
for Mac Inside Out.Hesalsowrittenseveralotherbooksandonlinecourseson
Microsofttechnologies,programming,andprivacy-enhancingtechnologies.
BeforebeginninghiswritingcareerinJune1995,CurtspentfouryearswithThe
MITRECorporationasadefensetradeanalystandoneyearasDirectorofSalesand
MarketingforDigitalGatewaySystems,anInternetserviceprovider.Curtgraduated
fromSyracuseUniversityin1990withanhonorsdegreeinpoliticalscience.When
hesnotwriting,CurtisaprofessionalimprovisationalcomedianwithComedySportz.
Acknowledgments
Creatingabookisatime-consuming(sometimesall-consuming)process,butworking
withinanestablishedrelationshipmakeseverythinggomuchmoresmoothly.Inthat
light,IdliketothankAlexBlanton,theacquisitionseditor,forinvitingmebackfor
anothertiltatthewindmill.IvebeenluckytoworkwithMicrosoftPressforthepast
threeyears,butthisismyfirsttimesharingaprojectwithAileenWrothwell,theStep
byStepserieseditor.Shekeptusallontrackandmovingforwardwhilemaintaining
hersenseofhumor.
IdalsoliketothanktechnicaleditorandproductioncoordinatorCurtisPhilipsof
Publishing.com.AileentoutedhisgroupasoneofMicrosoftsbestpackagers,and
theyallliveduptotheirreputation.CurtPhilipsdidagreatjobwiththetechnical
edit,TeriKiefferkeptmeonthestraightandnarrowwithathoroughcopyedit,
MollySharpbroughteverythingtogetherasthebookscompositor,andAndreaFox
completedtheprojectwithacarefulproofread.IhopeIgetthechancetoworkwith
allofthemagain.

Vous aimerez peut-être aussi