Managing & Tabulating Data in Excel
Learn the Power Features of Excel
Excel for Professionals 2002 VJ Books. All rights reside with the author.
Managing & Tabulating Data in Excel
MMa aan nna aag ggi iin nng gg && TTa aab bbu uul lla aat tti iin nng gg DDa aat tta aa iin
M
& T
D
i
nn EEx xxc cce eel ll
E
Volume 4 of the series E
eel ll ffo
EEx
cce
xxc
oor rr PPr rro oof ffe ees sss ssi iio oon nna aal lls ss
f
P
Volume 1: Excel For Beginners
Volume 2: Charting in Excel
Volume 3: Excel Beyond The Basics
Volume 4: Managing & Tabulating Data in Excel
Volume 5: Statistical Analysis with Excel
Volume 6: Financial Analysis using Excel
Published by VJ Books Inc
All rights reserved. No part of this book may be used or reproduced in any form or by any means, or stored in a database or retrieval system, without prior written permission of the publisher except in the case of brief quotations embodied in reviews, articles, and research papers. Making copies of any part of this book for any purpose other than personal use is a violation of United States and international copyright laws.
First year of printing: 2002
Date of this copy: Monday, December 16, 2002
This book is sold as is, without warranty of any kind, either express or implied, respecting the contents of this book, including but not limited to implied warranties for the book's quality, performance, merchantability, or fitness for any particular purpose. Neither the author, the publisher and its dealers, nor distributors shall be liable to the purchaser or any other person or entity with respect to any liability, loss, or damage caused or alleged to be caused directly or indirectly by the book.
This book is based on Excel versions 97 to XP. Excel, Microsoft Office, Microsoft Word, and Microsoft Access are registered trademarks of Microsoft Corporation.
Publisher: VJ Books Inc, Canada
Author: Vijay Gupta
2
AAABBBOOOUUUTTT TTTHHHEEE AAAUUUTTTHHHOOORRR
Vijay Gupta has taught statistic, econometrics, and finance to institutions in the US and abroad, specializing in teaching technical material to professionals.
He has organized and held training workshops in the Middle East, Africa, India, and the US. The clients include government agencies, financial regulatory bodies, nonprofit and private sector companies.
A Georgetown University graduate with a Masters degree in economics, he has a vision of making the tools of econometrics and statistics easily accessible to professionals and graduate students. His books on SPSS and Regression Analysis have received rave reviews for making statistics and SPSS so easy and “nonmathematical.” The books are in use by over 150,000 users in more than 140 nations.
He is a member of the American Statistics Association and the Society for Risk Analysis.
In addition, he has assisted the World Bank and other organizations with econometric analysis, survey design, design of international investments, costbenefit, and sensitivity analysis, development of risk management strategies, database development, information system design and implementation, and training and troubleshooting in several areas.
Vijay has worked on capital markets, labor policy design, oil research, trade, currency markets, and other topics.
3
Managing & Tabulating Data in Excel
VVVIIISSSIIIOOONNN
Vijay has a vision for software tools for Office Productivity and Statistics. The current book is one of the first tools in stage one of his vision. We now list the stages in his vision.
Stage one: Books to Teach Existing Software
He is currently working on books on wordprocessing, and report production using Microsoft Word, and a booklet on Professional Presentations.
The writing of the books is the first stage envisaged by Vijay for improving efficiency and productivity across the world. This directly leads to the second stage of his vision for productivity improvement in offices worldwide.
Stage two: Improving on Existing Software
The next stage is the construction of software that will radically improve the usability of current Office software.
Vijay’s first software is undergoing testing prior to its release in Jan 2003. The software — titled “Word Usability Enhancer” — will revolutionize the way users interact with Microsoft Word, providing users with a more intuitive interface, readily accessible tutorials, and numerous timesaving and annoyanceremoving macros and utilities.
He plans to create a similar tool for Microsoft Excel, and, depending on resource constraints and demand, for PowerPoint, Star Office, etc.
4
Stage 3: Construction of the first “feedbackdesigned” Office and Statistics software
Vijay’s eventual goal is the construction of productivity software that will provide stiff competition to Microsoft Office. His hope is that the success of the software tools and the books will convince financiers to provide enough capital so that a successful software development and marketing endeavor can take a chunk of the multi billion dollar Office Suite market.
Prior to the construction of the Office software, Vijay plans to construct the “Definitive” statistics software. Years of working on and teaching the current statistical software has made Vijay a master at picking out the weaknesses, limitations, annoyances, and, sometimes, pure inaccessibility of existing software. This 1.5 billion dollar market needs a new visionary tool, one that is appealing and inviting to users, and not forbidding, as are several of the current software. Mr. Gupta wants to create integrated software that will encompass the features of SPSS, STATA, LIMDEP, EViews, STATISTICA, MINITAB, etc.
Other
He has plans for writing books on the “learning process.” The books will teach how to understand one’s approach to problem solving and learning and provide methods for learning new techniques for self learning.
5
CCCOOONNNTTTEEENNNTTTSSS
CHAPTER 1
SAVING (OPENING) IN (FROM) DIFFERENT FILE FORMATS 23
1.1 Spreadsheet, Database, Text & Statistical Software 23
Excel worksheet versions 2.0 to 4.0. 25
1.1.a 
Lotus 1–2–3 versions 1.0 to 4.0, Quattropro and dBase versions I to IV 26 
1.1.b 
Text 26 
1.1.c 
Many formats save only one worksheet 27 
1.1.d 
Many formats cannot store information on cell formatting, comments, etc 
27 

1.1.e 
Statistical application files: SPSS, SAS, STATA, etc 28 
1.1.f 
Database applications: Access, Oracle, MS SQL Server, FoxPro, Paradox, other 28 
1.2 Special Formats: Adobe PDF, Html, Web Archive, XML 28
1.3 Workspace— “I Have To Work On Several Files Together Each Day…Can't I Open Them All At One Time?” 29
Creating a workspace 29 Using the workspace— Opening several files together 30
1.4 New In The XP Version Of Excel: Document Recovery And Safe Mode 30
CHAPTER 2
DATA ENTRY FORM 33
2.1 An Easier Way To Type In Data Plus A MultiSeries “Find” Utility (Data /Form)
33
2.2 Form Based Data Entry 33
2.2.a
New data 34
2.3 Using The Form As A “Find” Or “Search” Utility 34
A Summary Of The Two Roles Of Data/Form 38
CHAPTER 3
REDUCING ERRORS IN DATA ENTRY— VALIDATION AND AUTOCORRECT 40
3.1 Validating Data During DataEntry 40
3.1.a 
Validation for numeric data 42 
3.1.b 
Message shown to person entering the data into cells that have “data 
3.1.c 
validation” criteria 46 Error Alert 47 
3.1.d 
The validation rule in action 48 
Contents
3.1.e 
Validation for text entry 50 
3.1.f 
Testing the validation 52 
3.1.g 
Ensuring that only a string from a set can be entered 52 
3.2 Removing Validation Rules From A Range 55
3.3 Copying And Pasting Validation Rules 56
3.4 Selecting All Cells With The Same Data Validation Rule 56
3.5 Using “Forms” And “Data Validation” 56
3.6 Autocorrect 57
CHAPTER 4
USING FILL AND OTHER TOOLS TO SAVE ON TYPING TIME 59
4.1 Making Excel Fill In Numbers And Dates 60
4.1.a 
Filling years/integers 60 
4.1.b 
Filling in every alternate year 62 
4.2 Auto Fill — Filling From PreDefined Lists Of Days, Months, Other 63
4.2.a
Filling weekdays 66
4.3 Creating A New “Custom List” 67
4.4 Filling Missing Values 72
4.4.a 
Using constant increase in values 73 
4.4.b 
Using constant growth rates 74 
4.5 Filling Formats 76
4.6 Copying The Active Cell 76
4.7 Using A RightClickOnMouse For QuickFilling 76
4.8 Placing Data Entry Icons Onto The Toolbar 77
4.9 “Speech To Text” 78
CHAPTER 5
“CONDITIONAL FORMATTING”— COLOR–CODING DATA PATTERNS
80
5.1 Understanding The Dialog 80
5.2 Defining The Condition 81
5.3 Step 1: Defining The Condition/Criteria 81
5.4 Step 2: Defining the format to use for Cells that satisfy the condition 82
5.5 Understanding The “Conditional Format” 84
Step 3: Adding more conditional formats 84
5.6 Defining A “Dynamic” Condition 85
5.7 Deleting Conditional Formats 87
5.8 Selecting All Cells With The Same Conditional Format Rule 87
7
Managing & Tabulating Data in Excel
CHAPTER 6
SORTING 89
6.1 Basic sorting 89
6.2 Names of series or columns 91
6.3 Case sensitivity 92
6.4 Sorting by rows 93
6.5 Sorting ranges that do not cover entire columns or rows 95
6.6 Choosing the entire worksheet 95
CHAPTER 7
FILTER (“HIDING THE DATA YOU DO NOT WANT TO VIEW”) 97
7.1 By one criterion on one column 98
7.1.a 
The Filtering arrows 99 
7.1.b 
Choosing the value to use as the Filtering criterion 99 
7.1.c 
The result: a Filtered worksheet 100 
7.1.d 
Copying and pasting the Filtered rows 101 
7.2 Removing the Filter 102
7.3 Custom Filtering — using multiple criterion, logical conditions, etc 102
7.3.a 
Example of a Filter that has two criteria over one series/column 103 
7.3.b 
Using the wildcard asterisk (*) 103 
7.4 Filtering using criteria from more than one column/series 104
7.5 New in the XP version of Excel 107
7.6 Icons for Sorting and Filtering 107
CHAPTER 8
SELECTING ALL CELLS/CONTENT ACROSS THE WORKSHEET THAT SATISFY A CRITERION 109
8.1 The “GO TO” option 109
8.1.a
Selecting cells with comments, empty cells, unhidden cells, cells in the contiguous region of the currently active cell 111
8.2 Conditional Formatting 112
8.3 Selecting based on Data Validation 113
8.4 Selecting based on formulae 114
8.4.a 
Constants 114 
8.4.b 
Formula Results 115 
8.5 Selecting based on cell references in formulas 116
8.5.a 
Selecting all cells whose formulas reference the active cell (directly or/and 
8.5.b 
indirectly) 116 Selecting all cells referenced (directly or/and indirectly) by the formula in the active cell 117 
8
Contents
8.6 GO TO / SPECIAL as a search tool 118
CHAPTER 9
SUBTOTALS 119
9.1 Basics 119
9.2 Before making subtotals 120
9.3 Obtaining subtotals 120
9.3.a
Choosing the subtotaling formula: average, sum, etc 122
9.4 Viewing only those rows that have subtotals 123
9.5 Removing subtotals 123
9.6 The “Consolidation” tool 124
CHAPTER 10
PIVOT REPORTS 126
10.1 The four steps in making a twodimensional Pivot Report 127
10.1.a
10.1.b
10.1.c
10.1.d
10.1.e
10.1.f
Step 1: Opening the Pivot Report wizard 128 Step 2: Choosing the data for tabulation 130 Step 3a: Designing the Pivot Report 131 Step 3b: Choosing the formula for aggregation/tabulation 133 Step 4a: Options 135
Format options: 137 Data options 138 External data options 138
Step 4b: Wrapping it up — creating the Pivot Report 139
10.2 Modifying/editing a Pivot Report 140
10.2.a
10.2.b
10.2.c
Modifying the structure of a Pivot Report 142 Adding a new function (and thus a new row series) 143 Editing fields 148
Selecting a field 148 Viewing the options available for modifying/editing a field 149
10.2.d
Deleting a field 152
10.3 Refreshing the Report 152
10.4 Pivot Report example with a third dimension (row, column and page) 152
10.4.a 
Viewing different “pages” 154 
10.4.b 
Making a new worksheet for each “page” 155 
10.4.c 
Making a new chart for each “page” 156 
10.5 Pivot reports from Scenarios 156
10.6 OLAP: New feature in the XP version of Excel 157
10.7 Icons for Pivoting 157
CHAPTER 11
“IFTHEN” ANALYSIS: SCENARIOS AND GOAL SEEK 159
9
Managing & Tabulating Data in Excel
11.1 Scenarios (for “If this assumptionthen this result”) 159
11.1.a
Defining the Scenarios 160
Using the Scenarios 163 Scenario summary 164 Using the “Group and Outline” tool 166 Scenariobased Pivot Tables 168
11.2 Goal Seek (“If I want this cell to have a certain result, what value should that cell take) 170
11.2.a 
Setting the desired value for the “target” cell (the one with the formula 
11.2.b 
that references the “solution” cell) 171 Choosing the “solution” cell 171 
Running the utility 172
CHAPTER 12
LINKING TO A DATABASE 174
Important definition: “Query” 175
12.1 Understanding the structure of a database file 176
Analogy between the structures of a database file and an Excel file 177
12.2 Linking to data from a database (or, “creating and executing a data query”) 177
12.2.a
12.2.b
Step 1: Choosing the Database File from which data will be imported 178 Step 2: Choosing the Columns/Fields/Variables to Import 180
Selecting fields for import into Excel 182
12.2.c
12.2.d
12.2.e
12.2.f
Step 3: (Pre–) Filtering the data to be imported 184 Step 4: Pre–sorting the data to be imported 190 Step 5: Saving the Query (that is, saving steps 1–4) 191 Step 6: Wrapping it up— getting the data into Excel 192
12.3 Refreshing the link between the Excel range and data in the database file 193
12.4 Editing an existing query 194
12.5 Using “External data source” to create a Pivot Report 195
12.6 New in the XP version of Excel: OLAP 195
12.6.a
Data from the Internet 195
12.7 Icons relevant to External Data 195
CHAPTER 13
READING ASCII TEXT DATA 198
13.1 Understanding ASCII Text data 199
Why is data stored and distributed in this format? 199 What is special about this format? 199 Fixed–width/Column 200 Delimited/FreeField 201
13.2 Reading delimited/FreeField ASCII Text data 201
13.2.a 
Step 1: Choosing whether the format is delimited or Fixedwidth 202 
13.2.b 
Step 2: Choosing the correct Delimiter: tab, comma, space, etc 204 
Determining if Excel or you have chosen the wrong Delimiter 205
10
Contents
13.2.c 
Step 3: Define the data formats (if not done automatically/correctly by 
13.2.d 
Excel) 206 Converting into an Excel file 208 
13.3 Reading Fixedwidth ASCII TEXT 209
CHAPTER 14
PASTE SPECIAL 215
14.1 Pasting The Result Of A Formula, But Not The Formula 216
14.2 Other Selective Pasting Options 218
14.2.a 
Pasting only the formula (but not the formatting and comments) 218 
14.2.b 
Pasting only formats 218 
14.2.c 
Pasting data validation schemes 219 
14.2.d 
Pasting all but the borders 219 
14.2.e 
Pasting comments only 219 
14.3 Performing An Algebraic “Operation” When Pasting One Column/Row/Range On To Another 220
14.3.a 
Multiplying/dividing/subtracting/adding all cells in a range by a number 
220 

14.3.b 
Multiplying/dividing the cell values in cells in several “pasted on” columns with the values of the copied range 221 
14.4 Switching Rows To Columns 221
CHAPTER 15
SAVING OR TRANSFORMING TO SPECIAL WEB AND DOCUMENT FORMATS 223
15.1 Converting to a PDF (Adobe Acrobat) file 223
15.1.a 
Creating a PDF (Adobe Acrobat) file from the printout 224 
15.1.b 
Other tools for converting one or multiple files into PDF 226 
15.2 Saving as an HTML file 226
15.2.a 
Interactivity when saving a worksheet 227 
15.2.b 
Interactivity when saving a chart 229 
15.3 New in the XP version of Excel: Web Archive format and XML 231
15.3.a 
Web Archive 231 
15.3.b 
XML 237 
INDEX 237
11
Managing & Tabulating Data in Excel
Mapping of menu options with sections of the book and in the series of books
You may be looking for a section that pertains to a particular menu option in Excel. I now briefly lay out where to find (in the series) a discussion of a specific menu option of Excel.
Table 1: Mapping of the options in the “FILE“ menu
Menu Option 
Section that discusses the option 
OPEN 
chapter 1 
SAVE 

SAVE AS 
Volume 1: Excel For Beginners 
SAVE AS WEB PAGE 
15.2 
SAVE WORKSPACE 
1.3 
SEARCH 
Volume 1: Excel For Beginners 
PAGE SETUP 
Volume 1: Excel For Beginners 
PRINT AREA 
Volume 1: Excel For Beginners 
PRINT PREVIEW 
Volume 1: Excel For Beginners 

Volume 1: Excel For Beginners 
PROPERTIES 
Volume 1: Excel For Beginners 
Table 2: Mapping of the options in the “EDIT“ menu
Menu Option 
Section that discusses the option 
UNDO 
Volume 1: Excel For Beginners 
REDO 
Volume 1: Excel For Beginners 
12
Contents
Menu Option 
Section that discusses the option 
CUT 
Various 
COPY 

PASTE 

OFFICE CLIPBOARD 
Volume 1: Excel For Beginners 
PASTE SPECIAL 
Volume 3: Excel– Beyond The Basics 
FILL 
chapter 4 
CLEAR 
Volume 1: Excel For Beginners 
DELETE SHEET 
Volume 1: Excel For Beginners 
MOVE OR COPY SHEET 
Volume 1: Excel For Beginners 
FIND 
Volume 1: Excel For Beginners 
REPLACE 
Volume 1: Excel For Beginners 
GO TO 
Volume 3: Excel– Beyond The Basics 
LINKS 
Volume 3: Excel– Beyond The Basics 
OBJECT 
Volume 3: Excel– Beyond The Basics Volume 2: Charting in Excel 
Table 3: Mapping of the options in the “VIEW“ menu
Menu Option 
Section that discusses the option 
NORMAL 
Volume 1: Excel For Beginners 
PAGE BREAK PREVIEW 
Volume 1: Excel For Beginners 
TASK PANE 
Volume 1: Excel For Beginners 
Volume 1: Excel For Beginners 

TOOLBARS 
Volume 3: Excel– Beyond The Basics 
13
Managing & Tabulating Data in Excel
Menu Option 
Section that discusses the option 
FORMULA BAR 
Leave it on (checked) 
STATUS BAR 
Leave it on (checked) 
HEADER AND FOOTER 
Volume 1: Excel For Beginners 
COMMENTS 
Volume 3: Excel– Beyond The Basics 
FULL SCREEN 
Volume 1: Excel For Beginners 
ZOOM 
Volume 1: Excel For Beginners 
Table 4: Mapping of the options in the “INSERT“ menu
Menu Option 
Section that discusses the option 
CELLS 
Volume 1: Excel For Beginners 
ROWS 
Volume 1: Excel For Beginners 
COLUMNS 
Volume 1: Excel For Beginners 
WORKSHEETS 
Volume 1: Excel For Beginners 
CHARTS 
Volume 2: Charting in Excel 
PAGE BREAK 
Volume 1: Excel For Beginners 
FUNCTION 
Volume 1: Excel For Beginners Volume 3: Excel– Beyond The Basics Volume 5: Statistical Analysis with Excel Volume 6: Financial Analysis using Excel 
FUNCTION/FINANCIAL 
Volume 6: Financial Analysis using Excel 
FUNCTION/STATISTICAL 
Volume 5: Statistical Analysis with Excel 
FUNCTION/LOGICAL 
Volume 3: Excel– Beyond The Basics 
FUNCTION/TEXT 
Volume 3: Excel– Beyond The Basics 
14
Contents
Menu Option 
Section that discusses the option 
FUNCTION/INFORMATION 
Volume 3: Excel– Beyond The Basics 
FUNCTION/LOOKUP 
Volume 3: Excel– Beyond The Basics 
FUNCTION/MATH & TRIG 
Volume 3: Excel– Beyond The Basics 
FUNCTION/ENGINEERING 
Volume 3: Excel– Beyond The Basics 
FUNCTION/DATABASE 
Volume 3: Excel– Beyond The Basics 
FUNCTION/DATE & TIME 
Volume 1: Excel For Beginners Volume 5: Statistical Analysis with Excel 
Volume 6: Financial Analysis using Excel 

NAME 
Volume 1: Excel For Beginners 
COMMENT 
Volume 3: Excel– Beyond The Basics 
PICTURE 
Volume 2: Charting in Excel 
DIAGRAM 
Volume 2: Charting in Excel 
OBJECT 
Volume 3: Excel– Beyond The Basics 
HYPERLINK 
Volume 3: Excel– Beyond The Basics 
Table 5: Mapping of the options inside the “FORMAT“ menu
Menu Option 
Section that discusses the option 
CELLS 
Volume 1: Excel For Beginners 
ROW 
Volume 1: Excel For Beginners 
COLUMN 
Volume 1: Excel For Beginners 
SHEET 
Volume 1: Excel For Beginners 
AUTOFORMAT 
Volume 1: Excel For Beginners 
15
Managing & Tabulating Data in Excel
Menu Option 
Section that discusses the option 

CONDITIONAL FORMATTING 
chapter 5 

STYLE 
Volume 1: Excel For Beginners 

Table 6: Mapping of the options inside the “TOOLS“ menu 

Menu Option 
Section that discusses the option 

SPELLING 
Volume 1: Excel For Beginners 

ERROR CHECKING 
Volume 3: Excel– Beyond The Basics 

SPEECH 
4.9 

SHARE WORKBOOK 
Volume 3: Excel– Beyond The Basics 

TRACK CHANGES 
Volume 3: Excel– Beyond The Basics 

PROTECTION 
Volume 3: Excel– Beyond The Basics 

ONLINE 

COLLABORATION 
Volume 3: Excel– Beyond The Basics 

GOAL SEEK 
Volume 3: Excel– Beyond The Basics 

SCENARIOS 
Volume 5: Statistical Analysis with Excel Volume 6: Financial Analysis using Excel 

AUDITING 
Volume 3: Excel– Beyond The Basics 

TOOLS ON THE WEB 
The option will take you to a Microsoft site that provides access to resources for Excel 

MACROS 
In upcoming book on “Macros for Microsoft Office” 

ADDINS 
Volume 3: Excel– Beyond The Basics Volume 5: Statistical Analysis with Excel 

AUTOCORRECT 
Volume 3: Excel– Beyond The Basics 

CUSTOMIZE 
Volume 3: Excel– Beyond The Basics 
16
Contents
Menu Option 
Section that discusses the option 
OPTIONS 
Volume 1: Excel For Beginners 
Table 7: Mapping of the options inside the “DATA” menu
Menu Option 
Section that discusses the option 
SORT 
chapter 6 
FILTER 
chapter 7 
FORM 
chapter 2 
SUBTOTALS 
chapter 9 
VALIDATION 
chapter 3 
TABLE 
Volume 3: Excel– Beyond The Basics 
CONSOLIDATION 
section 48.5 
GROUP AND OUTLINE 
Volume 1: Excel For Beginners 
PIVOT REPORT 
chapter 10 
EXTERNAL DATA 
chapter 12 
Table 8: Mapping of the options inside the “WINDOW“ menu
Menu Option 
Section that discusses the option 
HIDE 
Volume 3: Excel– Beyond The Basics 
SPLIT 
Volume 1: Excel For Beginners 
FREEZE PANES 
Volume 1: Excel For Beginners 
17
Managing & Tabulating Data in Excel
Table 9: Mapping of the options inside the “HELP“ menu
Menu Option 
Section that discusses the option 
OFFICE ASSISTANT 
Volume 1: Excel For Beginners 
HELP 
Volume 1: Excel For Beginners 
WHAT’S THIS 
Volume 1: Excel For Beginners 
INTRODUCTION
Are there not enough Excel books in the market? I have asked myself this question and concluded that there are books “inside me,” based on what I have realized from observation by friends, students, and colleagues that I have a “vision and knack for explaining technical material in plain English.”
Read the book practicing the lessons on the sample files provided in the zipped file you downloaded. I hope the book is useful and assists you in increasing your productivity in Excel usage. You may be pleasantly surprised at some of the features shown here. They will enable you to save time.
The “Make me a Guru” series teach technical material in simple English. A lot of thinking went into the sequencing of chapters and sections. The book is broken down into logical “functional” components. Chapters are organized into sections and subsections. This creates a smooth flowing structure, enabling “total immersion” learning. The current series is broken down into a multilevel hierarchy:
18
Contents
—Chapters, each teaching a specific skill/tool.
— Several sections within each chapter. Each section shows aspect of the skill/tool taught in the chapter. Each section is numbered—for example, “Section 1.2” is the numbering for the second section in chapter 1.
— A few subsections (and maybe one further segmentation) within each section. Each subsection lists a specific function, task, or proviso related to the “master” section. The subsections are numbered——for example, “1.2.a” for the first subsection in the second section of chapter 1.
Unlike other publishers, I do not consider you dummies or idiots. Each
and everyone had the God given potential to achieve mastery in any field.
All one needs is a guide to show you the way to master a field. I hope to
play this role. I am confident that you will consider your self an Excel
“Guru” (in terms of the typical use of Excel in your profession) and so will
others.
Once you learn the way to master a windows application, this new
approach will enable you to pick up new skills” on the fly.” Do not argue
for your limitations. You have none.
I hope you have a great experience in learning with this book. I would
love feedback. Please use the feedback form on our website vjbooks.net.
In addition, look for updates and sign up for an infrequent newsletter at
the site.
MANAGING & TABULATING DATA
Excel has extremely powerful data entry, data management, and
tabulation tools. The combination of tools provide almost database like
19
Managing & Tabulating Data in Excel
power to Excel. Unfortunately, the poor quality of the menu layout and the help preclude the possibility of the user selflearning these features.
BASICS
The fundamental operations in Excel are taught in Volume 1: Excel For Beginners, Volume 2: Charting in Excel, and Volume 3: Excel– Beyond The Basics
FUNCTIONS
I teach the writing of formulas and associated topics in Volume 3: Excel– Beyond The Basics. I show, in a stepbystep exposition, the proper way for writing cell references in a formula. The book describe tricks for copying/cutting and pasting in several examples. In addition, I discuss special pasting options.
Finally, different types of functions are classified under logical categories and discussed within the optimal category. The categories include financial, Statistical, Text, Information, Logical, and “Smart” Logical.
FINANCE
In three chapters on financial functions, I list the functions used for estimating loan repayments (for example, like a car loan or house mortgage), discount cash flow analysis (used often for estimating the returns and present values of multiperiod investment projects), and parameters associated with securities market instruments like bonds and Tbills.
If your interest is Investment Banking or Feasibility Studies (Project
20
Contents
Finance), you should learn Scenarios, the Solver utility, and Goal Seek. With Scenarios, you can perform basic risk analysis.
STATISTICS PROCEDURES
Three chapters teach statistics functions including the use of Excel functions for building Confidence Intervals and conducting Hypothesis Testing for several types of distributions. The design of hypothesis tests and the intermediate step of demarcating critical regions are taught lucidly.
CHARTING
Please refer to book two in this series. The book title is Charting in Excel.
Sample data
All the sample data files are included in the zipped file.
I have not included the dat set for conducting statistical procedures. This is intentional; often, readers fail to internalize the few key concepts of hypothesis testing because they do not subject themselves to a “sinkor swim” inferencedrawing thinking and imbibing process when interpreting the results of statistical procedures.
Sample data
Most of the tutorials use publicly available data from the International labor Organization (ILO). I used a simple data set with only a few columns and observations. All the sample data files are included in the zipped file.
21
Saving or transforming to special web and document formats
CHAPTER 1
SAVING (OPENING) IN (FROM) DIFFERENT FILE FORMATS
In this chapter, I briefly discuss the following topics:
— SAVING/OPENING TO/FROM FILE FORMATS LIKE LOTUS 1– 2–3 VERSIONS 1.0 TO 4.0, QUATTROPRO AND DBASE VERSIONS I TO IV, TEXT.
— STATISTICAL APPLICATION FILES: SPSS, SAS, STATA, ETC
— DATABASE APPLICATIONS: ACCESS, ORACLE, MS SQL SERVER, FOXPRO, PARADOX, OTHER
— WORKSPACE— “I HAVE TO WORK ON SEVERAL FILES TOGETHER EACH DAY…CAN'T I OPEN THEM ALL AT ONE TIME?”
— USING THE WORKSPACE— OPENING SEVERAL FILES TOGETHER
— NEW IN EXCEL XP: DOCUMENT RECOVERY AND SAFE MODE
1.1
SPREADSHEET, DATABASE, TEXT & STATISTICAL SOFTWARE
Excel XP, 2000, and 97 can open files from various file formats, including:
— Current and older versions of Excel workbooks
23
Managing & Tabulating Data in Excel
— Older versions of Excel workbooks
— Other spreadsheet applications like Lotus 1–2–3, Quattropro, and Microsoft Works. This includes older versions of these file formats.
— Text files (delimited and fixed column width —see chapter 13 on page 198)
— Web pages
— Database applications like Access, Paradox, dBase, etc. This includes older versions of these file formats. The use of ODBC connectivity (direct linking to a database with automatic updating) is taught in chapter 12 on page 174.
— Special data or reference storing formats like “.dif” and “.slk.”
Excel cannot read directly from statistical software like SAS, SPSS, and
STATA. These statistical applications provide an option to output data
files in Excel format.
Using the mouse, select the menu path FILE/OPEN or FILE/SAVE AS
and click on the arrow next to the box “Open as type” or “Save as type” as
shown in the next figure.
You will see several options for the file type from which Excel will read in
data (and to which Excel will save data). Several of the formats are
historical versions of Excel.
24
Saving or transforming to special web and document formats
Figure 1: The FILE/OPEN or FILE/SAVE AS dialog (userinput form)
Excel worksheet versions 2.0 to 4.0.
If the option includes the text “Excel worksheet” then only the active worksheet is saved. This is useful if you want to read Excel files into software like SPSS, SAS and other applications that do not read Excel workbooks but do read Excel worksheets.
Figure 2: Old Excel formats
25
Managing & Tabulating Data in Excel
_{1}_{.}_{1}_{.}_{A}
LOTUS 1–2–3 VERSIONS 1.0 TO 4.0, QUATTROPRO AND DBASE
VERSIONS I TO IV
You can save as a Lotus 1–2–3 workbook (versions WK4 to WK1) and as different versions of Quattropro. Older spreadsheet formats save only the active worksheet.
Figure 3: Lotus 1–2–3 formats
dBase II–IV are excellent “transport” formats. Almost all data applications read these formats.
The applications that read dBase include SAS, SPSS, STATA, Access, and many other data warehousing and data mining software.
Figure 4: Quattropro and the popular dBase formats
1.1.B
TEXT
Different text formats include cross platform support— in Windows, saving an Excel file as a text file will allow the file to be read in DOS or the Mac). The process of reading data from such files is taught in chapter
13.
26
Saving or transforming to special web and document formats
Figure 5: Some special data formats (you can ignore these)
Figure 6: Text formats
_{1}_{.}_{1}_{.}_{C}
MANY FORMATS SAVE ONLY ONE WORKSHEET
Older spreadsheet formats, database and text formats will save only the active worksheet. Excel will inform you of this (as shown in the next figure) and give you the option of canceling the save task.
_{1}_{.}_{1}_{.}_{D}
MANY FORMATS CANNOT STORE INFORMATION ON CELL
FORMATTING, COMMENTS, ETC
Excel will inform you if the fileformat you are saving will save all attributes of the worksheet/workbook.
In most cases, the attributes that cannot be saved are cosmetic formatting features and embedded objects like charts, drawing tools, etc.
27
Managing & Tabulating Data in Excel
Figure 7: Some formats save only raw data
_{1}_{.}_{1}_{.}_{E} 
STATISTICAL APPLICATION FILES: SPSS, SAS, STATA, ETC 
Most of these applications will read and write some formats that Excel can read/write. These formats include Excel 4 worksheet and dBase III. 

_{1}_{.}_{1}_{.}_{F} 
DATABASE APPLICATIONS: ACCESS, ORACLE, MS SQL SERVER, 
FOXPRO, PARADOX, OTHER 

Most of these applications will read and write some formats that Excel can read/write. These formats include Excel 4 worksheet and dBase III. 

1.2 
SPECIAL FORMATS: ADOBE PDF, HTML, WEB ARCHIVE, XML 
This topic is taught in chapter 15.
28
Saving or transforming to special web and document formats
1.3
WORKSPACE— “I HAVE TO WORK ON SEVERAL FILES TOGETHER EACH DAY…CAN'T I OPEN THEM ALL AT ONE TIME?”
Assume you are working on a project in which you use 12 files. Further, these files are saved in different drives/directories or paths. (So, some are in “C:\data\,” some in “M:\projects\ttvgr\vijay\,” and so on.) Assume further that you have to open all files simultaneously before doing any work. This can be achieved by, either (a) writing all the file names along with their path (location), or (b), using the “Workspace” feature.
Creating a workspace
Assume the 12 files you need for one work session are open (and no other files are open). Select the option FILE/SAVE WORKSPACE. Write a name for this group of files you have been working on (see Figure 8). Click on the button “Save.”
Figure 8: Saving links to all open Excel files as one Workspace
29
Managing & Tabulating Data in Excel
Using the workspace— Opening several files together
When you want to work on the group of files again— open Excel, pick the menu option FILE/OPEN and open the workspace file as shown in Figure
9. The 12 Excel files you were working on earlier open!
Figure 9: When you open the Workspace, Excel opens all the Excel files that were open when you last saved the Workspace
1.4
NEW IN THE XP VERSION OF EXCEL: DOCUMENT RECOVERY AND SAFE MODE
The document recovery feature is excellent in the XP version of Excel. If the application freezes/crashes, the PC crashes, or you lose connection to a power source, the chances of losing the work you did on the file since the last save is low. Excel keeps a tab on your changes and creates a recovery backup continuously. On relaunching Excel, the recovery files are
30
Saving or transforming to special web and document formats
displayed in the task pane, as well as the last saved files, along with the times and dates of these files last save (by you or by Excel’s document recovery tool). You can choose which version(s) to save.
A related feature is the ability to open an application in “Safe Mode,” and resolve the problems with the application using this mode.
31
Data Entry Form
This chapter teaches the following topics:
CHAPTER 2
DATA ENTRY FORM
— AN EASIER WAY TO TYPE IN DATA PLUS A MULTISERIES “FIND (DATA /FORM)
— FORM BASED DATA ENTRY
— NEW DATA
— USING THE FEATURE AS A “FIND “SEARCH
2.1 
AN EASIER WAY TO TYPE IN DATA PLUS A MULTI SERIES “FIND” UTILITY (DATA /FORM) 
Assume you have to type in data for a few series. You find typing on the worksheet directly to be a pain. An easier way is to use a form. Use the 

sample file “Advanced Files1.xls.” 

2.2 
FORM BASED DATA ENTRY 
First, in the first rows of consecutive columns, enter the title for the series in that column (as in the sample file).
33
Managing & Tabulating Data in Excel
Using the mouse, select the menu path DATA/FORM. You will see a “form” for entering the data. (For a pictorial reproduction, see Figure 10.) Excel has automatically picked up the “Series Names” from the first row. (The series on the worksheet are named “Series Name,” “Country Name,” “1995,” “2000” and “2010”).
_{2}_{.}_{2}_{.}_{A}
NEW DATA
You can enter the data for a new case/row by clicking on “New” and typing in the data for the first series, pressing the “TAB and then entering the data for the next series and so on. “Delete” will delete an entire row.
Figure 10: The form for data entry
2.3
USING THE FORM AS A “FIND” OR “SEARCH” UTILITY
An additional advantage of the DATA/FORM feature is that it is also a powerful “find” facility. Click on the button “Criteria.”
34
Data Entry Form
Figure 11: Using the “Criteria” option to make the data entry form into a data search form
After you click on “Criteria,” the dialog (userinput form) shown in Figure 12 opens. Compare that dialog with the dialog shown in the previous figure.
Note that the buttons on the right half of the dialog have changed. The button “New” is unavailable and there is no “Delete” button. The button “Clear” replaces “Delete.” Use Clear for removing all the conditions in the Criteria dialog. The button “Form” switches to the data entry form dialog.
35
Managing & Tabulating Data in Excel
Figure 12: The “Criteria” dialog. Note the title “Criteria” at the topright.
Enter the criterion for finding data. (For a pictorial reproduction, see Figure 13.)
Figure 13: A multiple series criteria for finding data
Clicking on the button “Clear” will remove all criteria while clicking on the button “Restore” will restore the defaults. In addition, in general, when in the “Find” or “Criteria” facility, you return to the “Form” facility for data entry by clicking on the button “Form.”
Now, when you click on the button “Find Next” you will be taken to the
36
Data Entry Form
next row/case in which the country name is Algeria, the values of the data for 1995, 2000, and 2010 are greater than 10000, 15000 and 17000, respectively. (For a pictorial reproduction, see Figure 15.)
Figure 14: Use the “Find Next” button to locate the next observation (row) whose data satisfies the “criteria.”
Figure 15: After clicking on the button “Find Next” you will see the next row/case that satisfies all four conditions of the criteria
37
Managing & Tabulating Data in Excel
Note that you are back in the “Form” facility.
A Summary Of The Two Roles Of Data/Form
Special 

Role 
Function 
Buttons/options 
Common buttons 
New: allows data entry for a new row 

Form” 
Enabling data entry, editing of existing data, deletion or addition of rows 
Delete: deletes the current row 
Find next, Find previous: the criteria is defined using the “Find” or “Criteria” facility 
facility 

Criteria: switches to the “Criteria” or “Find” facility 

Find” or 
Finding rows that meet a set of criteria based on the same series as in the “form” facility. (Note that the Left hand side series labels are same for both) 
Clear: removes all the criteria 
Find next, Find previous: 
“Criteria” 
Restore: Form: 
automatically reverts dialog back to the “Form” data entry facility 

facility 
switches to the “Form” facility for data entry 
38
Managing & Tabulating Data in Excel
CHAPTER 3
REDUCING ERRORS IN DATA ENTRY— VALIDATION AND AUTOCORRECT
This chapter teaches the following topics:
— VALIDATION FOR NUMERIC DATA
— MESSAGE SHOWN TO PERSON ENTERING THE DATA INTO CELLS THAT HAVE “DATA VALIDATION
— ERROR ALERT
— THE VALIDATION RULE IN ACTION
— VALIDATION FOR TEXT ENTRY
— TESTING THE VALIDATION
— ENSURING THAT ONLY A STRING FROM A SET CAN BE ENTERED
— REMOVING VALIDATION RULES FROM A RANGE
— COPYING AND PASTING VALIDATION RULES
— USING “FORMS” AND “DATA VALIDATION“
3.1
VALIDATING DATA DURING DATAENTRY
If you are typing data straight into Excel, you may want to take steps to
40
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
reduce the chance of making typing errors. For a small amount of data, a
visual scan after data entry may suffice as a data validation technique.
However, when the amount of data is large and/or you want to ensure
that invalid data is not entered in a cell, then you should use the option
DATA/VALIDATION.
Open a new Excel file. Assume you want to enter data into three
columns:
• In column F, a series of numbers
• In column G, a series of text entries
• In column H, the appropriate country name from a list you have
Further, assume you want the data to satisfy the following “validation”
rules or criteria:
1. The data in column F must be in number format and larger than 12,000,000 (or a blank or empty cell). If, while typing in the data, any value is entered that does not satisfy these criteria, then Excel should give me a warning. Read page 42 for the way to ensure that these criteria are set.
2. The data in column G must be in text format and cannot be of a length longer than eight letters (this includes any spaces). Read page 50 for the way to ensure that these criteria are set.
3. The data in column H can only be one of the values in a chosen set of cells. Read page 52 for the way to ensure that this criterion is set.
41
Managing & Tabulating Data in Excel
_{3}_{.}_{1}_{.}_{A}
VALIDATION FOR NUMERIC DATA
Select cell F1 and type in a title for the data that will be typed into this column. The next figure illustrates this.
Figure 16: Write the label
Click on the letter “F” at the top of the spreadsheet so that the entire column “F” is selected/highlighted. (Alternatively, use the mouse to select a limited range like “F1:F81.”)
Access the feature through the menu path DATA/VALIDATION. Click on the tab “Settings.”
Figure 17: The Data Validation dialog (userinput form)
Setting the first validation rule
In the area “Allow” choose the option “Whole Number”. The next figure illustrates this. You have set the first validation rule: “any data entered in column F must be a whole number; the data cannot be text, dates, numbers with decimals, etc.”
42
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
Figure 18: Setting the Validation Criteria
When you click on the option “Whole Number,” the dialog (userinput form) will change and include new boxes that are relevant for writing validation rules for whole numbers. (For a pictorial reproduction, see Figure 19.) These rules typically are of the type “less than,” “equal to,” “greater than,” etc.
Figure 19: Setting a Validation Criteria that will only permit the entry of “Whole Numbers” into the underlying column/range
43
Managing & Tabulating Data in Excel
Setting the second validation rule
Now you have to set the second validation rule: “any data entered in column F cannot have a value that is greater than 120000, unless it is a blank/empty cell.”
Step 1: Click on the downward arrow next to the box “Data ^{1} “. The next figure illustrates this. In the area “Data,” choose the comparison option “greater than or equal to” as shown in Figure 20.
Because you have chosen “Greater than or equal to,” the dialog has modified and now no longer has a box for “Maximum ^{2} “! (For obvious reasons, that box is useless if you are looking for numbers “Greater than or equal to”!)
^{1} Excel has “dynamic” menus. The dialog adapts and changes once you choose a validation rule in the area “Allow.” Excel knows the variable has to a whole number. The relevant additional criteria have to be based on this logic. Therefore, Excel shows “Data,” “Minimum” and “Maximum.” Compare with the options shown in the dialog when your validation rules are for text data (see Figure 102 on page 51) and for a defined list (see Figure 107 on page 53).
^{2} As mentioned in the previous footnote, Excel has “dynamic” menus and dialogs. The dialog adapts and changes once you choose a “comparison operator / rule” in the area “Data.” Try different options.
44
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
Figure 20: Defining the Criteria
Step 2: Enter the second validation rule into this box as shown in Figure
21.
Allowing empty cells (that is, data points) Select the option “Ignore blank.”
You have defined the validation rule for column F.
Figure 21: The completed Validation Criteria
Nevertheless, do not click as yet on the button OK!
Next, you need to ensure that the rule does its job of precluding the input of invalid data. For that, you use an “input message” and an “error alert.” The former informs the person entering data into a cell about any
45
Managing & Tabulating Data in Excel
validation rule that governs the set of acceptable data in that cell. The latter gives an “error alert” warning if inappropriate data/text is entered into a cell that has validation criteria. Excel will not permit any invalid data. I now show how to use these two methods.
_{3}_{.}_{1}_{.}_{B}
MESSAGE SHOWN TO PERSON ENTERING THE DATA INTO
CELLS THAT HAVE “DATA VALIDATION” CRITERIA
Within the DATA/VALIDATION dialog, click on the tab “Input Messages.”
Enter a short title and an “Input message”— this message will popup and inform the person entering data into column “F” that the data has to follow the rules mentioned in the message. (See two figure’s down to view what the message box will look like in action.)
When the cursor is over any cell in column “F,” this message will be displayed. The message should provide information on the validation rule.
46
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
Figure 22: Entering text that will be seen when a person enters data into any cell within the range that has a validation criterion
_{3}_{.}_{1}_{.}_{C}
ERROR ALERT
Even more important than the “Input Message” tab is the “Error Alert” tab. The title and message you write here will inform the person typing the data if a data value entered did not satisfy the criteria set by your validation rules. (I will show some examples.)
Figure 23: Enter the text that should be shown if invalid data is entered into any cell in a
range that has validation criteria for data entry
47
Managing & Tabulating Data in Excel
Now you can execute the dialog by clicking on the button OK. The validation rules, and accompanying input message and error alert have been set for column “F.”
_{3}_{.}_{1}_{.}_{D}
THE VALIDATION RULE IN ACTION
Click in cell F2. Even before you start entering any data/text into the cell, Excel displays the “Input Message” as a popup textbox. This message reminds you about the validation rule.
Figure 24: The “Input Message” in practice
Type a valid number in cell F2, and leave F3 blank (which conforms to our validation rule).
Enter another valid number in cell F4.
Figure 25: Try this example
Assume that In cell F5 you make a mistake in typing. Notice the letter
48
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
“w” — the addition of this letter makes the entire cell “text” data and not a whole number as required by the validation rules.
Figure 26: On entering invalid data…
(see next figure)
When you push down the ENTER key the error message you wrote earlier (for an illustration of this, see Figure 23 on page 47) is displayed in a dialog (userinput form.)
Figure 27: The “Error Alert” is displayed
Click on “Retry” and enter a valid number.
Reminder:
The Validation Rule for column F is “must be in number format and larger than 12,000,000 (or a blank or empty cell).”
Figure 28: After choosing “Retry” and entering in valid data, no Error Alert is displayed
49
Managing & Tabulating Data in Excel
In cell F6, type a value that was a Whole Number but below the minimum acceptable whole number. You are warned/informed about the mistake. For an illustration of the warning, refer to the figure below.
Figure 29: Another example of attempting to enter invalid data results in…(see next figure)
This entry is not valid because it is less than the minimum acceptable valid value in the cell— 12000000. Excel displays the Error Alert warning. Click on “Retry” and enter a valid number.
Figure 30: The “Error Alert” being displayed
_{3}_{.}_{1}_{.}_{E}
VALIDATION FOR TEXT ENTRY
For textual data, you can set the rules for the length of the cell entry. Choose cell G1 and enter a name for the series.
Step 1:
Highlight the column G. In the area “Allow” choose the option “Text Length. You have set the first validation rule.
50
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
Step 2: Choose a “Maximum” text length of “8.” The second validation rule is defined.
Figure 31: Validation Criteria allowing only text of certain length
Click on the tab “Input Message” and type in an appropriate message.
Click on the tab “Error Alert” and write a message that will display whenever invalid data is entered. (As you did in the previous example).
Execute the dialog by clicking on the button OK.
Figure 32: Always enter an “Error Alert” that describes the valid criteria
51
Managing & Tabulating Data in Excel
_{3}_{.}_{1}_{.}_{F}
TESTING THE VALIDATION
Write the text “Vijay Gupta” into cell G2. The length of this entry is 11 (10 letters plus 1 blank space) — implying that the entry is invalid.
Figure 33: On entering invalid data
…(see next figure)
The entry is invalid and an error message is displayed. The next figure reproduces this message.
Figure 34: ….an “Error Alert” is displayed. Note that this alert mentions the valid criteria.
_{3}_{.}_{1}_{.}_{G}
ENSURING THAT ONLY A STRING FROM A SET CAN BE
ENTERED
Choose cell H1 and enter a name for the series.
Figure 35: Key (Type)in the label
Select the entire column H and go to DATA/VALIDATION. Within the
52
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
dialog (userinput form) that opens, choose the option “List” in the area “Allow.” (For a pictorial reproduction, see Figure 36 below.)
Figure 36: Ensuring that the data is only valid if it belongs to a list of possible values
The “List” is a set of possible values that the cells in column H can take. The cells cannot have any other values.
Assume that the list you want to use is the list of country names; it is in the range “B2 to B17.”
Click on the right edge of the white textbox “Source” and click on the range “B2 to B17.” The dialog should look like the one in Figure 37.
53
Managing & Tabulating Data in Excel
Figure 37: The “List” Validation Criteria is defined
Click on the tab “Error Alert” and type in a message that you want displayed when incorrect data is entered. Execute the dialog by clicking on the button OK.
Figure 38: Make sure that the “Error Alert” provides the valid criteria in the error message
Choose cell H2. When you click on it, you will see a downward arrow at the edge of the cell. Click on the arrow and the entire list of countries is displayed! Instead of typing in a country name, you can just choose it from the list. Therefore, apart from reducing chances of mistakes in data entry, it also saves on typing time.
54
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
Figure 39: Using the “List” Validation Criteria can save on typing
Figure 40: Selecting a valid value from the valid list
3.2
REMOVING VALIDATION RULES FROM A RANGE
Highlight the range from which you want to remove the validation settings. (The range may be a subset of the entire range for which you had set the validation rule.) Choose the menu option DATA/VALIDATION and click on the button “Clear All”. The next figure illustrates this.
Figure 41: Removing Validation Rules from a range
55
Managing & Tabulating Data in Excel
3.3 
COPYING AND PASTING VALIDATION RULES 
In the situation that requires the same validation rules for ranges in many worksheets/files, you can save time by copying and pasting the validation rules. 

First, select the cells that have the validation rules you want to use as the model. Go to EDIT / COPY. Select the range on which you want to “impose” the validation rules. Go to EDIT/PASTE SPECIAL and choose the option “Validation” in the area “Paste.” See Volume 3: Excel– Beyond The Basics for more on pasting validation rules. 

3.4 
SELECTING ALL CELLS WITH THE SAME DATA VALIDATION RULE 
Refer to Volume 3: Excel– Beyond The Basics. 

3.5 
USING “FORMS” AND “DATA VALIDATION” 
The best data entry practice is the combined use of DATA/FORM (taught in the previous chapter) and DATA/VALIDATION. The combination lends Excel quasidatabase ability. Filtering and Pivoting (taught later in the book) extend this ability.
56
Reducing Errors in Data Entry – “Validation” & “Autocorrect”
3.6
AUTOCORRECT
The AUTOCORRECT tool automatically corrects common spelling errors and mistakes in capitalization. The user can also define spellings that should be corrected, as well as spellings or other typos that should not be autocorrected. The tool is taught in Volume 4: Managing & Tabulating Data in Excel
57
Using Fill & other Tools to Save Time
CHAPTER 4
USING FILL AND OTHER TOOLS TO SAVE ON TYPING TIME
This chapter teaches the following topics:
— MAKING EXCEL FILL IN NUMBERS AND DATES
— FILLING YEARS/INTEGERS
— FILLING IN EVERY ALTERNATE YEAR
— AUTO FILL — FILLING FROM PREDEFINED LISTS OF DAYS, MONTHS, OTHER
— CREATING A NEW “CUSTOM LIST“
— FILLING MISSING VALUES
— USING CONSTANT INCREASE IN VALUES
— USING CONSTANT GROWTH RATES
— FILLING FORMATS
— USING THE RIGHT MOUSE FOR QUICKFILLING
— PLACING DATA ENTRY ICONS ONTO THE TOOLBAR
Please use an empty Excel worksheet to practice this and the next section. Create a new Excel file to try the examples shown in this chapter.
59
Managing & Tabulating Data in Excel
4.1 
MAKING EXCEL FILL IN NUMBERS AND DATES 
Assume you want to type in the series of numbers (1991, 1992….1999) or (1991, 1993… 2003) on to consecutive cells in a row or column. One way of doing this would be to type in each number manually. A faster approach is to use EDIT/FILL. Section 4.1.a uses this approach. 

In 4.2, I show how to “fill” months and weekdays. 

In 4.3, I show how to define a “Custom Lists” of names. For each such defined list, you can use EDIT/FILL to save time and preclude the possibility of typos. 

_{4}_{.}_{1}_{.}_{A} 
FILLING YEARS/INTEGERS 
Open a new Excel file. Assume you want to use EDIT/FILL to type in the series of numbers (1991, 1992….1999) on to consecutive cells in a row or column. Type the first number in the series (for an illustration of this, see Figure 42).
Figure 42: Entering the start point for the Fill
Click on the cell you just typed into (cell B1 in this example), and drag the mouse over the cells where you want to “fill” the series.
You can drag to the right or to the bottom. In the illustration in the next figure, I drag it to the right across a row. For a pictorial reproduction, see
60
Using Fill & other Tools to Save Time
Figure 43.
Figure 43: Use the mouse to drag over the cells you want to fill
Access the feature through the menu path EDIT/FILL/SERIES.
Figure 44: The menu option and sub–options for Fill. Choose the submenu “Series.”
Figure 45 reproduces the dialog that opens. Excel has automatically detected that the “Series (is) in Rows.” (That is, that you want to fill the numbers on consecutive cells on a row.) Choose the option “Linear” in the area “Type.”
Figure 45: Choosing the basis for the Fill
Note that Excel auto selects the “Step value” of 1. A step value of 1
61
Managing & Tabulating Data in Excel
implies that each consecutive cell will have a value that is “1 + the preceding cells value.”
Select the option “Trend.” The next figure illustrates this.
Figure 46: Filling with a Linear Trend that increments by one for each cell
Execute the dialog by clicking on the button OK. Excel fills the series. For a pictorial reproduction, see Figure 47.
Figure 47: The series is filled with a “Linear Trend of one”
_{4}_{.}_{1}_{.}_{B}
FILLING IN EVERY ALTERNATE YEAR
Assume you want to fill the series (1991, 1993, 1995 alternate year/integer.
)
— that is, every
The procedure is the same as in the previous example with one difference— choosing a “Step Value” of 2 as shown in Figure 48. (Compare this with the step value of one in the previous example.)
62
Using Fill & other Tools to Save Time
Figure 48: Filling with a Linear Trend that increments by two for each cell
Execute the dialog by clicking on the button OK. As you can observe in Figure 49, the fill now uses steps of 2.
Figure 49: The series is filled with a “Linear Trend of two”
Use EDIT/FILL even if the desired series included text along with a number sequence (for example, a series like “yr91, yr92,…, yr99”).
4.2
AUTO FILL — FILLING FROM PREDEFINED LISTS OF DAYS, MONTHS, OTHER
Assume you want to fill the series of months.
Go to the first cell you want in the series and type in the name of the month with which you want to start the series. (As shown in the next figure, I chose “Jan” but that need not be the case.)
63
Managing & Tabulating Data in Excel
Figure 50: Type the initial month for generating a sequential series. You can also type
“Janu,”
,
“January”
Click on the cell with the text “Jan” and lightly drag the mouse over the cells into which you want the series filled. As the next figure shows, I have dragged the mouse down over a column this time and not to the right across a row as in the examples above. You can Fill series in all four directions.
Figure 51: Select the range to Fill
Using the mouse, select the menu path EDIT/FILL/SERIES.
The dialog (userinput form) that opens is shown in the next figure.
Note that Excel has automatically determined that the series are in a column because you dragged the mouse down.
64
Using Fill & other Tools to Save Time
Choose the option “AutoFill ^{3} .”
Figure 52: Using “Autofill” to Fill in the series of months
Execute the dialog by clicking on the button OK. Excel fills the list— the next figure shows the filled range.
Figure 53: The Filled series of months
^{3} Choose the option “Date if the cell's data is defined as “Data Type.” A detailed discussion of this is beyond the scope of this book.
65
Managing & Tabulating Data in Excel
_{4}_{.}_{2}_{.}_{A}
FILLING WEEKDAYS
Type in “Monday” or any other day and drag down or to the right. Follow the menu path EDIT/FILL/SERIES.
Figure 54: Type the initial weekday for generating a sequential series
Choose the option “AutoFill.” Execute the dialog by clicking on the button OK.
Figure 55: Using “AutoFill” to Fill in the series of weekdays
Excel fills the weekday series — the next figure shows the result.
66
Using Fill & other Tools to Save Time
Figure 56: The Filled series of weekdays
4.3
CREATING A NEW “CUSTOM LIST”
You can create new “lists” that Excel will fill in automatically. Assume you have three lists you work with often:
• Employee names (Seligman, Gupta, Smith, Snipes, Stallone, Ali, Kinnuken, Singh, Gunter, Mandela, Berger…)
• Client names (Nike, Adidas, Reebok, Old Navy, Bata…)
• Account names (Citibank, Chase, UBS, American Express, 1 ^{s}^{t} Capital…)
(Note: the client and account names are registered trademarks of the respective companies.)
You want the ability to type in only one word from a list (for example, the word “Nike”) and fill in the series with other words in the list “Client
67
Managing & Tabulating Data in Excel
name” by using EDIT/FILL/SERIES.
First, type the names of all members of each list onto a spreadsheet. (Use a different row for each list — as shown in Figure 57.)
Figure 57: Type the names of all members of each list onto a spreadsheet
Now you have to inform Excel that these lists are to be included as lists for EDIT/FILL/SERIES/AUTOFILL. Select the menu path TOOLS/OPTIONS/CUSTOM LISTS (for an illustration of this, see Figure
58).
68
Using Fill & other Tools to Save Time
Figure 58: The tab “Custom Lists” in the dialog (userinput form) “TOOLS/OPTIONS.” Notice the lists for months and weekdays in the left half of the dialog. In the examples in the previous section, Excel used these lists to fill in the series.
In Figure 58, notice the lists for months and weekdays in the left half of the dialog. In the examples in 4.2, Excel used these lists to fill in the series.
In Figure 58, focus on the area inside the dark–bordered rectangle. You want to “Import” lists from cells. Click on the area marked by the arrow in Figure 58. Choose the cells in the worksheet that has the lists as shown in Figure 59.
69
Managing & Tabulating Data in Excel
Figure 60: Choose the worksheet that has the lists
Choose the cells that have the list entries for one list (for example, the clients list.) See the next figure for an illustration.
Figure 61: Choose the cells that have the entries for one list
Click on the small box marked by the arrow in Figure 61.
70
Using Fill & other Tools to Save Time
Figure 62: Importing the new “Custom List”
Execute the dialog by clicking on the button “Import.” A new list is created as shown in Figure 63.
Figure 63: The new list is added to the “Custom Lists”
71
Managing & Tabulating Data in Excel
Repeat the above steps for the other two lists. Execute the dialog by clicking on the button OK.
In the future, you just have to type in one entry from the client list (for example, “Nike”) and use EDIT/FILL/SERIES to fill in the rest of the list.
Figure 64: After repeating the process for other lists, you will have created several “Custom Lists”
4.4
FILLING MISSING VALUES
FILL is also used for replacing/filling–in missing values from a numerical series. The methods available for filling in the missing data are:
• Linear Interpolation (Linear in Absolute Value)
• Constant Growth Interpolation (Linear in Growth Rate)
72
Using Fill & other Tools to Save Time
_{4}_{.}_{4}_{.}_{A}
USING CONSTANT INCREASE IN VALUES
Assume your data has two series: x and y as shown in the picture below— Figure 65 ^{4} . The series x is missing data for the years 1993 and 1994. You want to use Excel to fill the missing values using a simple mathematical algorithm for the fill.
Figure 65: Type this sample data into an Excel worksheet
Highlight the cells with the missing data and the first non–missing data cell on each end. (For an illustration, see Figure 66.)
Figure 66: Highlight the two ends of the range with missing data
Follow the menu path EDIT/FILL/SERIES. Choose the options “Linear.” Excel automatically calculates the step value of 0.16 ^{5} . (For an illustration, see Figure 67.)
^{4} On an empty Excel sheet, type in the data as shown in Figure 136 and work along with this book.
^{5} The formula is: ((end value)(start value)) / (number of missing values) = (3.63.12) / 3 = .16
73
Managing & Tabulating Data in Excel
Figure 67: Choose the “Linear” type of Fill
The missing cells are filled (for an illustration of this, see Figure 68). The step value of “0.16” implies that Excel added 0.16 for each increment. (So, the data for 1993 equals the data for 1992 plus 0.16. The data for 1994 is the new value for 1993 plus 0.16. And so on for the following years.)
Figure 68: The missing data is filled with a linear trend
_{4}_{.}_{4}_{.}_{B}
USING CONSTANT GROWTH RATES
A better method of filling in missing values is to use a constant growth rate. That is, instead of the above example in which every increment was the same absolute number, the increment will represent the same growth
74
Using Fill & other Tools to Save Time
rate ^{6} from year to year but not the same absolute values.
The implementation of the “constant growth” method follows the same steps as for the constant linear trend example described earlier. The only difference is that you choose the option “Growth” and check the option “Trend” as shown in Figure 69 (the number 0.16 is from the previous example and will not play a role here.)
Figure 69: Example of using a “Growth” type of Fill
Excel fills the series. Figure 70 shows the result. Compare the numbers estimated using a constant growth trend with those obtained using a constant linear trend (shown in Figure 68).
Figure 70: The missing values are filled with numbers based upon a constant Growth rate
^{6} Excel calculates and uses a constant growth rate “r” based on the compound growth (or “compound interest") formula: 3.6 = 3.12*(1 + r) ^{3}
75
Managing & Tabulating Data in Excel
4.5 
FILLING FORMATS 
Assume you want to copy the format of a cell to a range of adjacent cells in the same row or column. Select the active cell and the “target” range and choose the menu option EDIT/FILL/FORMATS. 

4.6 
COPYING THE ACTIVE CELL 
Assume you want to copy a cell and paste onto to a range of adjacent cells in the same row or column. Select the active cell and the “target” range. Select the option EDIT/FILL/COPY. 

4.7 
USING A RIGHTCLICKONMOUSE FOR QUICK FILLING 
You can access EDIT/FILL using the mouse.
Click on the first cell in the series. Follow this with clicking on the right– mouse at the location shown by the arrow and dragging the mouse over the other cells where you want to fill–in. Leave the mouse. You will see the options for EDIT/FILL. (For an illustration, see Figure 71.) Choose the option “Series” — the EDIT/FILL dialog opens. Follow the steps shown in the examples above.
76
Using Fill & other Tools to Save Time
Figure 71: Tip for quickly accessing the Fill menu
4.8
PLACING DATA ENTRY ICONS ONTO THE TOOLBAR
You can customize the set of icons shown on the toolbars at the top of the screen. This can save time by enabling you to place the often–used buttons onto the toolbar. Please refer to Volume 3: Excel– Beyond The Basics to learn how and why to customize toolbars and the icons shown in them.
Go to VIEW/TOOLBARS/CUSTOMIZE. Click on the category “Data” and you will see some icons for specific data management tasks. You can place these icons on the toolbar and use them as shortcuts to access data management features.
77
Managing & Tabulating Data in Excel
Figure 72: Icons for data management
4.9
“SPEECH TO TEXT”
The menu option TOOLS/SPEECH in the XP version of Excel does not function well. You need a high quality microphone, “correct” accent and diction, and the time to make the Speech Recognition software recognize your pronunciation.
Standalone speech recognition applications can be configured to work with earlier versions of Excel. Unless you are purchasing highend Speech Recognition software, you will be disappointed with the tool. Such highend software is used in the health industry. Nevertheless, even there, the recorded speech is transcribed into text by a human.
78
Managing & Tabulating Data in Excel
CHAPTER 5
“CONDITIONAL FORMATTING”— COLOR–CODING DATA PATTERNS
This chapter illustrates the use of the following features:
— UNDERSTANDING THE DIALOG
— DEFINING THE CONDITION
— STEP 1: DEFINING THE CONDITION/CRITERIA
— STEP 2: DEFINING THE FORMAT TO USE FOR CELLS THAT SATISFY THE CONDITION
— UNDERSTANDING THE “CONDITIONAL FORMAT“
— DEFINING A “DYNAMIC” CONDITION
— DELETING CONDITIONAL FORMATS
CONDITIONAL FORMATTING is an excellent utility for quickly color– coding patterns in data. As you go through this example, the usefulness of this utility will become clear.
5.1
UNDERSTANDING THE DIALOG
Access the feature through the menu path FORMAT/CONDITIONAL
80
“Conditional Formatting”— Color–coding data patterns
FORMATTING. The dialog shown in Figure 73 opens.
Figure 73: The “Conditional Formatting” dialog
In this box, you have to tell Excel: “If condition 1 is satisfied by the data in a cell than format the cell using Format 1 which you have defined. If condition 1 is not satisfied by the data in a cell than do not format the cell using Format 1.
5.2
DEFINING THE CONDITION
Figure 74 to Figure 77 show how to set the first conditional format. Let us go through this process systematically.
5.3
STEP 1: DEFINING THE CONDITION/CRITERIA
Assume the conditional format is:
81
Managing & Tabulating Data in Excel
“If the value of the cell is between 10,000,000 and 12,000,000 then
give the cell the formatting I will define by pressing the button
Format.'“
First, define the condition as shown in Figure 74.
Figure 74: Defining the first condition
5.4
STEP 2: DEFINING THE FORMAT TO USE FOR CELLS THAT SATISFY THE CONDITION
Click on the button “Format ^{7} “and (as shown in Figure 75 and Figure 76) choose the formatting desired for those cells that satisfy the condition “Cell value is between 10,000,000 and 12,000,000.”
Select the tab “Patterns” and choose the fill color for the cells.
^{7} On clicking “Format,” I got the dialogs shown in Figure 208 and Figure 209. I chose a font style (see Figure 208) and a pattern/background shading (see Figure 209).
82
“Conditional Formatting”— Color–coding data patterns
Figure 75: Choose a pattern
I recommend using bright yet light and distinct colors. Dark colors will make the reading of cell data a bit of a pain in the eye.
After selecting the pattern, you may want to select a font style also. I recommend using patterns only. If you set font features in a conditional format, select different font colors for every conditional format.
Figure 76: Choose a font style, color, etc.
83
Managing & Tabulating Data in Excel
5.5
UNDERSTANDING THE “CONDITIONAL FORMAT”
After clicking on the button “OK,” you will be back to the CONDITIONAL FORMATTING dialog. (For a pictorial reproduction of this, see Figure
77).
Figure 77: The first condition and the concomitant formatting are defined
The formatting style you chose is displayed in the area “Preview of format to use when condition is true.” The 'condition' mentioned is what you had defined— “Cell Value is between 10,000,000 and 12,000,000.”
Step 3: Adding more conditional formats
Assume you want to add more conditional formats (the maximum allowed is three). In the dialog shown in Figure 77, see the button “Add.” Click on this button. The result is that the dialog becomes bigger with a new sub– section titled “Condition 2” as shown in Figure 78 below.
84
“Conditional Formatting”— Color–coding data patterns
Figure 78: Adding conditions to the ‘Conditional Format “
As you did for condition 1, define the expression for condition 2 and condition 3 and the formatting style to be applied if the condition is satisfied. I do not show all the steps because they are the same as for condition 1.
5.6
DEFINING A “DYNAMIC” CONDITION
In this example, the condition does not reference a fixed number (as in Figure 79 where the fixed number is 100,000,000) but, instead, a cell on the Excel worksheet.
This can be termed as a “dynamic” condition, because it changes if the referenced cells value changes (this cell is “E14” in my example). If the value in cell E14 changes, then any conditional format definition that references the value in cell E14 will also change.
85
Managing & Tabulating Data in Excel
Figure 79: Another example of defining a condition
Figure 80: Example of defining a “dynamic” condition. If the definition cell (“E14”) changes, then you may see a change in formatting of the cells using this definition.
After defining the conditional formats, execute the dialog by clicking on the button OK. The formatting of cells that meet the criteria you defined will change to the formats defined by you.
You may find that a lower level of magnification (“zoom”) allows the patterns in the data to be seen more easily. Change the zoom level by selecting the menu option VIEW/ZOOM and making the change. The next figure illustrates this.
Excel offers preset options of magnifications/reductions from “200%” to “25%.” You can set a custom level by typing the value into the box “Custom (and selecting the option “Custom”). I usually set the zoom to
85%.
86
“Conditional Formatting”— Color–coding data patterns
Figure 81: ZOOM dialog
5.7
DELETING CONDITIONAL FORMATS
Select the area that is under conditional formatting. Go to FORMAT/CONDITIONAL FORMATTING and click on the button “Delete.” The dialog shown in the next figure opens. You can delete conditional formats by pressing on the button “Delete” and choosing the appropriate options from the dialog that opens.
Figure 82: Dialog for deleting Conditions in a Conditional Format
5.8
SELECTING ALL CELLS WITH THE SAME CONDITIONAL FORMAT RULE
This topic is taught in Volume 3: Excel– Beyond The Basics.
87
Sorting
This chapter discusses the following topics:
— BASIC SORTING
— CASE SENSITIVITY
— SORTING BY ROWS
CHAPTER 6
SORTING
— SORTING RANGES THAT DO NOT COVER ENTIRE COLUMNS OR ROWS
6.1
BASIC SORTING
I use a simple data set for this example –”Advanced File2.xls.” The set has five columns; each column corresponds to one series/series. (For an
illustration, see Figure 83.)
Follow these basic rules for facilitating effective data handling:
• Always write the series name in the first row.
• Do not leave the first column empty
89
Managing & Tabulating Data in Excel
Figure 83: The sample data
Choose the columns you want to Sort by clicking the mouse on a column title (like “A”) and then dragging the mouse over the other columns you want to Sort.
Select the option DATA/SORT. In the dialog (userinput form), choose the series by which you want to Sort.
Choose a series by (a) clicking on the down–arrow next to the topmost white box, and, (b) picking a series from the list of series.
Sorting by two or three series
Repeat this process with a second (and, after that, a third) choice of series name in the middle (and, after that, lowest) box in the dialog. Excel first sorts by the series whose name is in the topmost box. Within each value of this series, it sorts the data by the values of the series whose name is in the middle box.
I show an example with two series in the next figure.
90
Sorting
Figure 84: The dialog for Sorting
6.2
NAMES OF SERIES OR COLUMNS
How does Excel know the names of the series? It has picked them up from the first row. I allowed this by clicking on “Header row” in the area “My list has.” If you look at the worksheet, notice that the first row has the label for each series. These are the “headers.” If there is no such header row, then choose “No Header row” in the area “My list has.”
Figure 85: Choose if your data series have a label/heading in the first cell of each data series
Execute the dialog by clicking on the button OK.
91
Managing & Tabulating Data in Excel
The result is shown in Figure 86. The data is sorted— first by “Country Name,” then by “Series Name.”
Figure 86: Compare the Sorted data with the original data shown in Figure 83
6.3
CASE SENSITIVITY
Click on the button <
Viel mehr als nur Dokumente.
Entdecken, was Scribd alles zu bieten hat, inklusive Bücher und Hörbücher von großen Verlagen.
Jederzeit kündbar.