0% found this document useful (0 votes)
97 views78 pages

Excel

The document is a table of contents for a book about learning Excel. It lists 25 chapters that will teach the reader about various Excel topics like working with cells, text, formatting, formulas, charts, and more. The author is Joseph Rubin, an accountant with over 27 years of experience who runs the website ExcelTip.com and has authored several books on Excel. He has instructed thousands of professionals on how to use Microsoft Excel.

Uploaded by

ISGECFAB YARD2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views78 pages

Excel

The document is a table of contents for a book about learning Excel. It lists 25 chapters that will teach the reader about various Excel topics like working with cells, text, formatting, formulas, charts, and more. The author is Joseph Rubin, an accountant with over 27 years of experience who runs the website ExcelTip.com and has authored several books on Excel. He has instructed thousands of professionals on how to use Microsoft Excel.

Uploaded by

ISGECFAB YARD2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

Learn Excel

Fast & Easy

www .ExcelTip.com
ii

About the Author

Joseph Rubin, CPA, principal of www.exceltip.com


(A leading Excel Web site) is the author of the very successful
books:

⇒ F1 Get the Most out of Excel!


The Ultimate Excel Tip Help Guide

⇒ F1 Get the Most out of Excel Formulas & Functions

⇒ Financial Statements.xls, 2nd Edition

Joseph Rubin has over 27 years of financial experience in the


accounting industry. He has served as CFO, Controller and has
run his own CPA practice for many years. Joseph Rubin, CPA, is
an independent consultant specializing in the development of
applications using Microsoft Excel for the financial industry and
has instructed thousands of professionals on Microsoft Excel.
iii

Table o f Contents at a Glance

Chapter 1: Time is Money, Give Your Mouse a Break ........................ 1

Chapter 2: Text ................................................................................... 19

Chapter 3: Formatting Numbers ........................................................ 43

Chapter 4: Date and Time .................................................................. 55

Chapter 5: Styles ................................................................................ 69

Chapter 6: Name ................................................................................. 77

Chapter 7: Formulas........................................................................... 91

Chapter 8: Summing and Counting ................................................. 125

Chapter 9: Security and Protection ................................................. 139

Chapter 10: Information ................................................................... 149

Chapter 11: Printing ......................................................................... 165

Chapter 12: Charts ........................................................................... 193

Chapter 13: Customizing Excel ....................................................... 213

Chapter 14: Opening, Closing and Saving Workbooks .................. 231

Chapter 15: Data............................................................................... 239


iv

Chapter 16: Importing Text Files ..................................................... 247

Chapter 17: Sorting .......................................................................... 255

Chapter 18: Filtering ........................................................................ 263

Chapter 19: Subtotals ...................................................................... 279

Chapter 20: Grouping and Outlining ............................................... 289

Chapter 21: Consolidating Data ...................................................... 295

Chapter 22: PivotTable..................................................................... 315

Chapter 23: Using Functions and Objects to Extract Data ............ 355

Chapter 24: Loans ............................................................................ 385

Chapter 25: What-if .......................................................................... 393


v

Table o f Contents

Chapter 1:
Time is Money, Give Your Mouse a Break........... 1
Cell, Cells, Move and Select .................................................................. 2
Moving to the last cell in a range ....................................................... 2
Selecting a horizontal or vertical range of adjacent cells ................... 3
Selecting a range of non-adjacent cells ............................................. 4
Selecting the current region............................................................... 5
Moving the Cellpointer around a selected range ................................ 6
Selecting the first cell in a worksheet................................................. 7
Selecting the last cell in the used range ............................................ 7
Reducing the used range in a worksheet ...................................... 8
Rows and Columns ................................................................................ 9
Selecting a column or columns .......................................................... 9
Selecting a row or rows ..................................................................... 9
Adding a cell, a row, a column ........................................................... 9
Deleting a cell, a row, a column ......................................................... 9
Hiding or unhiding a column or columns ............................................ 9
Hiding or unhiding a row or rows ....................................................... 9
View More Data in Worksheet .............................................................. 10
Moving between Sheets in a Workbook ................................................ 12
Using keyboard shortcuts to move between sheets ......................... 12
Selecting a sheet from the shortcut menu........................................ 12
Jumping Quickly between Cells in a Workbook .................................... 12
Using the Name box ........................................................................ 13
Copying, Cutting and Pasting ............................................................... 13
Keyboard shortcuts.......................................................................... 14
Copying and pasting, using the mouse and keyboard ...................... 14
Cutting and pasting, using the mouse and keyboard........................ 14
Copying a cell with text or a formula to thousands of cells............... 15
Copying a cell by double-clicking..................................................... 15
Moving between Open Workbooks ....................................................... 16
vi

Copying or Moving a Sheet .................................................................. 16

Chapter 2: Text ....................................................19


Text and Toolbars ................................................................................ 19
Entering Text in Cells ........................................................................... 20
Using AutoComplete........................................................................ 20
Selecting from list of previous entries .............................................. 21
Validating data ................................................................................ 21
Moving Selection After Enter ........................................................... 21
Selecting a Range ........................................................................... 22
Using AutoCorrect ........................................................................... 22
Validating Data..................................................................................... 23
List .................................................................................................. 25
Preventing duplicate data entry ....................................................... 26
Validating text entries ...................................................................... 27
Copying validation ........................................................................... 27
Deleting validation criteria ............................................................... 27
Wrapping Text...................................................................................... 28
Text wrapping techniques ................................................................ 28
Wrapping text automatically ........................................................ 28
Canceling automatic text wrap .................................................... 29
Wrapping text manually .............................................................. 29
Canceling manual text wrap........................................................ 29
Wrapping text beyond the data range ......................................... 30
Adding a wrap text shortcut ............................................................. 31
Changing the Indentation in a Cell ....................................................... 32
Dividing a Title in a Cell........................................................................ 33
Transposing Data ................................................................................. 33
Changing a Numeric Heading to Text ................................................... 34
Selecting Cells That Only Contain Text ................................................ 34
Find and Replace ................................................................................. 35
Searching All the Sheets in the Workbook............................................ 36
Using Text Formulas ............................................................................ 37
Joining Text.......................................................................................... 37
vii

Joining text using a keyboard shortcut............................................. 37


Joining text using a manual formula ................................................ 38
Joining text using the concatenate function ..................................... 38
Joining text with a linked number..................................................... 39
Extracting Characters from Text ........................................................... 40
Using formulas to extract characters from text................................. 40
Parsing characters from text without formulas ................................. 41

Chapter 3: Formatting Numbers .........................43


Where Custom Formats Are Saved ...................................................... 44
Symbols Used in Excel to Format Numbers.......................................... 44
Special formats, rounding a number to the thousands,
displaying in the thousands, displaying text and a number .............. 46
The Four Sections of the Format .......................................................... 46
Formatting a negative number with parentheses,
replacing 0 with a dash.................................................................... 47
Special Formats – Examples ........................................................... 48
Adding special symbols to the number format.................................. 49
Formatting Numbers According to Criteria............................................ 50
Using custom formats for numbers with criteria ............................... 50
Conditional Formatting .................................................................... 51
Totaling Rounded Numbers.................................................................. 51
How Excel performs calculations ..................................................... 51

Chapter 4: Date and Time....................................55


How Excel Calculates Date and Time................................................... 55
Entering the Date in a Cell ................................................................... 55
Easily entering the date in a cell ...................................................... 56
Shortcuts for entering current date and time .................................... 57
Typing dates in cells quickly ............................................................ 57
Date and time – displaying the number behind the format ............... 57
Entering dates Automatically ........................................................... 58
Using the series dialog box to enter a series of dates...................... 58
Using the shortcut menu to enter a series of dates .......................... 59
viii

Automatically Entering Time Data ........................................................ 59


Entering a time series in intervals of one minute ............................. 59
Entering a time series in intervals of one hour ................................. 60
Custom Dates ...................................................................................... 60
Customizing the date ....................................................................... 60
Date format table ............................................................................. 60
Date – Formulas and Calculations........................................................ 61
Calculating the difference between dates ........................................ 62
Calculating the week number........................................................... 63
Calculating a quarter number .......................................................... 63
Inserting a function for calculating the number of a
quarter in VBA ................................................................................. 64
Custom Formatting for Time ................................................................. 64
Time values exceeding 24 hours ..................................................... 64
Time format table ............................................................................ 65
Time – Formulas and Calculations ....................................................... 65
Converting hours to decimals .......................................................... 66
Calculating the difference between hours ........................................ 66
Rounding hours up .......................................................................... 67
Converting a number to a time value ............................................... 67
Calculating time differences between regions of the world............... 68

Chapter 5: Styles ..................................69


Copying Formatting .............................................................................. 70
Copying formatting with the Format Painter ..................................... 70
Painting a format repeatedly............................................................ 70
Using F4 to copy formatting to adjacent and non-adjacent ranges... 70
Using Paste Special to copy formatting ........................................... 70
Changing the Default Style in a Workbook ........................................... 71
Preventing the display of 0 .............................................................. 72
Creating and Saving Custom Styles ..................................................... 72
Copying (merging) styles from one workbook to another ................. 73
Applying a style to a cell or cells in a worksheet .............................. 74
ix

Displaying statements rounded to thousands .................................. 76

Chapter 6: Name ..................................77


What is a Name?.................................................................................. 77
Why Define Names?............................................................................. 77
Name syntax ................................................................................... 78
Defining a Name .................................................................................. 78
Saving names.................................................................................. 79
Deleting names ............................................................................... 79
Changing a reference ...................................................................... 79
Reviewing names ............................................................................ 79
Automatically defining Names according to the text in
the top row and the left column........................................................ 80
Entering and Pasting a Name in a Formula .......................................... 80
Automatically entering a name in a formula ..................................... 81
Pasting a name in a formula ............................................................ 81
Pasting Names in a formula’s argument boxes..................................... 82
Replacing a reference in a formula with a newly
defined name, after entering the formula into the cell .......................... 84
Saving a Formula or Numeric Value for Reuse in the Name Box .......... 84
Saving values in the Define Name dialog box .................................. 85
Automatically Updating a Name’s Reference........................................ 86
Formula for updating an automatic reference,
with a vertical range of cells ............................................................ 87
Formula for updating an automatic reference,
for the name of the current region (data table)................................. 88
Defining a Name and Updating a Range Reference with a Macro ........ 89

Chapter 7: Formulas ..............................91


Entering a Formula into a Cell .............................................................. 91
Copying a Formula, Relative and Absolute Reference.......................... 92
Relative reference ........................................................................... 92
Absolute reference .......................................................................... 92
x

The F4 key ...................................................................................... 93


Maintaining a relative reference when pasting a formula ................. 93
Nesting Formulas ................................................................................. 94
Copying and pasting a formula within a formula .............................. 96
Adding Statistical Formulas .................................................................. 97
Analysis ToolPak, Analysis ToolPak-VBA ........................................ 97
Array Formula ...................................................................................... 98
The technical side of array formulas ................................................ 99
Using array formulas to create links with a change of direction........ 99
Creating a link between cells in workbooks ................................... 100
Auditing .............................................................................................. 101
Auditing formulas toolbar ............................................................... 101
Moving to a precedent cell / moving to a dependent cell................ 101
Moving to a precedent cell ........................................................ 101
Moving to a dependent cell ....................................................... 102
Moving between linked cells in a sheet ..................................... 102
Keyboard shortcuts to precedent and dependent cells .............. 102
Stepping into the formula ................................................................... 103
Handling Errors .................................................................................. 104
Marking Cells Containing Errors ......................................................... 105
Tracing errors............................................................................ 106
Smart tag ........................................................................................... 106
Circular References ........................................................................... 107
Iteration ......................................................................................... 108
Links Between Workbooks ................................................................. 109
Creating links between workbook sheets ....................................... 109
Canceling the Update Links message when opening workbooks ... 110
The Edit Links Dialog box .............................................................. 110
Startup prompt .......................................................................... 111
Break Links............................................................................... 111
Changing a source.................................................................... 111
Changing links and deleting unwanted links.............................. 112
Deleting Formulas, Saving Calculation Results .................................. 113
Deleting formulas, maintaining calculated values .......................... 113
xi

Deleting formulas and pasting values using a single


line of code and a keyboard shortcut ............................................. 114
Selecting Cells with Formulas ............................................................ 114
Identifying and Formatting Cells with Formulas .................................. 114
Combining the Get.Cell formula and conditional
formatting to format a cell with a formula ....................................... 115
Protecting Formulas in Cells............................................................... 117
Locking, the first condition ............................................................. 117
Protecting a sheet, the second condition ....................................... 117
Protecting formulas ....................................................................... 117
Displaying a Formula in a Cell and Printing Formulas ........................ 119
Displaying formula syntax.............................................................. 119
Printing the formula syntax ............................................................ 119
Using VBA to Create and Add Functions to the Function Wizard........ 120
Custom functions, example and explanation.................................. 120
Using a custom function to calculate accrued income tax
from gross salary ........................................................................... 122

Chapter 8: Summing and Counting ...........125


Summing Data Easily ......................................................................... 125
Summing values in a vertical range ............................................... 126
Summing values in vertical and horizontal ranges ......................... 126
Summing data by selecting cells.................................................... 127
Sum subtotals................................................................................ 127
Extending the range of sums for the SUM formula......................... 128
AutoSum, additional functions ....................................................... 128
Adding, subtracting, multiplying and dividing
without using formulas ................................................................... 129
Summing data in the intersection of two ranges ............................ 130
Summing data from a cell in a number of sheets ........................... 130
Summing According to Criteria, the SUMIF Formula .......................... 131
The SUMIF formula, arguments..................................................... 131
Using two arguments of the SUMIF formula................................... 132
xii

Using comparison operators (< >) as criteria ................................. 132


Using SUMIF to sum two ranges according to criteria.................... 132
Summing totals with text characters as criteria .............................. 133
The COUNT Formula ......................................................................... 134
Counting the number of cells in a range that includes numbers ..... 134
Counting the number of cells in a range that includes text ............. 135
Counting the cells with data according to criteria ........................... 135
Comparing and Merging Lists, the COUNTIF Formula........................ 136

Chapter 9: Security and Protection ...........139


Security Tab Options.......................................................................... 140
Password to open.......................................................................... 140
Advanced ...................................................................................... 140
Digital signature ............................................................................ 140
Macro security ............................................................................... 141
Using a password to prevent opening a workbook ......................... 141
Protecting Workbooks ........................................................................ 141
Unprotect a workbook.................................................................... 141
Hiding sheets................................................................................. 142
Unhiding sheets............................................................................. 142
Protecting Sheets/Cells ...................................................................... 142
Conditions for protecting cells ....................................................... 142
Conditions for hiding text/formula in the Formula bar..................... 142
Protecting a sheet ......................................................................... 143
Moving between unprotected cells in a protected sheet................. 144
Protecting Data by Hiding Rows and Columns ................................... 144
Unhiding rows and columns........................................................... 145
Preventing Movement in Protected Areas........................................... 145
Changing properties in the Properties dialog box .......................... 145
Using the VBA macro statements .................................................. 146
Protecting Cells That Contain Formulas or Text ................................. 146
Allowing Multiple Users to Edit ranges ............................................... 147
Forgotten the Password? There’s a Solution ...................................... 147
xiii

Chapter 10: Information ....................................149


Viewing Worksheet Name, Workbook Name and Path ....................... 149
Using the CELL worksheet function ............................................... 149
Adding the path to the title bar or status bar .................................. 150
Viewing data and information in cells............................................. 151
Watch Window ......................................................................... 151
Picture................................................................................................ 151
Creating links for viewing through a picture ................................... 152
Adding the camera icon to the toolbar ........................................... 152
Linking Cells to a Textbox or Object ................................................... 153
Using a MsgBox to Display Information from Cells ............................. 153
Adding Comments to a Formula ......................................................... 155
Saving Information in Comments........................................................ 155
Adding Comments ......................................................................... 155
Changing the Name of the Comment Author ...................................... 155
Changing the Default Comment Format ............................................. 156
Viewing Comments ............................................................................ 157
Displaying a single comment ......................................................... 157
Copying Comments to Different Cells ................................................. 157
Deleting Comments ............................................................................ 157
Deleting all comments in a sheet ................................................... 158
Printing Comments............................................................................. 158
Adding Pictures to Comments ............................................................ 159
Send Information to Comments .......................................................... 160
Importing and Refreshing Information from the Internet...................... 160
Excel 97 ........................................................................................ 160
Excel 2000 .................................................................................... 161
Excel 2002 .................................................................................... 162
Refreshing the Internet Data (Excel versions 97, 2000, 2002) ....... 163
Refreshing the Internet Data Automatically ........................................ 163
Running a Saved Query ..................................................................... 164
xiv

Chapter 11: Printing ............................165


Adding Print Icons to Toolbars ........................................................... 165
Changing and Customizing the Default Settings in a Workbook ......... 166
Changing the default settings for all sheets ................................... 167
Adding information to headers and footers on all printed
pages........................................................................................ 167
Using a macro to add information data to each sheet
printed from the workbook ........................................................ 168
Black and white printing ............................................................ 170
First page number..................................................................... 170
Scaling...................................................................................... 170
Important Printing Techniques............................................................ 170
Printing the page number and the running page number ............... 170
Selecting the print area ................................................................. 170
Defining a contiguous print area ............................................... 171
Defining a non-contiguous print area ........................................ 171
Repeating rows and columns at the top of each page (Sheet tab) . 172
Row and column headings (Sheet tab) .......................................... 172
Printing comments (Sheet tab) ...................................................... 172
Hiding data before printing ............................................................ 173
Hiding errors in formulas before printing ........................................ 173
Hiding cell errors while printing...................................................... 174
Scaling (Page tab) ......................................................................... 174
Continuous numbering of pages, first page number....................... 175
Copying page settings to other sheets........................................... 175
Printing page numbers in a report containing both
portrait and landscape layouts ....................................................... 176
Page break .................................................................................... 179
Removing or changing a page break......................................... 180
Removing page breaks from the sheet...................................... 180
Inserting a watermark behind the text ............................................ 180
Inserting a watermark ............................................................... 181
Printing objects.............................................................................. 182
Selecting print options ................................................................... 182
xv

Custom Views .................................................................................... 183


Adding a custom view.................................................................... 184
Printing a custom view................................................................... 184
Adding a custom views icon .......................................................... 185
Adding a custom view quickly ........................................................ 185
Deleting a custom view.................................................................. 185
Custom views are saved at the workbook level.............................. 185
Report Manager ................................................................................. 186
Installing the Report Manager Add-in ............................................ 186
Adding a report and saving in Report Manager.............................. 187
Using custom views to add pages to reports.................................. 188
Printing, editing or deleting a report............................................... 188
Creating a custom Report Manager by writing
a short program in VBA ................................................................. 189

Chapter 12: Charts ............................................193


Creating Charts with F11.................................................................... 193
Creating Charts Quickly Using the Chart Toolbar ............................... 194
Sizing Charts with the Window ........................................................... 195
Setting the Default Chart Type ........................................................... 195
Printing a Chart .................................................................................. 196
Saving chart printing definitions separately from data.................... 196
Preventing charts from being printed ............................................. 196
Using the Keyboard to Select Chart Items .......................................... 197
Changing the Layout of the Chart from Rows to
Columns and Vice Versa .................................................................... 197
Using the Formatting Tools ................................................................ 198
Nudge the Chart to a Different Place in the Sheet .............................. 198
Adding a Linked Picture to a Chart ..................................................... 198
Creating a picture of cells that is linked to the source data ............ 199
Guidelines for working with linked pictures .................................... 199
Updating Charts by Dragging and Dropping ....................................... 200
Automatically Updating Charts with New Data.................................... 201
Displaying Numbers in Thousands in a Chart ..................................... 204
xvi

Displaying Different Data Using a ComboBox..................................... 204


Adding a data table to which a chart will be linked......................... 205
Adding Option Buttons to Charts ........................................................ 206
Data sheet ..................................................................................... 207
Adding option buttons to worksheets ............................................. 207
Adding a Pie of Pie Chart ................................................................... 208
Replacing Data Markers with Pictures ................................................ 210

Chapter 13: Customizing Excel ...............213


Changing the Window View................................................................ 213
Options Dialog box ............................................................................. 214
Displaying zero values (View tab).................................................. 215
Displaying gridlines (View tab)....................................................... 215
Recently used files list (General tab) ............................................. 215
Set the number of sheets in a new workbook (General tab) ........... 215
Standard font (General tab) ........................................................... 215
Default file location (General tab) .................................................. 215
User name (General tab) ............................................................... 216
Custom lists, in the Custom Lists tab ............................................. 216
Customizing Toolbars......................................................................... 218
Adding icons to the toolbars .......................................................... 219
Removing icons from toolbars ....................................................... 219
Adding icons to the menu bar ........................................................ 220
Preventing icons from disappearing............................................... 220
Adding a new customized toolbar .................................................. 221
Saving your toolbar in the workbook .............................................. 221
Removing customizations from toolbars ........................................ 222
Displaying a menu ......................................................................... 222
Customizing an icon ...................................................................... 223
Adding icons to an Excel menu...................................................... 224
Saving changes to toolbars and menu ........................................... 224
xvii

Template ............................................................................................ 225


Saving a customized workbook as a template ............................... 225
Opening a template ....................................................................... 226
Opening a template file automatically upon starting Excel ............. 227
Inserting a template sheet into the workbook................................. 228
Updating a workbook template ...................................................... 229

Chapter 14:
Opening, Closing and Saving Workbooks .......231
Opening a New Workbook.................................................................. 231
Opening a Previously Saved Workbook.............................................. 232
Opening a workbook from the recently used file list ....................... 232
Saving a Workbook ............................................................................ 233
Saving a workbook using Save As ................................................. 233
Inserting the file path for the workbook to
the title bar or the status bar.......................................................... 234
Saving Workbooks in a Customized Workspace ................................. 235
Opening workbooks saved in a workspace .................................... 236
Saving shortcuts to files/folders in Favorites (Excel 2000 or later)...... 236
Opening workbooks from a list of hyperlinks ...................................... 237
Closing a workbook / workbooks and Excel ........................................ 238

Chapter 15: Data ................................................239


Guidelines for Organizing Data in Excel ............................................. 239
Preparing the List to Sort, Filter and Insert Subtotals ......................... 241
Using formatting to set apart the column labels
row (field names) ........................................................................... 241
Freezing column labels.................................................................. 242
Entering Data into the List .................................................................. 242
Using forms to enter data .............................................................. 242
Applying Color to Data Based on Criteria ........................................... 243
Using conditional formatting to color data ...................................... 243
Applying color to maximum or minimum values ............................. 245
xviii

Chapter 16: Importing Text Files ......................247


Creating a Text File ............................................................................ 247
Importing ASCII Text Files ................................................................. 248
Troubleshooting problems while importing text................................... 250
A minus appears to the right of the number ................................... 250
Data that is not formatted as a number or date .............................. 251
Erase Unnecessary Characters ..................................................... 252
Create and Add a Function for Reversed Text Characters ............. 252

Chapter 17: Sorting ...........................................255


Performing a Simple Sort ................................................................... 256
Guidelines for Sorting Data ................................................................ 256
Sorting a Large Number of Fields ....................................................... 257
Sorting by Column.............................................................................. 258
Sorting by Custom Lists ..................................................................... 259
Inserting a Line between Groups of Data after Sorting ....................... 261

Chapter 18: Filtering ............................263


Excel offers two filtering options ......................................................... 263
Adding Icons to the Toolbar ............................................................... 263
AutoFilter ........................................................................................... 264
Printing data after AutoFilter .......................................................... 265
Saving AutoFilter criteria by using Custom Views .......................... 265
Custom AutoFilter.......................................................................... 266
Filtering by wildcard text characters .............................................. 267
Filtering by the date field ............................................................... 267
Filtering according to date by changing the format ........................ 267
Color rows according to criteria ..................................................... 269
Summing filtered data.................................................................... 270
Advanced Filter .................................................................................. 271
Using advanced filter ..................................................................... 271
Canceling advanced filter .............................................................. 272
Copying the advanced filter results to another location.................. 273
xix

Using the Database Functions to Sum Data According to Criteria ...... 274
Disadvantage of using the Database functions .............................. 274
Unique Records ................................................................................. 275
Filtering a record into one unique record ....................................... 276
Using the COUNTIF function to filter a record into a unique record 277
Coloring a unique record ............................................................... 278

Chapter 19: Subtotals ..........................279


Adding the Subtotal Icon to a Toolbar ................................................ 279
Adding Subtotals ................................................................................ 279
Removing subtotals from a list....................................................... 282
Adding subtotals according to two fields ........................................ 282
Adding additional subtotals and using additional functions ............ 283
Adding subtotals to a date field...................................................... 283
Printing .......................................................................................... 284
Copying a summary of subtotals.................................................... 284
Applying colors to subtotal rows .................................................... 285
Conditional Formatting ....................................................................... 286
Replacing/deleting the word Total ...................................................... 286

Chapter 20: Grouping and Outlining ................289


Grouping and Outlining Guidelines ..................................................... 290
Adding Icons to Toolbars.................................................................... 290
Adding Manual Outlining .................................................................... 291
Clearing the outline ....................................................................... 292
Combining Automatic and Manual Outlining ....................................... 292
Copying or applying color to reports created by
grouping and outlining ........................................................................ 293
xx

Chapter 21: Consolidating Data........................295


Consolidating Data Tables ................................................................. 295
Consolidate with formulas if the row & column
headers of all worksheets are identical ......................................... 296
Consolidate with Copy & Paste if the columns
of all worksheets are identical but the rows
contain different records ................................................................ 297
Adding a department name column to each table .......................... 297
Consolidation ..................................................................................... 299
Rules for consolidating data with the Consolidate technique ......... 299
Consolidation options .................................................................... 300
Consolidating without links........................................................ 300
Consolidating with links ............................................................ 305
Comparing Lists ................................................................................. 308
Comparing Three or More Lists ..................................................... 310
Consolidating Data Tables by Using a PivotTable,
Multiple Consolidation Ranges ........................................................... 310

Chapter 22: PivotTable .........................315


Basic Concepts: Terminology Used in PivotTables............................. 315
Creating a PivotTable......................................................................... 316
Rules for organizing data to create a PivotTable ........................... 316
Defining a Name for the data table ................................................ 317
Steps 1 and 2 ................................................................................ 317
Data table in another workbook, open or closed ....................... 318
Data table in an open workbook................................................ 318
Data table in a closed workbook ............................................... 319
Step 3............................................................................................ 319
Formatting data fields in a PivotTable ....................................... 320
The PivotTable toolbar is not displayed .................................... 320
Regular Work with the PivotTable ...................................................... 321
Filtering and inserting a query into the PivotTable ......................... 321
Inserting subtotals ......................................................................... 322
xxi

Hiding items .................................................................................. 324


Canceling "hide items" .............................................................. 325
Sorting items ................................................................................. 325
Displaying Top 10 Records with AutoShow.................................... 325
Refreshing data ............................................................................. 328
Inserting a sub-detail as an item .................................................... 328
Sending drill-down detail to a new sheet........................................ 329
PivotTable Fields................................................................................ 329
Inserting a field.............................................................................. 330
Deleting a field .............................................................................. 330
Grouping items and inserting a new field ....................................... 330
Grouping a field with items that are numbers or dates ................... 331
Grouping a date field ................................................................ 332
Inserting a calculated field ............................................................. 336
Formatting a calculated field ..................................................... 337
Updating a calculated field / deleting a formula......................... 338
Adding a data field and changing the calculation method .............. 338
Changing the calculation function and formatting the field ........ 339
Inserting fields to calculate % and more.................................... 340
Adding a running balance column ............................................. 342
Changing the presentation of multiple data fields in a PivotTable .. 343
Formatting a PivotTable ................................................................ 344
Printing a PivotTable ..................................................................... 345
The options dialog box .................................................................. 345
Inserting Additional PivotTables from a Single Data Table ................. 346
Quickly creating several PivotTables from a single Pivot Table ..... 347
Retrieving Data from a PivotTable...................................................... 348
The INDEX and MATCH formulas.................................................. 350
The SUMIF and OFFSET formulas ................................................ 350
The GETPIVOTDATA formula ....................................................... 351
Inserting a Chart from PivotTable Data .............................................. 352
Creating a PivotTable by Consolidating Several Data Ranges ........... 353
xxii

Chapter 23: Using Functions and Objects to


Extract Data .......................................................355
Assign Names to the data table and add a column
with consecutive numbers .................................................................. 356
Assign Names ............................................................................... 356
Add a first field with ascending consecutive row numbers ............. 357
The Lookup formula group ................................................................. 358
Lookup formula.............................................................................. 358
Returning a value from one data range ..................................... 359
The LOOKUP formula. Function Arguments.............................. 360
The LOOKUP formula: returning a value from a parallel range . 361
The VLOOKUP formula ................................................................. 363
Enter the VLOOKUP formula .................................................... 364
The Match formula......................................................................... 366
Enter the Match formula............................................................ 366
The Index formula ......................................................................... 367
Boost the clout of your calculations: combine formulas ...................... 368
Combine the VLOOKUP and Match formulas ................................ 368
Combine the Index and Match formulas......................................... 371
Combo Box ........................................................................................ 372
Where do I find the Combo Box? ................................................... 372
Working with the Combo Box......................................................... 372
Add a Combo Box ......................................................................... 373
Advantages of working with names in a combo box .................. 374
Deleting a combo box ............................................................... 375
Deleting all the objects in a worksheet ...................................... 375
Adjusting the size of the combo box to the cells........................ 375
Automatic adjustment of the combo box ................................... 375
Combine the VLOOKUP formula and the Combo Box ........................ 376
Adjust the number of the column in the data table
to the number that is linked to the combo box .......................... 377
Combine the Index formula, Validation and Combo Box ..................... 378
Add a validation list ....................................................................... 379
Summarize data according to criteria from the data table ................... 380
xxiii

Chapter 24: Loans .............................................385


Syntax for loan calculation functions .................................................. 386
PMT (Rate, NPER, -Loan Amount) ..................................................... 386
PPMT (Rate, Which Period, NPER, -Loan Amount)............................ 386
IPMT (Rate, Which Period, NPER, -Loan Amount) ............................. 387
NPER (Rate, Pmt, -Loan Amount) ...................................................... 387
RATE (NPER, Pmt, -Loan Amount) .................................................... 387
PV (Rate, NPER, Pmt) ....................................................................... 387
Create an Amortization Schedule ....................................................... 388
Simple amortization schedule ........................................................ 388
Amortization schedule with a grace period .................................... 388
Amortization schedule for random payment ................................... 389
Table for Calculating Payments for a Loan with Two Variables .......... 390

Chapter 25: What-if............................................393


Sensitivity Analysis (Data Table) ........................................................ 393
Creating a Data Table ................................................................... 394
Adding a Break-Even Point............................................................ 395
Finding a Solution by Goal Seeking ............................................... 396
Calculating the sales required to achieve desired profits ............... 396
Installing the Solver Add-in in Excel Versions 97 and 2000 ........... 397
In Excel Version 2002 ............................................................... 397
Work Techniques With the Solver.................................................. 397
Creating reports with Solver...................................................... 400
Solver Options .......................................................................... 400
Solver on the Internet ............................................................... 401
Scenarios ........................................................................................... 401
Adding Different Scenarios ............................................................ 402
Step 1: Define Names............................................................... 402
Step 2: Create Scenarios .......................................................... 403
Enter values using a temporary formula.................................... 405
Updating data in a scenario ...................................................... 405
Show the scenario in the worksheet.......................................... 405
Adding a Scenario icon to your toolbar ..................................... 405
xxiv

Reports ..................................................................................... 406


Printing Scenarios .................................................................... 407
Chapter 1: Time is Money - Give your Mouse a Break 1

Chapt er 1

Time is Money
Give Your Mouse
a Bre a k
Is your time valuable? If you are not sure that it is, do not bother reading
this chapter – keep using the Excel menus and icons to perform common
operations. But if you do value your time, this chapter will attempt to
convince you to use the keyboard instead.

This chapter will teach


you how to move and
maneuver quickly and
efficiently between cells
in a worksheet and
between worksheets and
workbooks. You will also
learn to select cells and
the data they contain
quickly. In short, you will
learn to save time (if you
have decided that it is
valuable). The example
at right illustrates why it
is important to work
more efficiently.
When you open a workbook in Excel, you are bombarded with
information. You see a worksheet that contains data in every cell.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 2

At first glance, you can’t tell what the current region is, if cells contain
formulas, how to get to the end of a range of cells containing data, if
there are totals beneath the columns, if there are comments in the cells
that you ought to read to learn about the data in the worksheet, and
more.

Cell, Cells, Move and Select


With scroll bars, you can control the part of the worksheet that appears
in the window’s frame. In a worksheet, you can scroll vertically, from top
to bottom, or horizontally, from side to side. However, using the scroll
bars is slow, inefficient and, most of the time, annoying as well. It is even
more annoying to use the mouse to select large ranges for copying or
printing because the screen flickers incessantly.
The solution is simple--just put your hands on the keyboard. (Kick the
habit of using the mouse and give it a break from time to time.) Learn to
use keyboard commands!

Tip – Lock the scroll bars


Press Scroll Lock, and you will see that the letters SCRL
appear in the status bar. Locking the scroll bars lets you use
the navigation keys (the four arrow keys and/or Enter) the way
you would use the wheel on the mouse.

Moving to the last cell in a range


The following keyboard combinations can move you to the last (or first)
cell in a range:

To move vertically from top to bottom, press Ctrl+Down Arrow.


To move vertically from bottom to top, press Ctrl+Up Arrow.
To move horizontally from left to right, press Ctrl+Right Arrow.
To move horizontally from right to left, press Ctrl+Left Arrow.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 3

Example: See figure below.


Move from cell A1 to the last cell in a range of cells that contains data
(before an empty cell).
Select cell A1 and press Ctrl+Down Arrow. The result: You moved to
cell A14, the last cell in a range that contains data. (Note: You can also
use [End], and then Down Arrow, instead of Ctrl+Down Arrow.)
Continue and move to the next range of cells that contain data. Press
Ctrl+Down Arrow again to move to cell A17. Press Ctrl+Down Arrow
one more time to move to the last cell that contains data in the range that
begins with cell A17, and so forth.

Selecting a horizontal or vertical range of


adjacent cells
Add the Shift key to the combination of keys used above.
By pressing the Shift key along with Ctrl and one of the four arrow keys,
you select a range of adjacent cells.
To select a vertical range of cells that contains data, from top to bottom,
press Ctrl+Shift+Down Arrow.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 4

To select a vertical range of cells that contains data, from bottom to top,
press Ctrl+Shift+Up Arrow.
To select a horizontal range of cells that contains data, from left to right,
press Ctrl+Shift+Right Arrow.
To select a horizontal range of cells that contain data, from right to left,
press Ctrl+Shift+Left Arrow.
Example: Select a contiguous range from A1 to the end of the data
range. In the example, this is A1 through A14. Select cell A1 and press
Ctrl+Shift+Down Arrow.
To select the range A1 through D14, select cell A1 and press
Ctrl+Shift+Down Arrow. Continue to hold down the Ctrl+Shift keys and
press Right Arrow.

Note
The cells in the range of A1 through A14 and the cells from A1
through D1 contain data. The continuity of data in the vertical
cells in column A and in the horizontal cells in row 1 enables
the selection of the contiguous range. Delete the data in cell
A5, and try this technique again.

Selecting a range of non-adjacent cells


Select cell A1. Press Ctrl + Shift + Down Arrow. Continue holding down
Ctrl, and use the mouse to select another range. Release the mouse
button, and select another range while continuing to press Ctrl.

Selecting a contiguous or non-contiguous range of cells


without pressing Ctrl or Shift
Press F8 for contiguous selection. The letters EXT appear in the status
bar. Pressing F8 extends the selected region. Select cell A1, and extend
the selected region by pressing one of the arrow keys.
Press F8 again to toggle off the option of contiguous selection.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 5

Press Shift+F8 for non-contiguous selection. The letters ADD appear in


the status bar. Select a number of non-contiguous ranges by using the
mouse to select one range after another.
Press Shift+F8 again to toggle off the option of non-contiguous
selection.

Selecting the current region


The current region is a contiguous range of cells that contain data. The
current region is enclosed by blank rows and blank columns and/or the
edge of the worksheet.
Ctrl+* (the star above the 9 in the numeric pad) is the keyboard shortcut
for selecting the current region.
For those of you using laptops, the shortcut is Ctrl+Shift+8.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 6

Moving the Cellpointer around a selected range


When you select a range of cells, the borders of the selected range are
clearly defined.

Press Enter to move downward within the selected range. Press


Shift+Enter to move upward within the selected range.
Press Tab to move to the right. Press Shift+Tab to move to the left.
Would you like to move to the corners of the selected range? Press
Ctrl+. (Ctrl+period).

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 7

Selecting the first cell in a worksheet


A1 is the first cell in a worksheet.
Press Ctrl+Home to return to A1 from any cell on the sheet.

Selecting the last cell in the used range


In its memory,
Excel stores the
address of the last
cell in the used
range of every
sheet in the
workbook.
In the figure, the
last cell in the
used area in the
active sheet is
determined as the
result of entering
data into any one
of the cells in row 40 and any one of the cells in column K.
The used range in the active sheet is the range of cells from A1 to K40.
Therefore, the last active cell in the used area in the active sheet is K40.

To discover which cell is the last cell in the used area in the active sheet,
press Ctrl+End.
Example: Select a worksheet, and then select cell F1000. Enter data
into the cell, and clear the cell. Now press Ctrl+Home to move to the first
cell. Move to the last cell in the used area by pressing Ctrl+End. The last
cell in the used area is F1000.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 8

Reducing the used range in a worksheet


Delete rows that do not contain data (rows 38-40 in the figure), and then
press Ctrl+S to save the file. Press Ctrl+End. The address of the last
cell in the new used range is K37. The address of the last cell in the
used range is updated when the file is saved.
Why is it important to reduce the address of the last cell in the used
range?
‹ Vertical scroll bar – it gets shorter as the used
range of a worksheet grows larger and this makes it
inconvenient to use.
‹ Print area – the default print area is the used range
in the worksheet. If you do not set a specific area as
the print area, Excel will automatically print all of the
cells from A1 through that last cell in the used range.
‹ View more data in the worksheet – later in this
chapter, in the section titled View all data in the
worksheet, you will want to reduce the used range in
order to use this option.

Tip – Easily delete data from cells in the


worksheet
The shortcuts Ctrl+Shift+End and Ctrl+Shift+Home allow
you to quickly select a cell that contains data and extend the
selection to the beginning of the worksheet or the last used
cell in the worksheet.

Select a cell in the worksheet. Press Ctrl+Shift+End and


your selection will include all of the cells from the selected
cell through the last used cell in the worksheet.

Example: In the worksheet there are about 1,000 rows of data. In order
to delete the data from row 21 through the last used cell in the
worksheet, select cell A21, press Ctrl+Shift+End, and press Del.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 9

Rows and Columns

Selecting a column or columns


Select a cell or several cells in a worksheet and press Ctrl+Spacebar.
Note: if a selected cell is part of a column that includes merged cells, the
columns that the merged cells are part of will also be highlighted.

Selecting a row or rows


Select a cell or several cells in a worksheet and press Shift+Spacebar.

Adding a cell, a row, a column


Press Ctrl++ (Ctrl and the + key)

Deleting a cell, a row, a column


Press Ctrl+- (Ctrl and the - key)

Hiding or unhiding a column or columns


Hide – select a cell or cells and press Ctrl+0.
Unhide – select the cells to the left and right of the hidden column, and
press Ctrl+Shift+0.

Hiding or unhiding a row or rows


Hide – select a cell or cells, and press Ctrl+9.

Unhide – select the cells above and below the hidden row, and press
Ctrl+Shift+9.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 10

View More Data in Worksheet


An Excel worksheet can be packed with hundreds or thousands of cells
containing data. You can either view the complete data region in the
worksheet or magnify or reduce the selected
data region to the size of the window using the
following technique.
1. Press Ctrl+* to select the current region.
2. Choose View, Zoom.
3. Select Fit selection.
4. Click OK.
Increase the amount of data that appears in
the window by hiding window elements such
as the sheet tabs, toolbars, formula bar and status bar.
1. Choose Tools, Options.
2. Select the View tab.
3. Clear the check boxes for Row & column
headers, Horizontal scroll bar, Vertical scroll
bar, Sheet tabs, Formula bar and Status bar.
4. Click OK.
5. Select any one of the toolbars and right-click.
From the shortcut menu, choose
"Customize…". Uncheck all toolbars and
click Close.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 11

Result
Only the title row is displayed, and more rows are visible.

Tip – Using a wheel mouse?


Quickly increase or decrease the percentage of the screen
magnification. Select cell A1, press Ctrl, and roll the mouse
wheel forward or backward.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 12

Moving between Sheets in a Workbook


Each Excel workbook can contain a number of worksheets.
Switching between the sheets is difficult if you use a mouse to select a
worksheet by the tab in the workbook. This is particularly true if the
workbook has a large number of sheets and the names of the sheets are
long.

There are different ways to select a worksheet, aside from the (annoying)
method of searching through the many worksheet tabs of a workbook.

Using keyboard shortcuts to move between


sheets
Press Ctrl+Page Down to move to the next sheet in the workbook.
Press Ctrl+Page Up to move to the previous sheet in the workbook.

Selecting a sheet from the shortcut menu


To the left of the sheet tabs in the horizontal scroll bar row are several
small arrow buttons. Place the mouse pointer over one of the arrows and
right-click. From the shortcut menu, select a sheet from the list of sheet
names.

Jumping Quickly between Cells in a


Workbook
Merely selecting a sheet, no matter which method you use, will not bring
you to your destination – which is the specific address you want to reach.
The best way to move to a specific cell/range in a worksheet is by
selecting the name of the cell or the name of the range from the Name
box.
The Name box can be found to the left of the formula bar.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 13

Using the Name box


Name box – an address box. Selecting a name is the same as selecting
the address of the cell or range of cells in the active workbook.
Jump to a cell – type the cell address in the Name box. For example,
type Z5000, and press Enter. As a result, you will move to cell Z5000
(similar to using F5 or Ctrl+g or selecting Go To… in the Edit menu).

Selecting a large range of cells


Example: Select cells A1 through D1000.
1. Select cell A1.
2. In the Name box, type the cell reference
D1000.
3. Press Shift+Enter.
For more information about naming cells and ranges in a workbook, see
Chapter 6, Names.

Copying, Cutting and Pasting


When using Excel on a regular basis, you repeatedly perform a large
number of common operations. The most widely used of the common
operations are Copy, Cut and Paste.
Keyboard shortcuts are the fastest way to perform these common
operations.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 14

Keyboard shortcuts
Copy Ctrl+C
Cut Ctrl+X
Paste, with the option of repeating the operation Ctrl+V

Paste, without the option of repeating the operation Enter

Paste copied selections more than once


In Excel versions 2000 and higher, you can paste copied ranges many
times from the clipboard.
In Excel 2000, the clipboard holds up to 12 copied ranges. In Excel 2002
and higher, the clipboard holds up to 24 copied ranges. Press Ctrl+C+C
to open the Clipboard toolbar which holds the copied ranges.

Copying and pasting using drag and drop


Select a cell. Click the cell border with your mouse. Press the Ctrl key
and drag the cell to a new location. Release the mouse button and the
Ctrl key. To copy to a new sheet, hold down Ctrl+Alt while dragging.

Cutting and pasting using drag and drop


Select a cell. Click the cell border with your mouse and drag to a new
location. To move to a new sheet, hold down Alt while dragging.

This method of copying and/or cutting using the mouse with or without
the Ctrl key is also a good method for copying/cutting rows, columns or
an entire worksheet.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 15

Copying a cell with text or a formula to


thousands of cells
Example: Copy text from cell A1 to cells A2 through A5000.
1. Type Excel Book in cell A1.
2. Copy cell A1.
3. Select cell A2.
4. Type A5000 in the Name
box.
5. Press Shift+Enter (select
an adjacent range of cells).

6. Press Enter (paste).

Copying a cell by double-clicking


1. Select cell C2 (see figure at right).
2. Point to the handle on the bottom right-
hand corner of the cell pointer.
3. Double-click when the mouse pointer
changes its shape to a plus symbol.
Excel copies the text or formula in the
cell down its column using the adjacent
column to the left as a guideline. If the
left column is empty, the adjacent
column to the right is used to determine
how many cells to fill.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 16

Moving between Open Workbooks


From the Window menu, select a workbook from the list of open
workbooks.
The keyboard shortcut for moving between open workbooks is Ctrl+F6 or
Ctrl+Tab. To move backwards through the list of open workbooks, use
Ctrl+Shift+F6 or Ctrl+Shift+Tab.

Copying or Moving a Sheet


There is a difference between copying all the cells in a sheet and
copying a complete sheet.

Copying cells from a sheet


Select all of the cells in the sheet by pressing Ctrl+A, or click the button
to the left of the column heading for column A. Press Ctrl+C. Select
another sheet and select cell A1. Then press Enter.

Copying a sheet
Copying a sheet means copying all of the cells, including the page setup
and names.
1. Option 1 – Move the mouse pointer to a
sheet tab. Press Ctrl, and use the mouse to
drag the worksheet to a different location.
Release the mouse button and the Ctrl key.

2. Option 2 – Right-click the appropriate sheet


tab. From the shortcut menu, select Move or
Copy. The Move or Copy box lets you copy
the worksheet to a different location in the
current workbook or move the complete
worksheet to a different workbook. Be sure to
mark the checkbox beside Create a copy.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 1: Time is Money - Give your Mouse a Break 17

3. Option 3 – From the Window menu, select


Arrange, and check the first of the four
options. When all of the open workbooks are
tiled in the window, use Option 1 (dragging
the worksheet while pressing Ctrl) to copy or
move a worksheet.
Caution
Moving a worksheet from a workbook with cell names or
formulas that are linked to a different worksheet and/or a
different workbook will create the links in the new workbook.

After you move the worksheet, from the Edit menu, select
Links, and update or cancel them before you save the new
workbook. For more information, see the sections pertaining to
links in Chapter 7, Formulas.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 19

Chapt er 2

Text
Cells in an Excel worksheet can contain different types of characters,
including text characters, numbers and dates.
Entering basic text into Excel cells is simple. It can seem complicated if
you want to do any of these tasks:
‹ Enter a large amount of text, perhaps a few paragraphs in a cell.
‹ Edit text once it is entered.
‹ Mix formatting in a single cell, i.e., having bold and non-bold text in a
single cell.

‹ Join multiple text entries into a single cell.


‹ Join text in a cell with the results of a formula.
‹ Create a header above columns and prevent text from overflowing
into certain cells.
Many Excel users do not view Excel as a platform for editing text, but
only as a pure spreadsheet. If you are still using Word to create financial
statements, you should not be. Excel offers you all of the text editing
tools needed to create financial statements, including efficient handling
of text. This chapter will try to convince you to create those financial
statements in Excel.

Text and Toolbars


Excel offers a large variety of toolbars with a wide range of formatting
icons. The following is a list of the toolbars available in Excel 97 and
Excel 2000 that are helpful for dealing with text:

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 20

‹ Formatting
‹ Drawing
‹ Picture
‹ Shadow Settings
‹ 3-D Settings
‹ WordArt

NEW
Excel 2002 includes 3 new toolbars: IN 2002

‹ Borders
‹ Drawing Canvas
‹ Power Formatting
A significant addition to the set of toolbars is the Border Toolbar. The
icons on the toolbar make it easy for you to draw borders, fill cells in
different colors, and use different line styles to mark cell borders. You
can also erase borders quickly by turning your mouse into a pencil,
just like in graphics programs.

Entering Text in Cells


Excel offers a number of tools to help you enter text in cells:

Using AutoComplete
When you enter text in a cell, Excel searches the contiguous data in the
current column to see if the characters you have entered match an
existing entry in that column. If it finds matching text, it will automatically
fill in the remaining characters for you. This saves you the trouble of
typing in the entire entry (only if you want to take advantage of it).

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 21

Selecting from list of previous entries


This feature works after you have entered several entries in a column.
You can right-click a cell and select Pick from list from the shortcut
menu. The shortcut is to press ALT + Down Arrow. You can then
select from a unique sorted list of text that has been entered in that
column.

Validating data
By selecting validation criteria, you can prevent entry of incorrect data or
data that does not meet the selected criteria. This technique is discussed
in more detail later in the chapter.

Moving Selection After Enter


Depending on the nature of your data entry, you may want the cellpointer
to automatically move to the right or down after entering a value. This is
easy to control.
1. Choose Tools, Options
and click the Edit tab.

2. Be sure the box next to


Move Selection After
Enter Direction is
checked.
3. Change the direction of
Move selection after
Enter as desired.

Tips
Prevent moving to the next cell when you finish entering data
Press Ctrl+Enter.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 22

To temporarily override the move selection after enter


direction, use the Down Arrow key instead of Enter to move
the cellpointer down one row. Use the Right Arrow key
instead of Enter to move the cellpointer to the right.

Selecting a Range
Selecting a range will help you enter data efficiently. Select a range of
cells, and begin entering data. Use Enter to move from cell to cell. The
data will be entered in the range of cells selected. When you have
entered data into the last cell selected in a column, the cursor will
automatically move to the first cell in the next column of the selected
range.
Example: Select cells A1 through D5. Assuming the Enter direction is
set to down, begin entering data. After you have entered data into cell
A5, press Enter, and cell B1 will be selected automatically.

Using AutoCorrect
Choose Tools, AutoCorrect (in Excel 2002, select AutoCorrect Options).

AutoCorrect allows you to


correct common typos,
exchange text shortcuts for
full text, such as ‘between’
instead of ‘between’ (see
figure), and to quickly insert
frequently used text.
Example: You can save The
Best Excel Book with the
shortcut Book. When you
type Book, AutoCorrect will
automatically replace the
entry with the full text, as
defined in the AutoCorrect settings.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 23

Tip – Use AutoCorrect to enter special symbols


Example – enter the euro sign in a cell
In the cell, enter the formula =CHAR(128), press F2, and then
F9 (Paste Special, Values). Copy the euro sign from the
formula bar by using the Ctrl+C shortcut. From the Tools
menu, select AutoCorrect. In the Replace box, type “euro”,
and in the With box, press Ctrl+V (Paste). Click Add, and
click OK.
To check this – in any cell, type the word “euro.” The text
changes to the euro sign.

Note
AutoCorrect shortcuts for frequently used text defined in Excel
can be used in Word. Likewise, AutoCorrect text you define in
Word will be available in Excel.

Validating Data
With data validation, Excel
validates the data entered
in a cell against the
validation criteria you
defined. If the data does
not validate, it will not be
entered into the cell.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 24

Example: You can set criteria for a range of cells to only allow dates for
2002.
1. Select cells A1:A15.
2. Choose Data, Validation.
3. Select the Settings tab, and
in the Allow box, click Date.
4. In the Start date box, enter
1/1/2002.
5. In the End date box, enter
12/31/2002.
6. Select the Input Message
tab.
7. In the Title box, enter Date validation.
8. In the Input message box, enter the criteria or
any message you like.
9. Error Alert – Select the Error Alert tab, and in the Title box, enter
the title of the alert. In the Error message box, enter the date
validation criteria. This
error alert will appear
when the date entered
into the cell is found to
be invalid.

The Error Alert tab has three different options for alerts about errors
– Stop, Warning and Information.
The Stop option prevents you from typing data into a cell if the data
does not meet the criteria. The Warning option allows you to enter
invalid data, after acknowledging the error in the warning box shown
above. The Information option only presents information about the
criterion, but allows the user to enter invalid data.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 25

Caution
Validation is only performed when data is entered into a cell
manually. The validation technique does not work on data
that is pasted into cells.

In Excel 97, you cannot use validation in cells of the frozen


titles section of the worksheet.

List
Validation by list allows you to attach lists to cells. By doing this, you
can select text from a list or enter text manually. The text will be
validated against the list, which actually serves as the validation criteria
for the text.
You can create several types of validation lists, such as a list of
company employees, customer list, account list, inventory list and others.
In the Data Validation dialog box, select the Settings tab. In the Allow
box, select List.
See the customer list in the figure below.

1. Select the customer list in column A.


2. Press Ctrl+F3 to define a name for the list. In the Names in
workbook box, enter the name CustomerList and click OK.

3. Select cells D1:D10.


4. Choose Data,
Validation.

5. Select the Settings


tab, and in the Allow
box, select List.
6. In the Source box,
press F3 and paste the
name CustomerList.
7. Click OK.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 26

8. Select cell D1 and open the customer list (click the small arrow on
the right side of the cell). Select one of the customers.

Preventing duplicate data entry


Use Validation to enter a formula to catch entry of duplicate data.
1. Select cells A2:A20.
2. Choose Data,
Validation.

3. Select the Settings


tab.
4. In the Allow box,
select Custom.
Note – The title of the
third box in the dialog
box changed to
Formula.
Enter the following formula into the box:
=COUNTIF($A$2:$A$20,A2)=1
5. Select the Error Alert tab.
6. In the Title box, enter Duplicate.

7. In the Error message box, enter The value you entered already
appears in the list.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 27

Validating text entries


The Allow box in the
Settings tab does not
include criteria for
validating text. You can
validate a text entry, but
you cannot check whether
the entry is text or not.
Solution: Enter a formula
that will check whether the
data is text.
1. Choose Data,
Validation.
2. Select the Settings tab.
3. In the Allow box, select Custom.
4. In the Formula box, enter =IsText(D4) (D4 is the first cell in the range).

5. Click OK.

Copying validation
When copying a cell that contains validation criteria to a different cell, the
criteria are copied along with the text, formula and format.
Use Paste Special to copy only the validation criteria. To do this: copy
the cell which contains the validation, select a new cell, right-click, select
Paste Special from the shortcut menu, click Validation and then OK.

Deleting validation criteria


Locate, select and delete all validation criteria defined for cells.
1. Press F5, and click Special. Select Data validation, and click OK.
2. Choose Data, Validation.
3. In the Data Validation dialog box, click Clear All.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 28

Wrapping Text
Text wrapping allows you to display multiple lines of text within a single
cell and prevents the text from spilling over into the neighboring cell.
Aside from the visual importance of keeping the text in a single cell, text
wrapping is also important when working with data. See Chapter 15,
Data.

Text wrapping techniques


‹ Automatic text wrapping.
‹ Manual text wrapping.
‹ Text wrapping of text that
extends beyond the selected
range.

Wrapping text automatically


1. Type the following text into a cell A1: This is the best Excel book
ever published.
2. Press Enter.
3. Select the cell.

4. Press Ctrl+1
(Format Cells).
5. Select the
Alignment tab.
6. Select Wrap text.
7. Click OK.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 29

If you cannot see the full text, just resize the cell to make the row or
column wider or smaller.

Canceling automatic text wrap


1. Select a cell that is formatted with text wrap.
2. Press Ctrl+1.
3. Select the Alignment tab.
4. Clear the Wrap text check box.
5. Click OK.

Wrapping text manually


1. In the Formula bar, place the cursor after the word “Excel.”
2. Press Alt+Enter.
3. Press Enter (to exit the cell).

Canceling manual Text Wrap


1. In the Formula bar, place the cursor where you caused the text to
wrap, that is, after the word “Excel.”
2. Press Delete.
3. Press Enter (to exit the cell).

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 30

Wrapping text beyond the data range


When you enter a long string of text into cell A1, the text spills over into
cells that are outside the area of the table (column E) or the print area.
You do not want the text to extend into column E. See the example
below.

1. Be sure that the text you typed was only entered into cell A1.
2. Select cells A1:E1.
3. Choose Edit, Fill, Justify (ALT+E+
I+J).
4. Click OK and the following message will appear: Text will extend
below selected range.

Caution
Before you click OK, check if there is data or text in the rows
below. Allowing the text to extend below that will overwrite the
existing data.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 31

Adding a Wrap Text shortcut


Wrap text is a useful function that you will use frequently when working
in Excel. You add the shortcut by adding a style in the Style box. For
more information, see Chapter 5, Styles.

Adding the Style box to the Formatting toolbar


Right-click one of the toolbars, and select Customize. Select the
Commands tab and then select Format.
Drag the Style icon from the Customize dialog box to the Formatting
toolbar, and drop it next to the Font Size box (or anywhere else you
choose). Then click Close.

Adding wrap text to the Style box


Enter text or several words into a cell in the worksheet, and press Ctrl+1.
Select the Alignment tab, check the Wrap text check box and click OK.
Click on the Style icon, enter Wrap text in the Style Name field and
press OK.

To apply the style, enter text into a cell, click the style icon, change the
style to Wrap text and press OK.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 32

Changing the Indentation in a Cell


In the figure, note the text in Column A.
The cells contain a list of expenses for each department, with an
indentation of a few characters.

1. Type the text in the cells.


2. Select the list of expenses below each division. For example, select
cells A2:A6 (group of expenses for Department 1) and so forth for
each group of expenses for each department.
3. Click the Increase Indent icon on the Formatting toolbar
several times, until you reach the indentation you want. Alternatively,
select A2:A6; press Ctrl+1; select the Alignment tab; and in the
Indent box, change the number of characters to indent. Click OK.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 33

Dividing a Title in a Cell


See cell A1 in the figure below.
1. In cell A1, enter
the text Title
Number.
2. Select cell A1. In
the Formula bar,
place the cursor
after the word
Title.
3. Press Alt+Enter
twice (text wrap
and an additional row). Press Enter to exit the cell.
4. Press Ctrl+1 (Format Cells dialog box).
5. Select the Border tab.
6. Select the left diagonal border.
7. Select the Alignment tab.
8. In the Horizontal box, select Justify.
9. In the Vertical box, select Justify.
10. Click OK.

Transposing Data
Transpose is used to change a
vertical range of cells to a
horizontal range or vice versa.
1. Copy a range of cells (see
cells A1:C9 in the figure).
2. Select a cell in the current or
any other worksheet and
right-click.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 34

3. From the shortcut menu, select Paste Special.


4. Check the Transpose check box.

The result:

See the Array Formula section of Chapter 7, Formulas for a method of


transposing using a formula.

Changing a Numeric Heading to Text


When editing reports, you occasionally use numerals in headings. For
example, in reports that are organized according to year, you might enter
the year 2001 in the heading cells as a number and so forth.
You will want to prevent these numbers from being calculated along with
the other numeric data.
The solution: enter the ‘ (apostrophe) symbol before the number. The
result: ‘2001 as a text entry.

Selecting Cells That Only Contain Text


By selecting cells that only contain text, you can distinguish between
cells containing different types of data, which allows you to delete, fill or
lock cells by type.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 35

Technique 1
1. Press F5, or choose Edit, Go To…
2. In the Go To dialog box, click Special.
3. In the Go To Special dialog box, select
Constants.
4. Click OK.

Technique 2 – Conditional Formatting


1. Select the data area.
2. From the Format menu, select
Conditional Formatting.
3. In Condition 1, select Formula Is.
4. In the Formula Box, enter the formula
=Istext(A1).
5. Click Format..., choose any format from the Format Cells dialog
box, and click OK.
6. Click OK.

Find and Replace


To search for text, press Ctrl+F or choose Edit, Find. To search and
replace text, press Ctrl+H or choose Edit, Replace. In Excel 97, these
tools work only on the active sheet. In Excel 2000 or later, they will
search all selected sheets. To select multiple sheets, hold down the Ctrl
key while clicking on each sheet tab. It is very important to unselect
multiple sheets or any edits will happen to all selected sheets. To

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 36

unselect multiple sheets, right-click the sheet tab and select Ungroup
Sheets.
Using wild cards in the Text Search
Use * as a wild card for any number of characters. The * may appear
before or after text.
Example: Searching for *CO will find Cisco or Telco.
Use ? as a wild card for a single character.
Example: searching for R?N will find Ron or Ran but not Rain.
To search for an asterisk, enter ~* in the search box.

Searching All the Sheets in the Workbook


In Excel 97, Ctrl+F search only the active sheet. To search all sheets in
Excel 97, use this macro. (See Chapter 26, Running a Macro.)

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 37

Using Text Formulas


In the figure below, you can see a list of text formulas, including an
explanation in Column E and the results of the formula’s calculation in
column C.

Joining Text
You can create new text by joining text from several cells, including a
combination of linked and formatted numbers.

Joining text using a keyboard shortcut


A simple technique for combining, clearing and cutting text is using the
keyboard shortcuts Ctrl+C, Ctrl+V, and Ctrl+X.
Example: Select a cell containing text. In the Formula bar, select
characters or full words and press Ctrl+C. Select a different cell, and in
the Formula bar, place your cursor where you want to paste the text you
copied. Press Ctrl+V.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 38

Joining text using a manual formula


1. In cell A1, enter the text This is the.
2. In cell A2, enter the text Best Excel book ever published.
3. In cell A3, enter the formula =A1&" "&A2.

Explanation
The ampersand symbol (&, Shift+7) joins text the same way the + symbol
joins numbers. The quotation marks are used to add empty spaces
between them.
In the example above, a space is added between the words combined. In
cell A3, you can see the combined sentence. Combining text from
different cells results in merged text.

Joining text using the CONCATENATE function

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 39

Much like writing a formula


to join text, the
CONCATENATE function
allows you to merge
values from multiple cells
into a single cell.
In a formula, you create a
space between words by
pressing the Spacebar. In
the second box in sample figure, pressing the Spacebar will
automatically add the quotation marks when you move to the next box.

Joining text with a linked number


Example: Format a number without decimal places, with a thousands
separator, and combine it with text.
1. In cell A1, enter the text You still owe the sum of.
2. In cell A2, enter the number 5434.

3. In cell A3, enter the text for invoice # 2232 from 6/15/2001.
4. In cell A4, enter the formula =A1&""&TEXT(A2,"#,##0")&""&A3.

Formatting a number with the thousands sign –


the letter K
The formula =A1&” “&TEXT(A2,”#,K”)&” “&A3

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 40

The sentence appearing in the cell – You still owe the sum of 5K for
invoice # 2232 from 6/15/2001.
For an explanation of formatting numbers, see Chapter 3, Formatting
Numbers.

Formatting a date containing text


The formula =A1&” “&TEXT(A2,”mm/dd/yyyy”)&” “&A3
The sentence appearing in the cell – On 10/22/2000 you had a cup of
coffee…
For more information on the various formatting options, see Chapter 3,
Formatting Numbers.

Extracting Characters from Text

Using formulas to extract characters from text

See figure – A budget item number or an index number in accounting is


made up of three parts:
‹ a department number – the first three digits.
‹ the expense item number – the next three digits.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 41

‹ And secondary description of the expense – the last two


digits.
Use the formulas shown in Row 6 to extract these portions from the text.
You can find the formulas for extracting characters under the Paste
Function (from the menu: Insert - Function - Text).

Parsing characters from text without formulas


Use Text to Columns to parse text.
1. Select column A.
2. Choose Data, Text to Columns.
3. In Step 1 of 3, select Fixed width.
4. Click Next.
5. In Step 2 of 3, you
parse the data in
the column by
clicking the mouse
between columns
you want to parse.
6. Click Next.
7. In Step 3 of 3, in
the Destination
box, enter cell B1.
8. Click Finish.

Separating first name and last name


Formulas for separating first name and last name
Cell A1 contains a name – John Smith.
The formula for extracting the first name is =LEFT(A1,FIND(“ “,A1)).
The formula for extracting the last name is
=MID(A1,FIND(“ “,A1)+1,LEN(A1)).

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 2: Tex t 42

Separating first name and last name without using


formulas
The cells in Column A contain a list of names, first name and last name.
1. Select Column A or the range of cells containing the list of names.
2. From the Data menu, select Text to Columns.
3. In Step 1 of 3, select Delimited.
4. In Step 2 of 3, select the Space option.
5. In Step 3 of 3, in the Destination box, select Cell B1, and click
Finish.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 43

Chapt er 3

Formatting Numbers

Excel offers a wide range of numeric formats, so you can choose the one
that best suits your needs. Numeric formats are set on the number tab of
the Format Cells dialog. To display this dialog, use any of these
methods:

‹ Press Ctrl+1.
‹ Right click a cell and choose Format Cells.
‹ Press Alt+O+E.

‹ From the menu, select Format, Cells.


Although Excel offers a wide variety of formats, the range is incomplete.
Standard formats do not offer formats such as formatting negative
numbers with parentheses, rounding a number to the thousands, adding
characters to the number format (for example, characters that identify
weight, like ton and pounds), adding characters like the euro sign in
Excel 97, adding words and text to the format, coloring values according
to criteria, and more.
With Excel, you can create custom number formats that suit your needs
and save them for repeated use.
This chapter teaches you the structure of number formats and the
special symbols Excel uses to create them.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 44

Where Custom Formats Are Saved


Display the Format Cells dialog. Select the Number tab, and under
Category select Custom. You will see a list of additional formats. The
custom formats that you create are saved in the Custom dialog box in
the workbook in which you created and saved them.
You can create and save custom number formats and use them in
additional workbooks by saving the number format as a style in a
workbook template.
See Chapter 5, Styles.
See the Template section of Chapter 13, Customizing Excel.

Symbols Used in Excel to Format Numbers


Get to know the special symbols you will use to create custom formats.
0 (zero) symbol – displays a digit in a cell, including the digit 0.
Example: The format 0.00 displays the number 0.987 as a number with
two places after the decimal point, that is, 0.99 (without the 7). Places
are omitted after the number is rounded. Any omitted insignificant digits
cause the number to be rounded. In this case, 0.987 was rounded to
0.99.
# (pound) sign – displays significant digits and does not display
insignificant zeroes.

Example: A format with two places after the decimal point, with or
without the digit 0:
The format code for 50 cents:

#.## The cell displays .5


#.#0 The cell displays .50
0.00 The cell displays 0.50
, (comma) – separates thousands
Example: With the format #,##0 the number 4543 is displayed as 4,543.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 45

The comma has a second use in the number format. If you place the
comma at the end of the digits, then the displayed number will be divided
by 1000 for each comma.
#,##0, will display numbers in thousands
#,##0,, will display numbers in millions
/ (forward slash) symbol – the division sign for displaying a fraction.
* (asterisk) symbol – fills in empty characters, up to the beginning of the
number.
Example: The number 4543 is displayed as $ 4,543 with the format
$ *#.##0. The $ sign is displayed on the left side of the cell, and the
number is displayed on the right side.
“TEXT” – if text characters are enclosed in quotation marks and followed
by a number format, the text is displayed and the digits are formatted.

Example: With the format “Balance” #,##0, the number 4543 is displayed
as Balance 4,543. In the worksheet cell, you only need to enter the
digits, not the text.

\<Any single character> - Use the backslash followed by a single text


character to display that character. The following format will display a
number in millions: #,##0.0,,\M. Using this format, 123,789,456 would
be displayed as “123.8M”. Excel will allow you to omit the backslash
when displaying a capital letter K. This format will display a number in
thousands: #,##0,K. Using this format, 123,789,456 would be displayed
as 123,789K.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 46

Special formats, rounding a number to the


thousands, displaying in the thousands,
displaying text and a number
The figure below shows examples of special formats. The format code is
in column D, and the explanation is in column A.

The Four Sections of the Format


After you enter a number into a cell, Excel evaluates the number. The
format of every number is divided into four sections. Excel uses the
results of the evaluation to classify the number and display the correctly
formatted number in the cell.
The four sections of the format are positive numbers, negative
numbers, zero values, and number+text.

The sections of the format are separated from one


another by a semicolon (;).

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 47

Formatting a negative number with parentheses,


replacing 0 with a dash
The format: #,##0 ;[RED](#,##0) ;- ;
In the example, the format has
three sections. Below are step-by-
step instructions for formatting.
Formatting the positive section
In the Type box, enter #,##0
0. Press the Spacebar, and type
; to indicate the end of the
section.
Formatting the negative
section
0. Type the color in brackets [RED].
0. Type ( (open parentheses), enter the format just as you typed it for
the positive number section, and type ) (close parentheses).
0. Type ; to indicate the end of the second section.

Formatting zero values


0. Type the symbol – (minus), use the Spacebar to enter five spaces,
and type ; to indicate the end of the third section.
0. Click OK in the Formatting Cells dialog box.
Explanation
On the left hand side of the
format (positive number), you
left a space. This means that the
positive number is entered into
the cell with a space on the right
side, since the format code for the negative number includes
parentheses (see Cells A1 and A2 in the figure).

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 48

In the third section of the number format, display of zero values, the
resulting 0 in the cell is replaced by a dash. The five spaces you entered
position the dash in line with the hundreds place in the positive or
negative number (see cell A3 in the figure).

Tip
Is the data in the cell formatted as a date
instead of as a number?
Press Ctrl+Shift+~.

Special Formats – Examples


The examples in the figure below illustrate format
codes for three sections of the number format.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 49

Adding special symbols to the number format


You can add special symbols to
the number format, such as
symbols that are not included in
the currency or accounting formats.
The CHAR formula displays the
symbol. To add a symbol to the
new format you create, copy the
symbol to the Type box.
Example: Create a format with
the € symbol (euro)
(The symbol does not appear in
the format list in Excel 97).
1. Enter the formula =CHAR(128)
in the cell.
2. Press F2 and then F9 to delete
the formula and leave the value
in the cell.
3. In the Formula bar, select the
€ symbol and press Ctrl+C
(copy).
4. Select another cell. Press
Ctrl+1.
5. Select the Number tab, and
choose Custom.

6. In the Type box, press Ctrl+V.


7. Continue by typing the format
code #,##0.
8. Press Enter.
The result: €#,##0.

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 50

Tip – Insert the Euro sign into AutoCorrect


Refer to Chapter 2, Text.

Returning characters specified by numbers


To display all symbols, letters and numbers, create a series of ascending
numbers from 33 to 250 in Column A beginning with Cell A1. In Cell B1,
type the formula CHAR with a reference to Cell A1. Copy the formula to
all the cells in Column B, alongside the series in Column A.

Formatting Numbers According to Criteria


There are two ways to format numbers according
to criteria:
‹ Custom formatting for a number with criteria
‹ Conditional formatting

Using custom formats for numbers with criteria


Your options for coloring a number are not limited to displaying negative
numbers red. You can color positive and/or negative numbers in any
color you wish (do not get excited – the number of colors is limited to
eight and most are difficult to read). Do this by adding the name of the
color to the number format in brackets.
Example: [BLUE] #,##0 ;[RED](#,##0)

A positive number is displayed in blue; a negative number is displayed in


red; and 0 is displayed in blue (since there is no third section, 0 receives
the format of the positive number by default).

Add a condition to the formatting, and have each section be displayed in


a different color:
[BLUE] [>5000]#,##0 ;[RED](#,##0); #,##0

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 51

Explanation:
A positive number that is greater than 5,000 will be displayed in blue; a
negative number will be displayed in red; and positive numbers from 0 to
4,999 in black (the default is applied to the third section of the number
format).
Other valid colors are [BLACK], [CYAN],
[MAGENTA], [WHITE], [GREEN], and [YELLOW].

Conditional Formatting
With Conditional
formatting, you can
add up to three
criteria. The number
or text is evaluated
according to these
criteria before the
custom format for a
conditional number
is applied.
Select a cell or cells
in the sheet. From the Format menu, select
Conditional Formatting.
The figure illustrates three different format conditions, according to the
calculated value in the cell(s) you selected.

Totaling Rounded Numbers

How Excel performs calculations


Excel does not take the number format into account when performing
mathematical calculations. For example, a cell contains a number with
10 digits after the decimal. The chosen format is a whole number format,
with no places after the decimal. When performing the calculation, Excel

Author: Joseph Rubin, CPA www.exceltip.com


Chapter 3: Formatting Number 52

relates to the entire number, without considering the formatting, for a


calculation of up to 15 significant digits.
When the amounts displayed in the cells and the amounts that Excel
uses for calculations are different, there can be difference in the number
totals.
Example:
In Cells B3 to B7, the numbers were rounded according to their number
formats. The total in Cell B8 is not equal to total of the displayed
numbers, which is 16.

Permanent solution (no way back)


Choose Tools, Options.
Select the Calculation tab, and select the Precision as displayed
option.
The result: all the places after the decimal are cut in the cells. The
numbers displayed in the cells are whole numbers, and the total is the
sum of these whole numbers.

The disadvantage – there is no way to undo this, as the numbers have


been permanently cut.

Author: Joseph Rubin, CPA www.exceltip.com


F1 Get the Most out of EXCEL F1Get the Most out of
EXCEL
8 Maximize Excel's potential! Work smarter, faster, more efficiently and get the
most out of the Microsoft Excel program!

8 Contains an amazing collection of Excel tips, tricks, keyboard shortcuts, as


well as undocumented hidden tips and solutions.

8 No matter which Excel version you use Excel 97, 2000, 2002 or 2003, this easy

F1 Get the Most out of EXCEL


to use book is a must, both at home and in the office.

8 You can add your own notes, reference tips and examples to any page,
personalizing it to meet your exact needs!

8 Upgrade your Excel working level quickly and easily!

"This is absolutely the best Excel Tutorial Help Guide around!!!"

Author:
Joseph Rubin, CPA, has written the very successful books:
8 Financial Statements.xls
8 Mr Excel on Excel
He is the principal of the leading Excel Web site www.exceltip.com, and has more
than 25 years of financial experience in the accounting industry.

This book is published by: Limelight Media Inc.


www.limelightmediainc.com
Joseph Rubin, CPA

$ 19.95 USA | $ 27.95 CAN


ISBN 0-9746368-2-7
The Ultimate Excel Tip Help Guide
User Level – All Levels
All Levels | Excel 97 | Excel 2000 | Excel 2002 | Excel 2003
Microsoft Excel Versions – Excel 97, 2000, 2002, 2003
Shelving Category – Microsoft Office / Excel /
Spreadsheets
Joseph Rubin, CPA
Financial Statements.xls Financial Statements.xls
A Step-by-Step guide to creating Financial Statements using A Step-by-Step guide to creating Financial Statements using
Microsoft Excel Microsoft Excel
Second Edition

Financial Statements.xls Joseph Rubin, CPA


8 Build complete models of Financial Statement reports using Microsoft Excel including: Balance Sheet,
Income Statement, Cash Flow and Notes. Second Edition
8 Present, Print or Mail Financial Statement reports on a Monthly, Quarterly (calendar/ fiscal) or Annual basis.
8 Customize the Financial Statements.xls workbook, add Custom Menus, automate printing and mailing.
8 Analyze Financial Statements including: 5 year comparison reports, Ratio Analysis report and Profit
Centers using PivotTable reports.

This book is for: Accountants, CPA'S, Controllers, Developers, Consultants and Instructors. Bonus CD-Rom Included
Bonus CD-Rom Includes:
8 Complete searchable eBook – easy to browse and print.
8 Sample Financial Statements in Excel workbook file.
8 Excel workbook files contain all data and formulas covered in the book.
8 Additional Bonus: A number of free Add-Ins.

Author:
Joseph Rubin, CPA, principal of www.exceltip.com is the author of the very successful book
F1 Get the Most out of Excel! The Ultimate Excel Tip Help Guide.
Joseph Rubin has more than 25 years of financial experience in the accounting industry.

This book is published by: Limelight Media Inc. www.limelightmediainc.com


ISBN 0-9746368-4-3
$ 44.95 USA | $64.95 CAN

User Level – Intermediate to Advanced


Excel Versions – Excel 97, 2000, 2002 (xp) and 2003
Shelving Category – Business Application/ Excel/ Spreadsheets Joseph Rubin, CPA

You might also like