You are on page 1of 31

50 essential Excel tips

Get great Excel tips like these sent directly to your inbox!

Would you like to become a Microsoft Excel pro? Weve got the answer with our Excel TechMail. This message is loaded with valuable information that can save you time and effort. elow! youll find a sample of what the Excel TechMail has to offer. "et valuable tips on macros! formulas! formatting workbooks! links to Excel resources! and much more! all delivered straight to your inbox every weekday. est of all! its absolutely free. #ign up for the Excel TechMail today$

E%#& '%T%()*#T+," T* T-E WE *)E, WE )%"E# .+"-T +, E/0E1 *234# 'ETE0T %,' .E)%+. 5#E.(1E6E1 ).E6E,T+*, +# % M%"+0 05.E *)E,+," M51T+)1E W+,'*W# 0.E%T+," 05#T*M 1+#T# 0*)&+," #T&1E# ETWEE, W*.3 **3# % M%0.* T-%T )511# #*5.0E '%T% 7.*M 0-%.T# 5)'%TE 7*. E/0E1 2888 TE/T E/)*.T 0.E%T+," % W*.3#)%0E +, E/0E1 ).+,T+," 7*.M51%# #-+7T+," % #0%TTE. 0-%.T4# %/+# .E0*6E.+," '%T% W+T- T-E #&13 7*.M%T 7%#TE. %00E## T* W*.3#-EET# +,#E.T+," T-E 7511 7+1E )%T- +, -E%'E.# %,' 7**TE.# E/0EE'+," T-E 98(%."5ME,T 1+M+T T-E 1*03#M+T-: 5,1*03+," 1*#T )%##W*.'# *, ).*TE0TE' 7+1E# %#3 M.. E/0E1 0%T0-+," '%T% E,T.& E..*.# ;5+031& #ETT+," % ).+,T %.E% 0*5,T+," T-E '%&# 6+% 0E11 #5 T.%0T+*, ;5+031& #-5771+," T**1 %. 5TT*,# *)E,+," % W*.3 **3 %T #T%.T5) -+'+," '5)1+0%TE .E0*.'# 0*,6E.T+," <51+%, '%TE# #%6+," T+ME W+T- 05#T*M 6+EW# EW%.E *7 #-%.+," '%TE# ETWEE, E/0E1 7*. W+,'*W# %,' E/0E1 7*. M%0# '*,4T 5#E %5T*7*.M%T *, %, E,T+.E W*.3#-EET 3EE) T.%03 *7 0-%,"E# 0*,'+T+*,%1 7*.M%TT+," '%T% E,T.& #*15T+*,# W+T- T-E TEM)1%TE W+=%.' 05#T*M+=+," >'+6+#+*, & 8> E..*. ME##%"E# 'E 5""+," &*5. 0*'E 'E 5""+," 5#+," W%T0-E# E,#5.E ).*)E. '%T% E,T.& W+T- 6%1+'%T+*, -&)E.1+,3 T* % #)E0+7+0 0E11 M%0.* #E05.+T& #ETT+,"# E/).E## &*5.#E17 W+T- 0*MME,T# M%) &*5. '%T%?*, .E%1 M%)# 0.E%TE %, *5T1**3 ME##%"E 7.*M E/0E1 .E)%+.+," .*3E, 7+1E T&)E %##*0+%T+*,# WE )5 1+#-+," W+=%.' E..*. W+T- *77+0E 2888

5#E %5'+T+," T* T.*5 1E#-**T 5#+," "*%1 #EE3 5#+," #-%.E' W*.3 **3# 5#E T-E +MME'+%TE W+,'*W #5MM%.+=E '%T% W+T- ".*5)+," T%3E % 7EW #-*.T05T# %,%1&=+," E/TE.,%1 '%T% +, E/0E1 5#+," )E.#*,%1 M%0.* W*.3 **3#

EASY DATA-POSTING TO THE WEB


+f your organi@ation is using an intranet to share public data?and whose organi@ation isn4t these days?your users will want an easy way to post this information. Excel AB offers an easy! wi@ard(driven system to walk even the most apprehensive users through this process.

C. 2. 9.

#elect the cell range that contains the data to be published. #elect #ave %s -TM1 from the 7ile menu. %nswer the Duestions posed by the +nternet %ssistant Wi@ard.

The wi@ard walks users through four steps that define how information will be converted for Web display. 6arious options include:

+nserting the resulting -TM1 tables into an existing -TM1 page! or creating an entirely new page. #pecifying format options! such as rules between data. #aving your new -TM1 page as a freestanding file or inserting it directly into a 7ront)age Web.

OPEN WEB PAGES RIGHT IN EXCEL


+f you or your users need to analy@e data found on a Web site! you might be in for a bunch of tedious retyping. 5nder the right circumstances! however! Excel AB can save you a lot of time by letting you open an -TM1 page in Excel directly from the Web.

The procedure is Eust a slight modification of the standard file(opening procedure:

C.

0hoose *pen from the 7ile menu.

2. +n the 7ile ,ame text box! type the 5.1 of the Web file you want to open. ,*TE: e sure to include the prefix http:FF. 9. J. +n the 7iles *f Type drop(down menu! select -TM1 'ocuments GH.html! H.htmI. 0lick *pen.

Excel opens -TM1 pages based on the -TM1 table structure of the page! so some Web design treatments may lead to some weird results in Excel. 7or pages that cleanly present data in a table format! however! you4ll find this approach a real time(saver.

O2K'S DETECT AND REPAIR


Microsoft *ffice 2888 programs! including Excel 2888! contain a command line called 'etect %nd .epair! which checks and fixes problems with *ffice program files! '11s! and .egistry settings. GThis utility does not affect worksheets or other document files.I

'etect %nd .epair! which you access as a command(line option of the #etup utility! performs the following actions:

.einstalls *ffice .exe and .dll files if missing! out(of(date! or corrupt .einstalls all Windows +nstaller shortcuts! overwriting any existing shortcuts .ewrites all reDuired local machine registry values .ewrites all reDuired user registry values

&ou can run 'etect %nd .epair from within *ffice! but that won4t do much good if a serious error is preventing your user from even launching an *ffice application. 7ortunately! you can run the utility from the .un dialog box with the following entry:

drive:Ksetup.exe Ffocums install.msi

USER-LEVEL PREVENTION IS A MAGIC CURE


Every support pro knows that most of their problems could be avoided if their users would Eust follow a few simple! commonsense precautions. +f you keep getting calls on corrupted Excel documents! pass around this list of Microsoft(endorsed tips to help users keep their data safe and your days a little less stressful.

Move radios! fax machines! televisions! stereos! speakers! and other sources of electromagnetic radiation away from computers. +f your users are still using floppies! make sure they are not putting them on top of their monitors. .egularly run ,orton %nti6irus or another utility to scan for viruses. #tore floppy disks in a disk storage container. 'on4t be a slob?prevent dust from building up around your computer. %nd! most important! exit Windows before restarting or shutting down a client system.

OPENING MULTIPLE WINDOWS


*ne of the most frustrating problems for Excel users is viewing all the information they need! especially because it often lives in multiple notebooks. 1et your users know about this simple way to view multiple worksheets! and they4ll love you forever.

C. 2. 9.

0lick on the tab of the worksheet you want. 0hoose ,ew Window from the Window menu.

.epeat this process for each of the worksheets you want to display. GExcel opens each sheet in a window that sits on top of the previous one.I

J. L. M. B.

To see them all at one time! choose %rrange from the Window menu. #elect Tiled! -ori@ontal! or 6ertical. #elect the Windows *f %ctive Workbook check box.

0lick *3.

CREATING CUSTOM LISTS


-ere4s another timesaving tip to pass on to your users. +f your users often make use of the same lists of data! you can teach them to create a custom list instead of typing the same information repeatedly.

+f the data you want to copy is already in a worksheet! follow these steps:

C. 2. 9. J. L.

#elect all of the cells containing the information you want to copy. "o to the Tools menu. #elect *ptions. 0lick the 0ustom 1ists tab. 0lick +mport.

+f you want to create a list from scratch! follow these steps:

C. 2. 9. J.

"o to the Tools menu. 0lick 0ustom 1ists. 0lick in the 1ist Entries box. Type each item for your list! hitting NEnterO after each item.

L.

When you4re finished! click *3 to create the list.

To use a custom list! type the first entry of the list. 5se the fill handle at the bottom right corner of the cell to drag the whole list across adEacent cells.

COPYING STYLES BETWEEN WORKBOOKS


0reating formatting styles is a real timesaving trick for users. #o why should they waste time recreating these styles in multiple workbooks? +f they have formatted a workbook in a particularly useful way and want to continue to use the format in other workbooks! teach them how to copy the style from one workbook to another.

C. 2. 9. J. L.

*pen the source workbook and the destination workbook. Making sure that the destination workbook is active! go to the 7ormat menu and choose #tyle. 0lick the Merge button. Within the Merge #tyles dialog box! select the source workbook from the Merge #tyles 7rom list box. 0lick *3.

A MACRO THAT PULLS SOURCE DATA FROM CHARTS


When building charts in Excel! many users reference information in other workbooks to keep spreadsheets fairly streamlined. ut what do you do if a user complains that the data source has become corrupted or that the file is no longer available in the network?

+t4s a little bit of a headache to read! but 3nowledge ase article ;C9B8CM includes the full contents of a macro that can strip important data from the graphic elements of a chart. http:FFsupport.microsoft.comFsupportFkbF%.T+01E#F;C9BF8FCM.asp

%fter creating the simple 6 % macro! you only need to run it and drop the information into a worksheet called 0hart'ata. 'on4t go volunteering this information to all of your

users! but if a 6) loses an important sales spreadsheet! you can pull out this nifty power trick and save the day.

UPDATE FOR EXCEL 2000 TEXT EXPORT


Microsoft has released a patch that fixes a formatting problem when exporting Excel 2888 files to .txt documents. *n machines running a Microsoft *# earlier than Windows 2888! four(digit year entries are automatically truncated to two(digit entries! regardless of formatting applied within Excel.

This behavior occurs only when users employ a macro or procedure to export to a text file! not during manual saves to a text file format. +f your users are using 6isual asic for %pplications to export files to .txt! .prn! .csv! or .dif formats Gand you are not using Windows 2888I! you need to install an update released by Microsoft. 7or more information! read the Microsoft 3nowledge ase article ;2JBBAM! /12888: )rogrammatically Exporting Text 7ile Truncates 'ates. http:FFwww.officeupdate.comF2888Fdownload'etailsFxlAp2pkg.htm http:FFsupport.microsoft.comFsupportFkbFarticlesF;2JBFBFAM.asp

CREATING A WORKSPACE IN EXCEL


*ften! your users will be working with several workbooks at a time. They will be happy to know that they can arrange the workbooks once! save them as a workspace! and then open everything at once in the viewing configuration they prefer. -ere4s how:

C. 2. 9. J.

With all the workbooks in the preferred positions! go to the 7ile menu. 0hoose #ave Workspace. Type a name for the file. 0lick #ave.

The next time they want to work with those workbooks! they can go to 7ile P *pen and select their workspace.

PRINTING FORMULAS
+f your users have invested time in writing numerous formulas! they may want to print them for safekeeping. %lthough Excel doesn4t include a simple >)rint 7ormulas> button! functionality is built in. -ere4s how to find it:

C. 2. 9. J.

"o to the Tools menu. 0lick *ptions. Within the section called Window *ptions on the 6iew tab! select 7ormulas.

0lick *3.

There is also a keyboard shortcut for this function. )ress N0trlONQO.

+n both cases! the result is that the formulas! rather than their results! will appear in the worksheet.

SHIFTING A SCATTER CHART'S AXIS


+n most cases! Excel4s default behavior of making the x(axis and y(axis of scatter charts intersect at 8 is desirable. +n some cases! however! you or your users may want to change that intersection point. %n obvious example is if you4d like to highlight Eust a selected number of years of data but don4t want to create an entirely new chart.

To reset an axis! follow these steps: C. 2. 9. J. %ctivate the chart for editing. 0lick to select the axis you want to modify. 0hoose #elected %xis from the 7ormat menu. #elect the #cale tab.

L. M.

Type a number in the 6alue G/ or &I %xis 0rosses %t text box. 0lick *3.

RECOVERING DATA WITH THE SYLK FORMAT


+f a user complains of being unable to save a workbook! the problem is usually user error. Things do go wrong! however. +f you4ve tried all the commonsense remedies and the worksheet does seem to be corrupted! you can try to revert to the old #ymbolic 1ink G#&13I format.

This approach will let your users recover most of their essential data by stripping away the more complex information that tends to be the source of corruption. 5nfortunately! this trick won4t help them get back any data! including charts and graphics! that wasn4t supported back in the days of Excel 2.8.

7ollow these easy steps in Excel AB: C. 2. 9. J. L. M. B. *pen the file that appears to be corrupted. #elect #ave %s from the 7ile menu. +n the #ave %s Type list! select #&13 G#ymbolic 1inkI. 0lick #ave. 0lick *3 in the warning dialog box that appears when you save in #&13 format. 0lose the file. 0lick ,o to move on past the warning that the file you are closing is not in the normal Microsoft Excel format. G0licking &es will resave the file in the normal Microsoft Excel format.I #elect *pen from the 7ile menu. #elect %ll 7iles GH.HI in the 7iles *f Type drop(down list.

R. A.

C8. #elect the #&13 file you saved in step 9 and click *pen.

CC. #elect #ave %s from the 7ile menu. C2. #elect Microsoft Excel Workbook GH.xlsI in the #ave %s Type drop(down list. C9. 0lick #ave.

7or additional information! check out Microsoft 3nowledge ase article ;JLLLB. http:FFsupport.microsoft.comFsupportFkbF%.T+01E#F;JLFLFLB.asp

FASTER ACCESS TO WORKSHEETS


When working with large workbooks in which all of the worksheet tabs are not visible! your users probably get frustrated with scrolling to find the sheet they need. -ere4s a really Duick tip to pass on. .ight(click on any of the tab(scrolling buttons Gto the left of the sheet tabsI! and a shortcut menu will pop up. &ou can then select the tab you want.

INSERTING THE FULL FILE PATH IN HEADERS AND FOOTERS


Excel AB doesn4t offer you the option of displaying the full file path in worksheet headers and footers. With a little basic 6 % editing! you can add this functionality to users4 systems.

C. 2. 9.

"o to Tools P Macro P 6isual asic Editor. "o to the 6iew menu and select 0ode. Type the following: Sub PathFooter() ActiveSheet.PageSetup LeftFooter=ActiveWorkbook FullName En !ub

J.

"o to 7ile P 0lose.

.eturn to your workbook and save the file. &ou can now run your macro by navigating to Macros and choosing the one named )ath7ooter.

EXCEEDING THE 30-ARGUMENT LIMIT


Excel has a 98(argument limit for statistical functions. +t4s easy to get around! though! if you group some of your arguments within parentheses.

+nstead of entering %6"G%C!%2!%9S!%99I! you can enter %6"GG%C!%2!%9I%JS!%99I! and Excel will accept the grouped arguments as a single argument within the formula.

THE LOCKSMITH: UNLOCKING LOST PASSWORDS ON PROTECTED FILES


Microsoft Word and Excel allow you to password(protect data files. -ere4s how to unlock files with long(lost passwords! as well as files unintentionally or maliciously password( protected. http:FFwww.techrepublic.comFarticle.Ehtml?idTr882CAAA8B2CeEe8M.htm

ASK MR. EXCEL


Excel power users and support pros: 0heck out MrExcel.com. Mr. Excel answers one reader4s Duestion per week! according to what piDues his interest! often including full macros to be copied and put to use.

ecause this is a side proEect for the site4s operator! he can4t answer every Duestion submitted! but he has provided a message board for other Excel users to exchange information. *ther site features include past week4s tips! Duick answers! book reviews! and the opportunity to find out whether you can answer the monthly challenge.

+f you work extensively with Excel and 6isual asic! this may be one of the resources you4ve been looking for$ http:FFwww.mrexcel.com

CATCHING DATA ENTRY ERRORS


+t4s a fact: #hared workbooks generate more errors than workbooks with only one owner. -ere4s one way to flag errors as they occur:

C. 2. 9. J. L. M.

#elect all cells in which data will be entered. "o to 7ormat P 0onditional 7ormatting. +n the 0onditional 7ormatting dialog box! specify which 0ell 6alues to flag. 0lick 7ormat. +n the 7ormat 0ells dialog box! click the )atterns tab and select a color to signal errors. 0lick *3.

,ow! when someone enters an error! the error will be flagged with your selected color.

UICKLY SETTING A PRINT AREA


&our users probably waste a lot of time and paper sending entire worksheets to the printer when all they need is a printout of a few columns or rows. Teach them this Duick trick to set specific print areas within the )rint )review mode.

C. 2. 9. J.

#elect 6iew P )age reak )review. #elect the cells you want to print. .ight(click the selection and choose #et )rint %rea from the shortcut menu. 0lick )rint.

COUNTING THE DAYS VIA CELL SUBTRACTION


y default! Excel AB adEusts the display of dates to friendly displays that users can identify. ut behind the scenes! Excel still thinks in numbers. #o! finding the number of days between two days is as easy as simply subtracting one cell that contains a date!

regardless of format! from another date(carrying cell.

7or example! let4s suppose a user has entered the date 2F28F2888 in cell %C and 9FC8F2888 in cell %2. The formula %2(%C will return the result CA Gremember! this is a leap yearI. ,*TE: &ou must use the dates that fall later in the calendar year as the first argument of the eDuation! or the eDuation will return an error.

y default! Excel will format the result of a formula in the same format as the source cells! so in our example it reports that the difference between 2F28F2888 and 9FC8F2888 is CFCAF2888. -owever! simply right(clicking the formula cell! selecting 7ormat 0ells! and selecting a ,umber format will fix this problem.

UICKLY SHUFFLING TOOLBAR BUTTONS


-ere4s a Duick tip that you can pass on to your users who like to modify their Excel toolbars.

+nstead of right(clicking a toolbar and selecting 0ustomi@e to launch the 0ustomi@e dialog box! users can simply press the N%ltO key and click and drag a button to any toolbar they want. *f course! both the #ource and Target toolbars must be visible for this procedure to be effective.

*ne Duick word of warning: This techniDue moves buttons! so they will no longer be on the default toolbar. +f users want to copy a button to a new toolbar while retaining its position on the original one! they can hold down N0trlON%ltO while clicking and dragging the button.

OPENING A WORKBOOK AT STARTUP


+f some of your users spend much of their day working in a specific workbook! you can teach them how to designate that workbook to open each time Excel launches. %ll they need to do is place the workbook Gor a shortcut to the workbookI in the /1#tart folder. This techniDue also works with network shortcuts.

&ou4ll find the /1#tart folder in the same place as the Excel program files?typically

0:K)rogram 7ilesKMicrosoft *fficeK*ffice. %fter placing the file or shortcut in the /1#tart folder! the user can Eust restart Excel to see the file pop open automatically.

HIDING DUPLICATE RECORDS


*ne of the most common mistakes users make in preparing a report or sorting data is including redundant entries. 7or example! if a worksheet keeps a running tally of purchases made by 0ustomer C! there4s no need to report cells other than the ones keeping the composite figures. % built(in filter in Excel AB will take care of this problem.

7ollow these steps: C. 2. 9. J. 0hoose 'ata P 7ilter P %dvanced 7ilter. +n the %dvanced 7ilter dialog box! drag across the worksheet to select the lists containing duplicate entries. #elect 5niDue .ecords *nly. 0lick *3.

Excel will now hide any duplicate records in the selected range.

CONVERTING !ULIAN DATES


-ere4s a little piece of post(&23 calendar trivia for you. #ince the CAL8s! astronomers and geophysicists have used <ulian dates to track time in continuous! absolute terms! without bothersome seasons! leap years! or man(made conventions. <ulian dates associate a date with the number of days elapsed since <anuary C of the same year. G7or example! <an. 2! 2888! has the value of 2.I

Excel doesn4t have a built(in option to convert dates to <ulian time! but you can use this shortcut to convert today4s date to the <ulian format.

<ust type this eDuation into any cell in your worksheet:

="AL#E($%&'(()EA$((*+A)()),-).(E/(((*+A)()0+A(E()EA$((*+A)())0 1,1-,21),34443))

,ow! you4ll need to format this value to display five digits. C. 2. 9. J. .ight(click the cell that contains the value and select 7ormat 0ells. *n the ,umber tab! choose 0ustom from the 0ategory list box. +n the Type text box! enter 44444. 0lick *3.

SAVING TIME WITH CUSTOM VIEWS


0ustom 6iews is a tool in Excel that lets you assign a name to a particular sheet layout so you can recall it for later viewing. &ou can access it by selecting 6iew P 0ustom 6iews. +n the 0ustom 6iews dialog box! you4ll see a listing of your saved views. &ou can add or delete views. When adding a view! you have the option of including print settings! hidden rows and columns! and filter settings. 0reating a new view even remembers where the active cell was when the view was saved! so when you open that view! it will UEumpU to the exact spot in your book that corresponds to that view.

Making good use of custom views can save a great deal of time. 7or example! you can eliminate repetitive hiding! resi@ing! filtering! and other changes for producing various printed reports. Each set of options can be saved as a view. Then! all you need to do is apply the view before you print.

BEWARE OF SHARING DATES BETWEEN EXCEL FOR WINDOWS AND EXCEL FOR MACS
Excel supports two different data systems: CA88 and CA8J. Early Macintoshes did not support dates before <an. C! CA8J. 7or this reason! Excel for Macs renders entered dates as the number of days since CFCFCA8J. Excel for Windows! on the other hand! supports dates starting <an. C! CA88! and so renders dates as the number of days since CFCFCA88.

7or example! the date CFCFCA8J is represented as a 8 in the CA8J date system. The same

date in the CA88 date system is represented by the number C!JM2. This is because CFCFCA8J is C!JM2 days since CFCFCA88! the day the CA88 date system begins its >counting.>

What all this means to you is that if you have users in both Macs and )0s using Excel and copying data between workbooks! there4s the chance of incorrect date representation.

*ne solution is to set your )0s so that they all use the CA8J date system. Then they4ll be compatible with the Macs. To do so! open a workbook and select Tools P *ptions. 0lick the 0alculation tab. 5nder Workbook *ption! select the CA8J 'ate #ystem check box and click *3! or check out Microsoft4s 3nowledge ase article ;2CJ998! which covers this issue in(depth. http:FFsupport.microsoft.comFsupportFkbFarticlesF;2CJF9F98.asp

DON'T USE AUTOFORMAT ON AN ENTIRE WORKSHEET


Microsoft has confirmed that there4s a potential problem when %uto7ormat is selected for a whole worksheet rather than a specific range.

'epending on your *# and specific configuration! you could see symptoms ranging from Excel not responding to various error messages concerning page faults! low virtual memory! and access violations.

To resolve this issue! make sure you select only the particular range of cells you want formatted when you select 7ormat P %uto7ormat.

7or more information! check out Microsoft 3nowledge ase article ;2CCJBR. http:FFsupport.microsoft.comFsupportFkbFarticlesF;2CCFJFBR.%#)

KEEP TRACK OF CHANGES


Track 0hanges works hand(in(hand with workbook sharing. +t keeps a log of all changes to a workbook. +t tracks cell changes! worksheet additions and deletions! column changes! and other types of changes as well as the date! time! and name of the user who made the change. When data is changed! it keeps a record of the old and new values and the exact sheet and cell where the edit was made.

*ne of the best parts of this tool is the ability to have Excel make a list of the changes in a separate worksheet. When this option is selected! Excel builds a listing of each change and even turns on %uto7ilter to make finding specific changes easy. +t also allows you to review each change and either accept or reEect it. .eEecting a change restores the original value.

To turn on this tool! Eust select Tools P Track 0hanges P -ighlight 0hanges. The -ighlight 0hanges dialog box provides options such as tracking who makes the change! when the change is made! highlighting the change on(screen! and listing the changes.

When using this feature! you might like to see the #ummary sheet when you open your workbook. Excel removes it when you save the sheet! but you can use this macro to have Excel Duickly rebuild it.

#ub 6iew0hange#ummaryGI With %ctiveWorkbook -ighlight0hanges*ptions When:Txl%ll0hanges 1ist0hanges*n,ew#heet T True -ighlight0hanges*n#creen T True End With End #ub

CONDITIONAL FORMATTING
0onditional formatting is one of Excel4s better features. +t allows you to preset certain font styles! colors! and cell(background colors based on cell values. This can be very useful for highlighting important information and values outside an accepted range or providing a visual cue to associate value ranges with color codes.

The best part is that conditional formatting is very easy to set up. <ust click the cells you4d like to format and select 7ormat P 0onditional 7ormatting. The 0onditional 7ormatting dialog box lets you set up the conditions by which the formatting of the cell will occur. &ou pick the operator Gbetween! eDual to! less than! etc.I and the value or range of values. 0lick 7ormat to open the 7ormat 0ells dialog box! where you can select the colors and styles to be used.

Each cell can have several conditional formats. 7or example! you might say that if a certain cell4s value is between 28 and L8! the text should be blue on a yellow background. ut you can format that same cell to exhibit red! bolded text on a green background if it contains a value between LC and C88.

DATA ENTRY SOLUTIONS WITH THE TEMPLATE WI"ARD


*ne of the hardest parts of gathering data from users is creating the right collection application. The data collection front end is often a series of forms in %ccess or %#) pages. -owever! the setup and security issues associated with these methods are sometimes too much to deal with for smaller data collection needs.

Excel 2888 ships with an add(in that can help this situation. The Template Wi@ard with the 'ata Tracking add(in will help you create an Excel template that will accept data from users in a familiar environment and then transfer the data to an %ccess database after it4s saved. The wi@ard will walk you through the steps of defining the tables where the data should be inserted.

This is a great solution for such things as purchase order reDuests! invoices! or expense forms. &our users would enter their data in Excel! and the data structures set up by the Wi@ard would place that data into the %ccess database. The data would be collected into one repository for easy reporting and analysis.

The Wi@ard is easy to follow! but Microsoft 3nowledge ase article ;2CJ2JM explains the process in detail. http:FFsupport.microsoft.comFsupportFkbFarticlesF;2CJF2FJM.%#)

CUSTOMI"ING #DIVISION BY 0# ERROR MESSAGES


When using complex worksheets! you may have encountered that annoying >V'+6F8$> error when the divisor of your formula is a @ero. 5sing the built(in +7 function! you can

create your own message for display when you divide by @ero.

T+7 G'+6+#*. T 8!>&our Text>! '+6+'E'F'+6+#*.I

The +7 function evaluates the first parameter G'+6+#*. T 8I. +f it4s T.5E! then it places the second parameter G>&our Text>I in the cell. +f it4s 7%1#E! it places the third parameter G'+6+'E'F'+6+#*.I in the cell.

This helps you control the message that4s displayed when your formula produces a @ero value that is then used to divide another value.

DEBUGGING YOUR CODE


% great tool for finding errors in your code is the ability to >step> through your code one line at a time. 5sing the #tep +nto button on the 'ebug toolbar in the 6 % Editor! you can execute your code one statement at a time.

To start your macro! Eust click #tep +nto on the toolbar! and it will work through each individual statement. This allows you to take advantage of some of the other debug tools such as the 1ocals and the Watched windows.

While stepping through your code! you can also use the #tep *ut command to run the remaining code as normal. #o even if you stepped through half the macro one statement at a time! you could then run the last half normally by clicking #tep *ut.

DEBUGGING USING WATCHES


&ou4ve Eust spent over an hour writing Eust the right macro. +t4s the one that will make your life easier! and you Eust got it right?or so you thought. ut now it4s providing the wrong data output! and you can4t figure out why. %ll the code looks right.

*ne of the great debug tools in the 6 % Editor is called Watches. Watches allow you to see the values of the variables in your macro at any given time. &ou can use them with

the #tep commands to walk though your code. These values can be a big help in finding out why your macro is generating the wrong data. &ou can use the watches to see your variable values and then compare them to what they would be if your macro were working correctly.

To access the Watch window! Eust click 6iew P Watch Window in the 6 % Editor. To add a watch! right(click a variable and select %dd Watch from the shortcut menu. This brings up a dialog box that gives you options about the new watch.

ENSURE PROPER DATA ENTRY WITH VALIDATION


'ata validation rules in Excel automatically check an entry made by a user against rules you have preset in the worksheet. This is very helpful when you have formulas that depend on certain expected input from the user. These formulas can often return errors if the format of the entered data is wrong.

To set data validation rules! select 'ata P 6alidation. The dialog box allows you to pick a data type to reDuire and then a range of values to accept. *n the +nput Message tab! you can choose to display an instructional message when the cell is selected. This message appears in a pop(up! note(style display. +t can be used to provide users with information about what data you expect them to enter. &ou can also provide a message from the Error %lert tab if the data entered does not meet your rules.

'on4t assume your users will enter the data you expect. +f your worksheet functionality depends upon consistent data entry! then look into using data validation.

HYPERLINK TO A SPECIFIC CELL


'id you know that you can create a hyperlink from a Web page on your intranet or the +nternet to a particular sheet! range! and cell in an Excel workbook? 7or example:

Wa hrefT>http:FFyourwebserverFhyperlinktesting .xlsV#heetC$%C>X1ink Test WFaX

This hyperlink will open your file called -yperlinktesting.xls and then select cell %C on #heetC.

5sing this kind of linking! you can specify exactly where your user will enter the workbook. 5sers4 views of the workbook won4t be bound by the state at the last save.

This can be helpful if you insert the link to a Web page that asks the user to enter data in a particular cell or area of a sheet. &ou can select the cell for them when they click the link.

7or more information on linking to worksheets! see Microsoft 3nowledge ase article ;2CCMA9. http:FFsupport.microsoft.comFsupportFkbFarticlesFD2CCFMFA9.asp

MACRO SECURITY SETTINGS


+f you write macros that other people in your organi@ation use! you should be aware of the Macro #ecurity settings in Excel Gand in all *ffice applicationsI. These settings control the messages you receive when you open a workbook that contains macrosY they ask if it4s *3 to enable the macros.

+n the >good old days!> a developer didn4t have to worry about such things. ut with the advent of macro viruses! you now need to take such user(level security settings into account when developing code.

+n *ffice 2888! there are three levels of security for macros contained inside of files.

C.

-igh: This setting automatically disables any macro not >signed> with a digital signature. +t will only allow macros to be enabled from sources already deemed to be >trusted.>

2.

Medium: With this setting! users are prompted to decide if a macro should be

enabled.

9.

1ow: This setting does not notify users that files contain macros. %ll macros are enabled for opened files.

The security settings on your users4 machines might be dictated by policy or may be up to the user4s discretion. Either way! the safest action for a developer of *ffice(based macros is to obtain a digital signature to sign macros with. With a digitally signed macro! even the -igh setting will enable your code! provided the user approves.

EXPRESS YOURSELF WITH COMMENTS


We4ve all opened the workbook from hell. The formatting was a mess! and there were formulas everywhere. % day later you almost have it decoded enough to work on it.

"et your users into the habit of documenting workbooks with comments. They can enter text descriptions into any cell. These descriptions are only visible if you hover the mouse over the cell. % cell with a comment is marked with a small red triangle in the upper right corner of the cell. &our users can easily add a comment to a cell by clicking +nsert P 0omment.

Excel has a .eviewing toolbar that facilitates working with the comments in a workbook. The options on this toolbar allow users to add and delete comments and move from one comment to another in a workbook.

With the growing use of teams and collaboration! it4s more important than ever to ensure your users4 intentions are clearly communicated to everyone who needs to use a workbook. 0omments are a good way to start.

MAP YOUR DATA$ON REAL MAPS


+f you often analy@e geographically based data in Excel! you should check out Microsoft Map)oint 2888. Map)oint lets you create customi@ed maps! and you can arrange your data on a map to suit your needs. 7or example! Map)oint can show average household income demographic data Gwhich is built into Map)ointI and then show your company

sales data for the same regions. This can help you see trends in how your organi@ation sells across demographic groups. &ou can then save these maps! annotate them! and use them later.

+f your organi@ation tracks anything by region! city! etc.! then take a look at Map)oint. +t4s also a great general(purpose mapping application that will let you create maps for your Windows 0E devices using Microsoft )ocket #treets. http:FFwww.microsoft.comFofficeFmappointF

CREATE AN OUTLOOK MESSAGE FROM EXCEL


The ability to create obEects from other *ffice applications is one of the great things about using 6 %. 7or example! you can use a macro that will create an *utlook message obEect and attach a shortcut to the currently open workbook. There is a button on the toolbar that will perform this same action! which is fine if that4s all you want to do. ut using the sample macro below! you can add other text to the message! pre(address the message! or perform other actions. &ou can also tie the creation of the message to some other user action. 7or example! you could automatically send a message to certain people if the user saves the workbook and if the values of certain cells match criteria you set?all without any user interaction. This sample macro will get you started in the right direction.

#ub 0reate*utlookMailGI 'im ol%pp %s *utlook.%pplication

'im olMailMessage %s *utlook.Mail+tem

4 0reate new instance of *utlook or open current instance. #et ol%pp T ,ew *utlook.%pplication 4 0reate new message. #et olMailMessage T ol%pp.0reate+temGolMail+temI With olMailMessage .#ubEect T >Testing mail by %utomation>

. ody T >This message was created by 6 % code running *utlook through %utomation.> Z [ 0hrGC9I .%ttachments.%dd %pplication.%ctiveWorkbook.)ath [ >K> [ Z %pplication.%ctiveWorkbook.,ame! ol y.eference

.'isplay End With #et olMailMessage T ,othing ol%pp.;uit #et ol%pp T ,othing End #ub

REPAIRING BROKEN FILE TYPE ASSOCIATIONS


-ow many times has one of your users mysteriously lost his or her file associations? -ow many times have you gone to the 7ile Types tab and re(associated Excel Gor Word and )ower)oint for that matterI to the .xls and .xlt file types?

There4s a faster way to fix *ffice file type associations! in one Duick step. 5sing the Fregserver command(line switch will make Excel reregister itself and rewrite all its registry entries! including its file type associations. &ou can reset all your users4 file extensions for Excel! Word! )ower)oint! and %ccess using this same method.

7rom the command line! type 0:K)rogram 7ilesKMicrosoft *fficeK*fficeKExcel.exe Fregserver. &ou can also modify a shortcut to Excel by adding Fregserver after the end Duotes in the Target field of the #hortcut tab on the shortcut4s )roperties sheet.

WEB PUBLISHING WI"ARD ERROR WITH OFFICE 2000


When trying to run the #etup utility after your initial *ffice 2888 setup! you may receive

the following error:

+nsert 'isk The file 40rswpp.dll4 on Web )ublishing Wi@ard disk cannot be found. +nsert Web )ublishing Wi@ard disk in the selected drive! and click *3.

7urther efforts to run #etup will produce similar errors.

Microsoft has identified the problem as being connected to the installation of some modem hardware. ut typically! clicking 0ancel when you receive this error message will prompt #etup to run successfully with no harmful effects.

7or more information about all the causal factors! including a complete description of the problematic modem hardware! and possible resolutions! check out Microsoft 3nowledge ase article ;29JMRR. http:FFsupport.microsoft.comFsupportFkbFarticlesF;29JFMFRR.asp

USE AUDITING TO TROUBLESHOOT


We4ve all clicked a cell to see the formula! wanting to find out where the result came from! only to find a formula that went on forever$ +t has everything: nested functions inside of conditionals! pulling data from cells all over the workbook. <ust when you think you4ll never figure this monster out! you remember Excel4s %uditing features.

#elect the cell containing the complex formula! click Tools P %uditing P Trace )recedents! and Excel will draw blue arrows from every cell the formula references to the cell containing the formula. ,ow you can see where that data is coming from.

%uditing also allows you to select a cell containing a value and choose Trace 'ependants! which will draw arrows from the cell to all the cells containing formulas that reference

that value.

%nd if you have a cell that shows an error value! you can select it and choose Trace Error! and Excel will show you all the cells that contribute to the error.

USING GOAL SEEK


&ou have a worksheet that has the price of a house! closing costs! and interest rate! and it calculates your monthly payment. +t works great! but now you want to be able to enter a desirable payment and find a house price you can afford in order to get that payment.

This is a common situation when dealing with spreadsheets Galthough usually more complex than a simple mortgage formulaI! especially when dealing with proEections or forecasts. "oal #eek is Eust what you need for this situation. +t allows you to specify a target value for a cell and tell Excel to change the value of another related cell in order to obtain this value.

-ighlight the cell you wish to change and click Tools P "oal #eek. The cell reference for the selected cell will appear in the #et 0ell field. 0hoose a target value and enter it in the To 6alue field! then pick which other cell should be changed in order to meet your target. When you click *3! Excel will attempt to meet your target.

USING SHARED WORKBOOKS


+f you have several users who need to work from the same workbook at the same time! familiari@e yourself with Excel4s #hared Workbook feature. This feature can be a lifesaver for workbooks that must be updated by multiple users.

To use this feature! select Tools P #hare Workbook! and Excel will allow multiple users to edit the workbook. &ou can set options that control when changes are updated and how to handle conflicting edits by different users. &ou can choose to save updates when a user clicks #ave! or you can specify a time interval for Excel to automatically save user updates. %lso! in the #hare Workbook dialog box! you can decide how changes should be logged by the Track 0hanges feature! which integrates with workbook sharing. Then you can see exactly what changes were made to cells! when sheets were added or deleted! how conflicting edits were resolved! etc. 5sers can also see the names of all the other users

who have the workbook open for editing.

USE THE IMMEDIATE WINDOW


*ne of the tools provided for you in the 6 % Editor is the +mmediate Window. &ou can use it as a general(purpose scratch pad while testing your code. 7or example! you can place >print> commands at various places in your code to output variable values or the results of calculations to this window. 7or example:

7or 0ount T C to 28 'ebug.)rint 0ount ,ext 0ount

This code prints the numbers C through 28 to the +mmediate Window.

While using the #tep +nto commands to debug your code! you can use the +mmediate Window to check or change variable values or obEect properties to test the results on your running code. &ou can also call other procedures from this window. 7or example:

'ebug.)rint % H C2L

This multiplies the current value of the variable >%> by C2L and prints the results in the window.

%ctivesheet.,ame T >,ew ,ame>

This changes the name of the active sheet.

The +mmediate Window is an excellent way to test the outcome of new values or property changes on your code without inserting the new code into your procedure.

SUMMARI"E DATA WITH GROUPING


"rouping is a feature in Excel AB and 2888 that allows you to create outline structures with your data. 7or example! you have a column of numbers! and at the bottom there4s a cell that contains the sum of these numbers. &ou could Eust leave it at that and have other worksheet users view the entire column every time they open the workbook. *r! you could use "rouping to hide the numbers! showing only the sum! but providing the option of expanding the outline to see the hidden data.

"rouping adds a small column to the left of your data with plus and minus symbols to let you expand or hide the detailed data. To build this outline! select the columns of data that will be hidden in your outline and choose 'ata P "roup %nd *utline P "roup.

Excel will add the expandFcollapse symbol to the left of your data. &our users can now choose whether to see the source data for the calculations or Eust the totals.

&ou can also choose whether the outline should assume the Totals row is above or below the data. %nd you can summari@e rows in the same way! so an outline would expand or collapse across rows instead of columns.

TAKE A FEW SHORTCUTS


Who doesn4t need to save a little time here and there? 3eyboard shortcuts can help you do Eust that. -ere4s a list of shortcuts for Excel that will make life a little easier:

N0trlON#hiftO%: 5se this combination after typing a function name! and it will automatically enter the parentheses and the argument names for the function you typed.

N%ltON7RO: 'isplays the Macro dialog box.

N%ltON7CCO: *pens the 6 % Editor or switches to it if it4s already open. N0trlOC: 'isplays the 7ormat 0ells dialog box. N0trlON#hiftONQO: %pplies the "eneral format. N0trlON#hiftON\O: 7ormats the current cells as 0urrency. N0trlON#hiftONVO: %pplies the 'ate format. N#hiftON7C8O: 'isplays the shortcut menu that applies to where the cursor is located. N7MO: Moves to the next pane in a split worksheet. N#hiftON7MO: Moves to the previous pane. N0trlON7MO: Moves to the next workbook window. N0trlON#hiftON7MO: Moves back to the last workbook window. N79O: *pens a dialog box to paste a ,amed .ange into a formula. N0trlON79O: *pens the 'efine ,ame dialog box. N0trlON#hiftON79O: %utomatically creates ,amed .anges from the headers for the selected table of data with row or column headers. N#hiftON79O: +nserts an eDual sign GTI and opens the )aste 7unction dialog box to help you pick a formula. N%ltONTO: +nserts the %uto#um function. N0trlONYO: +nserts the current date.

ANALY"ING EXTERNAL DATA IN EXCEL


&our users might not know that they can use Excel to analy@e data from the various databases in your organi@ation. They can use the powerful analytical tools of Excel on data they previously only viewed or edited within the database user interface. 5sing these features! they can pull data from your customer database! sales tracking database! product catalog! and -. systems into various sheets in a workbook and perform complex

)ivotTable analysis not possible using the separate applications.

This ability is provided by the use of Microsoft ;uery! an *ffice application that lives >behind> Excel. &ou can access Microsoft ;uery by clicking 'ata P "et External 'ata. &ou4ll find three options: .un Web ;uery! .un 'atabase ;uery! or 0reate ,ew ;uery. The ;uery interface is very similar to the 'esign view of a Duery in %ccess. )oint ;uery at a database! and it will allow you to build complex relational Dueries to get the data you need. .unning the Duery will pull the data returned into your worksheet. ,ow you can build your pivot tables and perform your analysis.

USING PERSONAL MACRO WORKBOOKS


The )ersonal Macro Workbook is the Excel macro cousin to the ,ormal.dot file in Word. +t4s a file that opens with Excel in the background and makes your saved macros available for any open workbook. This workbook is one of the options available when recording new macros in Excel.

We recommend saving all macros that will be used across multiple workbooks into the )ersonal Macro Workbook. This will keep things simpler for your users. +f they try to save a macro into each workbook where it will be used! they4ll have a tough Eob of updating if the macro reDuires a change. +f it4s saved in the )ersonal Workbook! then it will only need to be changed once! and that change will be available across all workbooks. When writing macros in the 6 % Editor! macros should be saved in )ersonal.xls.

.emember to retain this workbook when doing backups. +t can be a valuable file once you begin creating macros that help in your work.

0reated 'ate: C8FCBF288C 1ast .eviewed: C8FCBF288C .ev. 'ate:

This site was last updated