Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Excel tips 2008

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
ExcelTips
2008
Compiled from the pages of ExcelTips,
your free weekly productivity newsletter
ExcelTips 2008
Published by:
Sharon Parq Associates, Inc.
PO Box 794
Orem, UT 84059
All contents copyright © 1999–2009 by ...
Table of Contents
Introduction 1
WHAT’S IN THIS E-BOOK? 1
WHAT ABOUT VIRUSES? 1
NEED MORE TIPS? 2
A SPECIAL NOTE OF THANKS...
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Prochain SlideShare
Jessenia
Jessenia
Chargement dans…3
×

Consultez-les par la suite

1 sur 514 Publicité
Publicité

Plus De Contenu Connexe

Plus récents (20)

Publicité

Excel tips 2008

  1. 1. ExcelTips 2008 Compiled from the pages of ExcelTips, your free weekly productivity newsletter
  2. 2. ExcelTips 2008 Published by: Sharon Parq Associates, Inc. PO Box 794 Orem, UT 84059 All contents copyright © 1999–2009 by Sharon Parq Associates, Inc., All rights reserved. No part of this document or the related files may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording, or otherwise) without the prior written permission of the publisher. Produced and published in the United States of America Revision history: 7 January 2009: First published Limit of Liability and Disclaimer of Warranty: The publisher has used its best efforts in preparing this book, and the information provided herein is provided “as is.” Sharon Parq Associates, Inc., makes no representation or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaims any implied warranties of merchantability or fitness for any particular purpose and shall in no event be liable for any loss of profit or any other commercial damage, including but not limited to special, incidental, consequential, or other damages. Trademarks: This book identifies product names and services known to be trademarks, registered trademarks, or service marks of their respective holders. They are used throughout this book in an editorial fashion only. In addition, terms suspected of being trademarks, registered trademarks, or service marks have been appropriately capitalized, although Sharon Parq Associates, Inc., cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark, registered trademark, or service mark. Sharon Parq Associates, Inc., is not associated with any product or vendor mentioned in this book.
  3. 3. Table of Contents Introduction 1 WHAT’S IN THIS E-BOOK? 1 WHAT ABOUT VIRUSES? 1 NEED MORE TIPS? 2 A SPECIAL NOTE OF THANKS 2 SHARING THIS DOCUMENT 2 General Tips 4 I HATE THE EXCEL 2007 USER INTERFACE 4 CANCELING A COMMAND 5 ARRANGING WORKBOOK WINDOWS 5 STARTING IN SAFE MODE 6 EXCLUDING A SPECIFIC ADD-IN AT STARTUP 7 DISABLING EXCEL'S HELP SYSTEM 8 WHERE IS THAT NAME? 10 TURNING OFF NAMES 10 REFUSING ONLINE HELP 10 TURNING OFF DYNAMIC MENUS 12 ANIMATED MENUS 13 TURNING OFF ERROR CHECKING 13 A SHORTCUT FOR SWITCHING FOCUS 15 ACTIVATING THE FORMULA BAR WITH THE KEYBOARD 16 LIMITING WHAT IS SHOWN IN THE FORMULA BAR 18 ENLARGING THE FORMULA BAR 19 TURNING OFF SCREENTIPS 21 SIMULTANEOUS SCROLLING 23 REMOVING PERSONAL INFORMATION 24 CLEARING LARGE CLIPBOARD ENTRIES 25 CHANGING ERROR CHECKING RULES 26 FORCING MANUAL CALCULATION FOR A WORKBOOK 27 MAKING AUTOCOMPLETE WORK FOR AN ENTIRE COLUMN 28 EXCEL PROFICIENCY TESTING 29 SELECTED CELLS NOT SHADED 29 PROBLEM WITH MISSING CONTEXT MENU OPTION 30 CHANGING THE SHORTCUT MENU 31 ALWAYS OPEN AT 100% ZOOM 32 COUNTERING COMPRESSED COLUMNS 33 CHANGING HORIZONTAL ORIENTATION 34 TAB KEY WON'T MOVE FROM CELL TO CELL IN LOCKED WORKSHEET 35 TURNING HEADERS ON AND OFF 36 ExcelTips 2008 Page iii
  4. 4. MAKING COLUMN HEADERS VERTICALLY WIDER 37 FORCING STUBBORN RECALCULATION 39 VIEWING SAME CELLS ON DIFFERENT WORKSHEETS 39 BACKING UP CUSTOM DICTIONARIES 41 DISABLING A FUNCTION KEY 43 SIMPLIFYING THE FONT LIST 43 SHORTCUT FOR VIEWING FORMULAS 44 Editing Tips 45 CREATING NEW WINDOWS 45 CANCELING AN EDIT 45 QUICKLY SELECTING CELLS 46 SELECTING NONCONTIGUOUS RANGES WITH THE KEYBOARD 46 DISPLAYING A HIDDEN FIRST ROW 47 COPYING BETWEEN INSTANCES OF EXCEL 48 PASTING WITHOUT UPDATING REFERENCES 50 CONVERTING FROM RELATIVE TO ABSOLUTE 51 INSERTING AND COPYING ROWS 52 MOVING AND SELECTING ROWS 52 ENTERING NUMBERS IN EXCEL 54 ENTERING INFO INTO MULTIPLE CELLS 55 LIMITING ENTRIES TO NUMERIC VALUES 55 LIMITING INPUT TO A FORMAT 57 DEALING WITH LONG FORMULAS 59 TRANSPOSING YOUR DATA 60 DRAGGING TO CLEAR CELLS 61 DELETING BLANK COLUMNS 61 CONDITIONALLY DELETING ROWS 63 ADDING POP-UP DOCUMENTATION TO A CELL 64 CORRECTING A CAPITAL MISTAKE 66 MODIFYING PROPER CAPITALIZATION 67 SELECTING FORMULAS 69 DELETING EVERYTHING EXCEPT FORMULAS 70 GETTING RID OF EVERYTHING EXCEPT NUMBERS 72 RANGES ON MULTIPLE WORKSHEETS 74 EDITING THE SAME CELL IN MULTIPLE SHEETS 75 UNDERSTANDING AUTOCOMPLETE 75 QUICKLY FILLING A COLUMN 77 FAST AUTOFILL 77 AUTOFILL WON'T WORK AS EXPECTED 78 TURNING OFF AUTOFILL FOR A WORKBOOK 79 FINDING UNUSED NAMES 79 ADJUSTING FORMULAS WHEN PASTING 81 UNWANTED DATA CHANGES 82 ExcelTips 2008 Page iv
  5. 5. TURNING OFF AUTOMATIC CAPITALIZATION 83 ENSURING UNIQUE VALUES IN A COLUMN 84 PUTTING ADDRESSES ON STATE-SPECIFIC WORKSHEETS 85 DELETING OLD DATA FROM A WORKSHEET 88 WORKING IN FEET AND INCHES 89 SHORTENING ZIP CODES 90 FORMATTING CANADIAN POSTAL CODES 92 DIVIDING VALUES 92 AUTOMATICALLY PROTECTING AFTER INPUT 94 SCROLL WHEEL DOESN'T WORK WHEN EDITING IN EXCEL 2007 94 TYPING CHECK MARKS INTO EXCEL 96 RETAINING FORMATTING AFTER A PASTE MULTIPLY 97 INSERTING A RADICAL SYMBOL 99 EASILY CHANGING LINKS 99 UPDATING LINKS IN COPIED FILES 100 COPYING A HYPERLINK TO LOTS OF WORKSHEETS 102 REMOVING SPACES 103 CONTINGENT VALIDATION LISTS 103 REFERENCING THE LAST CELL IN A COLUMN 105 COUNTING WORDS 106 GETTING HELP WHEN ENTERING FUNCTIONS 107 AUTOMATICALLY BREAKING TEXT 108 CHECKING FOR AN ENTRY IN A CELL 108 CONCATENATING RANGES OF CELLS 109 CONVERTING TEXT TO VALUES 111 USING SLASHED ZEROES 113 COMBINING MULTIPLE ROWS IN A COLUMN 113 ERRORS WHEN COPYING REFERENCES TO EXTERNAL CELLS 114 DELETING ALL NAMES BUT A FEW 115 TURNING OFF INSERT OPTIONS 116 TURNING OFF PASTE OPTIONS 117 SYMBOLS CONVERT TO NUMBERS IN EXCEL 119 USING SUBTOTALS AND TOTALS 120 COPYING SUBTOTALS 121 WILDCARDS IN 'REPLACE WITH' TEXT 123 Formatting Tips 126 NUMBER FORMATTING SHORTCUTS 126 UNABLE TO FORMAT CELLS 126 CHANGING FONT SIZE USING A SHORTCUT KEY 127 NOTATION FOR THOUSANDS AND MILLIONS 128 ALTERING THE DISPLAYED FORMAT OF NUMBERS TO THE NEAREST 100 129 USING AN EXACT NUMBER OF DIGITS 129 FORMATTING CURRENCY 130 ExcelTips 2008 Page v
  6. 6. FILLING A CELL 131 FILL COLOR DOESN'T DISPLAY 133 REFERENCING EXTERNAL CELL COLORS 134 SETTING VERTICAL ALIGNMENT 135 USING STRIKETHROUGH FORMATTING 136 DRAWING BORDERS 137 ADDING DIAGONAL BORDERS 138 PARTIALLY BLOCKING SOCIAL SECURITY NUMBERS 140 ADDING DROP SHADOWS TO CELLS 141 UNHIDING A SINGLE COLUMN 142 CONVERTING FROM NUMBERS TO TEXT 143 CONVERTING FORCED TEXT TO NUMBERS 145 HIGHLIGHTING CELLS CONTAINING SPECIFIC TEXT 147 SETTING CELL WIDTH AND HEIGHT USING THE KEYBOARD 150 USING FRACTIONAL NUMBER FORMATS 152 SELECTING A PAPER SIZE 153 HIDING ROWS BASED ON TWO VALUES 154 ADJUSTING CELL MARGINS FOR MORE WHITE SPACE 156 USING AUTOFORMAT 157 MAKING ALL OCCURRENCES BOLD 159 Conditional Formatting Tips 163 COPYING CONDITIONAL FORMATTING 163 PROTECTING CONDITIONAL FORMATTING 164 SORTING OR FILTERING BY CONDITIONAL FORMAT RESULTS 165 APPLYING CONDITIONAL FORMATTING TO MULTIPLE WORKSHEETS 165 CHANGING FONT FACE AND SIZE CONDITIONALLY 166 SHADING BASED ON ODDS AND EVENS 168 Header and Footer Tips 171 DYNAMIC HEADERS AND FOOTERS 171 USING A DIFFERENT FOOTER ON SECONDARY PAGES 172 PUTTING A DIFFERENT DATE IN A HEADER 173 PRINTING A MULTI-LINE FOOTER 174 USING COLOR IN HEADERS AND FOOTERS 174 ADDING AMPERSANDS IN HEADERS AND FOOTERS 175 LEADING ZEROS IN PAGE NUMBERS 175 HEADER AND FOOTER BACKGROUND COLOR 176 Online Tips 179 TURNING OFF HYPERLINK ACTIVATION 179 TYING A HYPERLINK TO A SPECIFIC CELL 181 DROP-DOWN LIST OF HYPERLINKS 182 ExcelTips 2008 Page vi
  7. 7. CHANGING PORTIONS OF MANY HYPERLINKS 183 REMOVING HYPERLINKS WITHOUT A MACRO 184 REMOVING HYPERLINKS WITHOUT A MACRO 185 GETTING RID OF MANY HYPERLINKS 186 GETTING RID OF ALL HYPERLINKS 186 AUTOMATIC TEXT IN AN E-MAIL 187 LINKING TO A SPECIFIC PAGE IN A PDF FILE 188 SETTING WEB FONTS 189 SPECIFYING YOUR TARGET MONITOR 192 Worksheet Tips 195 VIEWING TWO WORKSHEETS AT ONCE 195 REFERENCING WORKSHEET TABS 196 QUICKLY COPYING WORKSHEETS 197 DISABLING MOVING BETWEEN WORKSHEETS 197 PREVENTING SOMEONE FROM RECREATING A PROTECTED WORKSHEET 198 CHANGING THE COLOR OF WORKSHEET GRIDLINES 200 LOCKING WORKSHEET NAMES 201 SWITCHING HEADERS IN A FROZEN ROW 202 PROTECTING WORKSHEETS FROM DELETION 205 PROTECTING A WORKSHEET'S FORMAT 205 IDENTIFYING THE LAST CELL CHANGED IN A WORKSHEET 207 Worksheet Function Tips 209 RETURNING A WORKSHEET NAME 209 GETTING THE NAME OF THE PARENT WORKBOOK 209 LARGE NUMBERS IN THE MOD FUNCTION 210 RETURNING A WEIGHT AND A DATE 212 COUNTING DISPLAYED CELLS 213 FINDING THE LOWEST NUMBERS 214 ROUNDING TO POWERS OF 10 215 CHECKING FOR TEXT 216 ROUNDING NUMBERS 216 USING THE MROUND WORKSHEET FUNCTION 217 SUMIF DOESN'T RECALC AUTOMATICALLY 217 CELL AND NAME REFERENCES IN COUNTIF 220 USING THE INT WORKSHEET FUNCTION 221 USING THE TRUNC WORKSHEET FUNCTION 221 RETURNING BLANKS WITH VLOOKUP 222 RETURNING BLANKS OR ASTERISKS FROM A LOOKUP 223 Formula Tips 225 EVALUATING FORMULAS 225 ExcelTips 2008 Page vii
  8. 8. EXACT FORMULA COPIES 226 IGNORING CASE IN A COMPARISON 227 SUMMING BASED ON FORMATTING IN ADJACENT CELLS 227 FINDING THE NTH OCCURRENCE OF A CHARACTER 230 DETERMINING BUSINESS QUARTERS FROM DATES 231 SUMMING ONLY POSITIVE VALUES 232 ERRORS WHEN SUBTRACTING 233 FINDING THE FIRST NON-DIGIT IN A TEXT VALUE 235 REFERENCING THE LAST SIX ITEMS IN A FORMULA 237 COUNTING CELLS ACCORDING TO CASE 237 STOPPING A FORMULA FROM UPDATING REFERENCES 240 CALCULATING THE MEDIAN AGE OF A GROUP OF PEOPLE 241 GENERATING DOUBLE-DIGIT RANDOM NUMBERS 241 EXCLUDING VALUES FROM AVERAGING 242 RETURNING LEAST-SIGNIFICANT DIGITS 244 ROUNDING TO THE NEAREST EVEN INTEGER 244 PULLING FORMULAS FROM A WORKSHEET 245 FIGURING OUT THE LOW-SCORE WINNER 250 DETERMINING WINNERS, BY CATEGORY 251 REPLACING DASHES WITH PERIODS 252 INCREMENTING NUMERIC PORTIONS OF SERIAL NUMBERS 253 COUNTING NON-BLANK CELLS 254 COUNTING UNIQUE VALUES 254 COUNTING CONSECUTIVE NEGATIVE NUMBERS 255 COUNTING WINS AND LOSSES 257 COUNTING ONLY MONEY WINNERS 258 LAST NON-ZERO VALUE IN A ROW 259 GETTING THE NAME OF THE WORKSHEET INTO A CELL 260 DETERMINING IF A VALUE IS OUT OF LIMITS 262 SEARCHING FOR A VALUE USING A FUNCTION 263 CALCULATING FUTURE WORKDAYS 265 REVERSING NAMES IN PLACE 266 CELL ADDRESS OF A MAXIMUM VALUE 267 FINDING COLUMNS OF A CERTAIN WIDTH 268 DETERMINING COMBINATIONS TO MAKE A TOTAL 269 CONDENSING SEQUENTIAL VALUES TO A SINGLE ROW 272 SUMMING DIGITS IN A VALUE 273 GENERATING RANDOM STRINGS OF CHARACTERS 275 DEALING WITH CIRCULAR REFERENCES 277 PivotTable Tips 278 TEXT TRUNCATED IN PIVOTTABLE 278 SUPPRESSING ZERO VALUES IN PIVOTTABLES 278 BOGGING DOWN WITH CALCULATED ITEMS 279 ExcelTips 2008 Page viii
  9. 9. Sorting and Filtering Tips 280 SORTING A RANGE OF CELLS 280 SORTING DECIMAL VALUES 281 SORTING BY FILL COLOR 282 FIXING ODD SORTING BEHAVIOR 284 DETERMINING SORTING CRITERIA 285 FILTERING TO A DATE RANGE IN THE PAST 287 FILTERING FOR COMMENTS 288 COUNTING FILTERED ROWS 289 PERFORMING CALCULATIONS WHILE FILTERING 290 Comment Tips 291 EDITING COMMENTS 291 ADDING A COMMENT TO MULTIPLE CELLS 291 PASTING A COMMENT INTO YOUR WORKSHEET 292 COPYING COMMENTS TO CELLS 293 PLACING FORMULA ANSWERS IN A COMMENT 294 LINKING COMMENTS TO MULTIPLE CELLS 296 FINDING AND REPLACING TEXT IN COMMENTS 297 Date and Time Tips 299 HOW EXCEL STORES DATES AND TIMES 299 CONVERTING TIME NOTATION TO DECIMAL NOTATION 299 CHANGING EXCEL’S STARTING DATE 300 INSERTING THE CURRENT TIME WITH SECONDS 302 ENTERING LARGE TIME VALUES 303 USING EARLY DATES 304 ROUNDING TIME 305 DATES WITH PERIODS 305 USING EXCEL FOR TIMING 307 WORKING WITH ELAPSED TIME 308 DISPLAYING NEGATIVE TIMES 310 ENTERING DATES WITHOUT SEPARATORS 312 ENTERING OR IMPORTING TIMES WITHOUT COLONS 315 MODIFYING DEFAULT YEAR FOR DATES 316 COUNTING DATES IN A RANGE 318 DAYS LEFT IN THE YEAR 319 FORCING DATES FORWARD 320 AUTOMATICALLY ADVANCING BY A MONTH 320 EVERY SECOND TUESDAY 322 IS DAYLIGHT SAVINGS TIME IN EFFECT? 323 CONVERTING EUROPEAN DATES TO US DATES 325 CONVERTING UNIX DATE/TIME STAMPS 328 ExcelTips 2008 Page ix
  10. 10. CONVERTING UTC TIMES TO LOCAL TIMES 329 Graphics Tips 330 RESIZE GRAPHICS OUTSIDE OF EXCEL 330 PUTTING A GRAPHIC IN A HEADER OR FOOTER 331 SPECIFYING AN ORDER FOR DRAWING OBJECTS 332 INSERTING A WATERMARK BEHIND MERGED CELLS 333 SETTING DEFAULT ATTRIBUTES FOR LINES AND ARROWS 334 USING WORDART IN EXCEL 335 PICTURES IN AUTOSHAPES 337 ADDING TEXT TO AN AUTOSHAPE 340 PLACING TEXTBOX TEXT INTO A WORKSHEET 341 TAKING A PICTURE 342 GETTING RID OF FIXED OBJECTS 343 PIXELS IN A TEXT STRING 344 HIDING GRAPHICS WHEN FILTERING 345 Charting Tips 347 FORMATTING AXIS PATTERNS 347 FORMATTING THE BORDER OF A LEGEND 349 SELECTING FONTS FOR A CHART 351 USING GRAPHICS TO REPRESENT DATA SERIES 353 USING THE MOUSE TO ADJUST YOUR VIEW OF 3-D GRAPHS 356 CHANGING AXIS TICK MARKS 356 READING VALUES FROM GRAPHS 359 REORDERING THE DISPLAY OF A DATA SERIES 360 ADDING TEXT BOXES TO CHARTS 362 MOVING GROUPS OF DATA LABELS AT ONE TIME 363 LABELING X-Y SCATTER PLOTS 363 Printing Tips 365 SETTING PAGE MARGINS 365 SELECTING A PAPER SOURCE 367 SCALING YOUR PRINTING 369 AUTOMATICALLY PRINTING A RANGE 370 CHANGING ORIENTATIONS WITHIN A SINGLE PRINTOUT 371 PRINTING WORKBOOKS IN A FOLDER 373 PREVENTING PRINTING 373 PRINTING ALL OR NOTHING 374 PRINTING MULTIPLE PAGES ON A PIECE OF PAPER 375 REPEATING ROWS ON A PRINTOUT EXCEPT ON THE LAST PAGE 377 SHOWING FILTER CRITERIA ON A PRINTOUT 377 PRINTING A NUMBER OF DIFFERENT PAGES 379 ExcelTips 2008 Page x
  11. 11. PRINTING AN ENTIRE WORKBOOK BY DEFAULT 380 PRINTING JUST THE VISIBLE DATA 381 HIDING ERRORS ON PRINTOUTS 383 PRINTING ONLY NON-BLANK WORKSHEETS 385 LOCKING THE PRINT AREA 385 PROTECTING PRINT SETTINGS 386 CONDITIONAL PRINTING 387 PRINTING BASED ON CELL CONTENTS 390 Workbook and File Tips 392 INCREASING THE NUMBER OF MRU FILES 392 SAVING ALL OPEN WORKBOOKS 393 SAVING A WORKBOOK WITH A PREVIEW 394 CORRECTLY SAVING DELIMITED FILES 395 SETTING THE AUTORECOVER DIRECTORY 396 DATE LAST EDITED 398 HANGING WHEN OPENING A WORKBOOK 399 FILE FORMATS THAT INCLUDE FIELD FORMATS 400 FIXING "CAN'T FIND FILES" ERRORS 401 LOADING UNWANTED FILES AT STARTUP 401 ACCESSING OLD EXCEL DATA 403 LOCKED FILE PUZZLE 404 DUPLICATE WORKBOOKS OPENING 405 SAVING IN TWO LOCATIONS 406 SHORT-LIVED BOOK1 406 FINDING THE PARENT FOLDER 407 MERGING MANY WORKBOOKS 407 USING YOUR OWN FILE EXTENSIONS 408 GETTING RID OF "COPY OF" 409 AVOIDING SCIENTIFIC NOTATION ON FILE IMPORTS 410 OPENING A WORKBOOK TO A SPECIFIC WORKSHEET 411 AUTOMATICALLY HIDING PERSONAL.XLS 412 LOSING DATA IN A SHARED WORKBOOK 413 PROBLEMS WITH DEFAULT WORKBOOK AND WORKSHEET TEMPLATES 414 IMPORTING HUGE DATA FILES 415 CSV FILE OPENS WITH DATA IN A SINGLE COLUMN 416 IMPORTING MANY FILES INTO EXCEL 418 GETTING INPUT FROM A TEXT FILE 418 Tools Tips 420 SETTING SPELL-CHECKING OPTIONS 420 SPELL-CHECKING UPPERCASE WORDS 422 ADJUSTING SPELL CHECK FOR INTERNET ADDRESSES 424 ExcelTips 2008 Page xi
  12. 12. ALLOWING FOR WORDS THAT CONTAIN NUMBERS 426 WATCHING CELL VALUES 428 IMPORTING CUSTOM LISTS 429 AUTOFILLING FROM A CUSTOM LIST 431 VIEWING COMMENTS 432 USING DATA VALIDATION 434 SETTING DATA VALIDATION INPUT MESSAGES 436 CHANGING AUTOFILTER DROP-DOWN ARROW COLORS 437 USING AUTOCORRECT 438 ADDING AND USING A COMBO BOX 439 INDEPENDENT RADIO BUTTONS 441 FORMATTING COMBO BOX TEXT 442 COMPARING WORKBOOKS 442 Macro Tips 444 UNDERSTANDING VARIABLES IN VBA MACROS 444 UNDERSTANDING SUBROUTINES 445 UNDERSTANDING FUNCTIONS 446 EXITING A FOR ... NEXT LOOP EARLY 447 UNDERSTANDING THE SELECT CASE STRUCTURE 448 DOCUMENTING CHANGES IN VBA CODE 449 STEPPING THROUGH A MACRO WITH A WORKSHEET VISIBLE 449 SELECTING A RANGE OF CELLS RELATIVE TO THE CURRENT CELL 450 SELECTING A CELL IN THE CURRENT ROW 451 JUMPING TO THE START OF THE NEXT DATA ENTRY ROW 452 COMPARING STRINGS 452 DETERMINING IF A NUMBER IS ODD OR EVEN 453 CREATING WORKSHEETS WITH A MACRO 453 REMOVING ALL MACROS 454 WORKING WHILE A MACRO IS RUNNING 456 FORCING A MACRO TO RUN WHEN A WORKSHEET IS RECALCULATED 456 AUTOMATING COPYING MACROS 458 MACRO FAILS AFTER AUTOFILTER 458 DISABLED MACROS 459 SELF-AWARE MACROS 461 COUNTING COLORS OF CELLS 462 COUNTING SHADED CELLS 463 OUT OF MEMORY ERRORS WHEN ACCESSING THE VBA EDITOR 464 DETERMINING HOW MANY WINDOWS ARE OPEN 465 SAVING CHANGES WHEN CLOSING 465 UPGRADING A PERSONAL.XLS WORKBOOK 466 SEARCHING FOR LEADING APOSTROPHES 467 WAITING FOR UPDATE COMPLETION 468 GENERATING UNIQUE NUMBERS FOR WORKSHEETS 469 ExcelTips 2008 Page xii
  13. 13. ExcelTips 2008 Page xiii SAVING A WORKBOOK IN A MACRO 471 PUTTING AN X IN A CLICKED CELL 471 HIDING EXCEL IN VBA 472 DETERMINING A WORKSHEET'S NUMBER 473 RETRIEVING DRIVE STATISTICS 474 DEFAULT WORKSHEET WHEN OPENING 476 SELECTING CELLS OF A SPECIFIC COLOR 477 DETERMINING MOUSE CURSOR COORDINATES ON A GRAPHIC 480 LIMITING SCROLL AREA 481 COUNTING PRECEDENTS AND DEPENDENTS 482 PREPARING DATA FOR IMPORT INTO ACCESS 483 COUNTING COMMAS IN A SELECTION 485 EXTRACTING PROPER WORDS 486 AUTOMATICALLY LOADING ADD-INS 487 SHEETS FOR DAYS 488 SHEETS FOR MONTHS 490 USING BIN2DEC IN A MACRO 491 SELECTING ALL VISIBLE WORKSHEETS IN A MACRO 492 GETTING USER INPUT IN A DIALOG BOX 493 MOUSE CLICK EVENT IN VBA 494 CONVERTING PHONE NUMBERS 494 RETRIEVING WORKSHEET NAMES 496 GETTING A FILE NAME 496 FINDING THE LAST-USED CELL IN A MACRO 497 USING MACROS IN PROTECTED WORKBOOKS 498 ITEM NOT AVAILABLE IN LIBRARY 499 AUTOMATICALLY CHANGING REFERENCES TO VBA LIBRARIES 499
  14. 14. Introduction elcome to ExcelTips 2008. This document and the related files represent a compilation of tips that appeared in the pages of ExcelTips during the year 2008. In this e-book you will find how to make your use of Excel as productive as possible. Best of all, each idea is presented in a bite-sized “tip” that you can apply right away. No more wading through tortuous pages of a computer book or through message after message in some newsgroup—all the information you need is right here, at your fingertips, 24 hours per day. W As any long-time subscriber to ExcelTips knows, some tips are geared for beginners while others can teach veteran Excel users a thing or two. Regardless of your expertise, there is a very good chance that ExcelTips can teach you something you didn’t know before. There are hundreds of tips in this e-book. Each is categorized (see the Table of Contents) and each includes an indicator of the version of Excel to which it applies. For instance, you will see indicators like the following on each tip in this document: Applies to Excel 97, 2000, 2002, 2003, and 2007 This means that the related tip applies to all the popular versions of Excel in use today. What’s In This E-Book? This document (the one you are reading) is the primary portion of ExcelTips 2008. There is another part to it, as well. When you extracted this document, you should have noticed that there was another directory (folder) created on your disk. This folder, named Original, contains the original ExcelTips newsletters, from January 5, 2008 through December 27, 2008. These are in the format originally sent in the newsletter, without any changes. The files are in text format, and can be easily opened with any text editor (such as Notepad). In addition, if you purchased the CD-ROM version of the archives, you’ll find another folder on the CD: Premium. This includes all 52 of the ExcelTips Premium issues published during 2008. These issues are in PDF format, and can be opened with Acrobat Reader. What about Viruses? Let’s face it—we live in a world where there are some sick people. I include in that judgment anyone that releases a program that will harm the data on others’ computers or impair their ability to use their computer in the way they want. Excel includes an amazingly rich macro capability that makes it vulnerable to macro viruses. ExcelTips 2008 Page 1
  15. 15. Introduction For this reason, this document has been distributed as a PDF document. This allows you to read and print the document as desired, using Adobe Reader, but hinders anyone from adding viruses that could harm your computer. (If you purchased the CD-ROM version of ExcelTips 2008, then it contains versions of the archives that will work with Adobe Reader 4, 5, and 7.) As for the contents of the Original folder (as described above), they are nothing but text files— they cannot contain viruses. You’ll notice that the archive also contains a Microsoft Word document. This is nothing but a Word version of the PDF e-book. It contains the same content, and has been examined to make sure that it contains no viruses. (If you get some sort of a message about the file containing macros when you open it, then the file is not the original. The original Word document has no macros attached to it at all.) Need More Tips? Remember that this document contains the tips presented in past issues of ExcelTips. If you want to stay at the top of your Excel form, you should consider subscribing to ExcelTips. All you need is an e-mail account, and you can receive a free weekly dose of tips related to Excel. To subscribe to ExcelTips directly, visit the following Web site: http://excel.tips.net This site includes tips for all the current versions of Excel (97 through 2007). If you are solely interested in tips for Excel 2007, then this site may be of more interest to you: http://excel2007.tips.net ExcelTips is a part of the Tip.Net network. This family of sites is related by a common goal: to make useful information available in bite-sized chunks that are easy to understand. You can find more information at the main Tips.Net site: http://www.tips.net A Special Note of Thanks I would like to thank the many thousands of current ExcelTips subscribers. Without their assistance, many of these tips would not have been possible. Week in and week out I receive e- mail from people needing help, as well as from people willing to offer help. These people selflessly provide assistance to others, submitting solutions to problems that others face. Sharing this Document There was a lot of work that went into putting this document together. I can’t tell you how many countless hours are spent putting together the weekly ExcelTips newsletter from which this information was compiled. That means that this information has value, and your friends, neighbors, and co-workers may recognize that value and want to share it. ExcelTips 2008 Page 2
  16. 16. Introduction ExcelTips 2008 Page 3 The information in this document is copyrighted. Please do not share this information with others—you purchased ExcelTips 2008, and you have a right to use it on your system. Another person who has not purchased this document does not have that right. It is the sales of this valuable information that makes the continued publishing of ExcelTips possible. If enough people disregard that simple economic fact, the newsletter will no longer be viable or available. If your friends think this information is valuable enough to ask you for it, they should think it is valuable enough to purchase on their own. After all, the price is low enough that just about anyone should be able to afford ExcelTips. It should go without saying that you cannot post this document or the information it contains on any electronic bulletin board, Web site, FTP site, newsgroup, or … well, you get the idea. The only place from which this document should be available is the ExcelTips Web site. If you want an original copy, visit the Tips.Net store: http://store.tips.net In addition, it is a violation of copyright to share this e-book with others in your office. Even if you purchased it with company funds, that does not provide the company with the unlimited right to share the e-book with others in the company. If you would like to share the content with others, contact me directly (mailto:allen@sharonparq.com) regarding site licenses for ExcelTips.
  17. 17. General Tips I HATE THE EXCEL 2007 USER INTERFACE Applies to Excel 2007 Excel 2007 was released in early 2007, and it presented a drastically new interface to users. Karen wrote about this interface, expressing the feelings of many that while she likes the new features in the version, she absolutely hates the user interface. She wonders if there is any way she can configure Excel 2007 so that it uses the old menu interface, as was used in Excel 2003. The bottom line is that there is no “easy” way. In fact, the easiest way to not have to put up with the Excel 2007 interface is not stick with Excel 2003. This, of course, becomes less and less of an option as time goes on and more and more people learn the new interface. (Microsoft is showing no signs of backing down on the interface change.) The user interface for Excel 2007 is written in the XML language. Although Microsoft allows users to customize that XML (and thereby modify the interface), they don’t include tools or information on how to make the changes. There are, however, several different add-on tools you can get that allow you to make changes. A good (and free) one is located here: http://pschmid.net/office2007/customize/ If you prefer, you can spring for a commercial one, such as Classic Menu, available here: http://www.addintools.com By the way, if you want to get the complete scoop as to why Microsoft made such a drastic change in the user interface, you’ll want to check out the resources on this Web page: http://pschmid.net/blog/2006/10/09/58 It will take some time to read through all the information at this site, but it is well worth it if you want to understand, exactly, why Microsoft did what they did. (It may not help mitigate the dislike, but you can certainly better understand why the change was made.) ExcelTips 2008 Page 4