Microsoft and Excel are registered trademarks of Microsoft Corporation in the United States and/or other countries. Microsoft product screenshots reprinted with permission from Microsoft Corporation 101 EXCEL TIPS, TRICKS & TIME SAVERS
ABOUT THIS BOOK As the title suggests this book contains 101 great Excel tricks, tips and time savers. Very few of these are generally found in Excel training manuals since they are obscure, quirky and sometimes ingenious techniques to get Excel to do what you want it to do regardless of whether it was intentionally designed that way! All the tips have been tried and tested. They are simple to use and require no advanced knowledge of Excel. So why not jump straight in and start making life easier for yourself? All the tips work for Excel 2002 (XP) and Excel 2003. The vast majority also work for Excel 2000.
Leigh Drake September 2009
101 EXCEL TIPS, TRICKS & TIME SAVERS
1
CONTENTS NAVIGATION ........................................................................................................ 5 1 SELECT DISTANT WORKSHEETS ........................................................................................................... 5 2 BRING SELECTED CELLS BACK INTO VIEW ........................................................................................... 5 3 SCROLL THROUGH WORKSHEET TABS ................................................................................................. 6 4 SET HOW CURSOR MOVES AFTER ENTERING DATA ............................................................................ 6 5 MOVE TO ANY EDGE OF A DATA LIST .................................................................................................. 7 6 QUICKLY GO TO ANY CELL ................................................................................................................... 7 7 FIND LAST OCCURRANCE OF AN ITEM................................................................................................. 7 8 GO TO FIRST CELL OR LAST USED CELL ON A WORKSHEET ................................................................. 8 DATA MANAGEMENT ........................................................................................... 9 9 SELECT ALL DATA ................................................................................................................................. 9 10 EXTRACT UNIQUE ITEMS FROM A LIST ................................................................................................ 9 11 CREATE YOUR OWN SHORTHAND ..................................................................................................... 10 12 MOVE ROWS AND COLUMNS EFFORTLESSLY .................................................................................... 11 13 CREATE A SERIES OF NUMBERS ......................................................................................................... 11 14 CREATE A CUSTOMISED SERIES ......................................................................................................... 11 15 EMBED FORMULAS WITHIN TEXT...................................................................................................... 12 16 SORT BY MORE THAN 3 LEVELS ......................................................................................................... 13 17 SORT BY COLUMNS ............................................................................................................................ 13 18 SORT IN A CUSTOM ORDER ............................................................................................................... 13 19 QUICKLY ENTER THE ALPHABET ........................................................................................................ 15 20 INSERT LIVE WEB DATA ..................................................................................................................... 16 21 CREATE A DYNAMIC RANGE .............................................................................................................. 18 22 PREVENT DUPLICATE ENTRIES IN A LIST ............................................................................................ 19 23 AN ALTERNATIVE TO THE COMMENT BOX ........................................................................................ 20 24 FIND ALL CELLS MATCHING A DEFINED FORMAT .............................................................................. 21 25 SELECT CELLS USING THE FIND FEATURE .......................................................................................... 22 26 DELETE ALL ERROR CELLS .................................................................................................................. 22 101 EXCEL TIPS, TRICKS & TIME SAVERS
2
27 FILL BLANK CELLS ............................................................................................................................... 23 28 ADD THE FILEPATH TO A WORKSHEET .............................................................................................. 24 29 ADD CURRENT DATE OR TIME TO A WORKSHEET ............................................................................. 24 30 CREATE A STATIC WORKSHEET IMAGE .............................................................................................. 25 31 CREATE A LIVE WORKSHEET IMAGE .................................................................................................. 26 32 PASTING DATA TO IGNORE BLANK CELLS .......................................................................................... 27 33 TRANSPOSE DATA .............................................................................................................................. 27 34 QUICK METHOD TO PASTE AS VALUES .............................................................................................. 28 35 EMBED A MICROSOFT WORD DOCUMENT IN A WORKSHEET .......................................................... 29 36 CREATE REFERENCES TO A RANGE OF CELLS ..................................................................................... 30 37 CONVERT NUMBERS TO TEXT AND TEXT TO NUMBERS ................................................................... 30 38 MAKE A WORKSHEET VERY HIDDEN .................................................................................................. 31 FORMATTING ..................................................................................................... 33 39 INDENT TEXT ...................................................................................................................................... 33 40 SNAP OBJECTS TO GRIDLINES ............................................................................................................ 33 41 CHANGE DEFAULT COLOUR PALETTE ................................................................................................ 34 42 INSERT ALTERNATE BLANK ROWS ..................................................................................................... 35 43 SET A MINIMUM ROW HEIGHT ......................................................................................................... 36 44 RE-FORMAT THE COMMENT BOX ..................................................................................................... 36 45 INSERT POP-UP PICTURE ................................................................................................................... 37 46 FORMAT ALTERNATE BANDED ROWS ............................................................................................... 38 47 QUICKLY ADD BORDERS ..................................................................................................................... 39 48 CREATE CUSTOM NUMBER FORMATS .............................................................................................. 40 49 FORMAT TELEPHONE NUMBERS ....................................................................................................... 41 50 CREATE CUSTOM DATE FORMATS ..................................................................................................... 42 51 FORMAT TIMES TO ADD MORE THAN 24 HOURS ............................................................................. 43 52 MAKE CELL CONTENTS INVISIBLE ...................................................................................................... 44 53 TEMPORARILY UNHIDE ALL ROWS AND COLUMNS .......................................................................... 45 54 CHANGE MULTIPLE WORKSHEETS AT THE SAME TIME ..................................................................... 45 101 EXCEL TIPS, TRICKS & TIME SAVERS
3
55 USE CUSTOM VIEWS .......................................................................................................................... 46 56 VIEW MULTIPLE WORKSHEETS AT THE SAME TIME .......................................................................... 47 57 INSERT MULTIPLE ROWS IN A CELL ................................................................................................... 49 58 CHANGING TEXT CASE ....................................................................................................................... 49 FORMULAS & FUNCTIONS .................................................................................. 50 59 USING THE STATUS BAR .................................................................................................................... 50 60 QUICKLY CREATE MULTIPLE ROW AND COLUMN TOTALS ................................................................ 50 61 TOTAL ALL SUBTOTALS ...................................................................................................................... 51 62 EDIT FORMULAS BY DRAGGING BORDERS ........................................................................................ 52 63 THE VERSATILE SUBTOTAL FUNCTION ............................................................................................... 53 64 ROUND NUMBERS TO A MULTIPLE ................................................................................................... 54 65 SELECT A FORMULAS REFERENCE CELLS .......................................................................................... 54 66 RETURN THE START OR END OF A MONTH ....................................................................................... 55 67 FIND NUMBER OF WORKDAYS BETWEEN 2 DATES ........................................................................... 55 68 EASY WAY TO CHANGE ABSOLUTE AND RELATIVE REFERENCES ...................................................... 56 69 COPY EXACT FORMULAS .................................................................................................................... 56 70 REFERENCE COLUMNS TO ROWS AND ROWS TO COLUMNS ............................................................ 57 71 CALL UP NAMED RANGES ON THE FLY .............................................................................................. 58 72 NAME YOUR CONSTANTS .................................................................................................................. 59 73 NAME YOUR FORMULAS ................................................................................................................... 60 74 PICKING VALUES FROM A TABLE 1 ................................................................................................. 62 75 PICKING VALUES FROM A TABLE 2 ................................................................................................. 63 76 GET A QUICK STRAIGHT LINE FORECAST ........................................................................................... 64 77 KEEP AN EYE ON REMOTE CELLS ....................................................................................................... 65 CHARTS .............................................................................................................. 66 78 QUICKLY UPDATE CHARTS 1 ........................................................................................................... 66 79 QUICKLY UPDATE CHARTS 2 ........................................................................................................... 67 80 CHANGE DATA FROM THE CHART ..................................................................................................... 67 81 APPLY A SEMI-TRANSPARENT FILL ..................................................................................................... 68 101 EXCEL TIPS, TRICKS & TIME SAVERS
4
82 DISPLAYING BLANK DATA .................................................................................................................. 70 83 SAVE FAVOURITE CHART FORMATS .................................................................................................. 71 84 COMBINE 2 CHART TYPES .................................................................................................................. 72 85 COMBINE DIFFERENT FORMATS FOR THE SAME SERIES ................................................................... 73 86 CREATE A MINI BAR CHART IN A CELL 1 ......................................................................................... 74 87 CREATE A MINI BAR CHART IN A CELL 2 ......................................................................................... 75 PRINTING ........................................................................................................... 76 88 QUICKLY SET PAGE BREAKS ............................................................................................................... 76 89 PRINT CELL COMMENTS .................................................................................................................... 77 90 CONTROL HOW ERRORS PRINT ......................................................................................................... 77 91 APPLY SAME PAGE SETUP ACROSS WORKSHEETS............................................................................. 78 DRAWING .......................................................................................................... 79 92 CREATE AN ORGANISATION CHART................................................................................................... 79 93 REFERENCE A CELL FROM A TEXT BOX .............................................................................................. 80 94 USE CONNECTORS TO JOIN OBJECTS ................................................................................................. 81 95 DRAW A PRECISE CIRCLE ................................................................................................................... 81 GENERAL ............................................................................................................ 82 96 CUSTOMISE THE TOOLBAR ................................................................................................................ 82 97 VIEW MORE RECENTLY USED WORKBOOKS ...................................................................................... 83 98 CHANGE DEFAULT FOLDER WHEN OPENING WORKBOOKS .............................................................. 83 99 CLOSE ALL OPEN WORKBOOKS ......................................................................................................... 83 100 OPEN MULTIPLE WORKBOOKS AT ONCE ........................................................................................... 84 101 SHOW FULL MENUS ........................................................................................................................... 84
101 EXCEL TIPS, TRICKS & TIME SAVERS NAVIGATION
5
NAVIGATION These tips help you move around within a workbook quickly and efficiently. Youll be amazed how easily you can get to where you want to go without the frustrations of multiple clicking and scrolling.
NAVIGATION 1 SELECT DISTANT WORKSHEETS For workbooks which contain a large number of worksheets it can take a while to scroll through the many worksheet tabs to find the worksheet you need. Instead: 1 Right click on the arrow buttons on the left of the tabs to reveal a pop-up menu of all the worksheet names 2 Click on the worksheet name you want to select
2 BRING SELECTED CELLS BACK INTO VIEW If youve selected a cell or range of cells and scrolled it out of view simply press CTRL-BACKSPACE to bring it back into view.
2 1 101 EXCEL TIPS, TRICKS & TIME SAVERS NAVIGATION
6
3 SCROLL THROUGH WORKSHEET TABS To quickly scroll through worksheet tabs hold the SHIFT key while clicking on either the left or right scroll arrows on the left of the worksheet tabs. This will scroll the width of visible tabs each time.
4 SET HOW CURSOR MOVES AFTER ENTERING DATA By default, each time you select a cell and press ENTER, Excel automatically selects the cell below. To change this: 1 Select Tools | Options from the Menu Bar 2 Select the Edit tab 3 Either: Tick Move selection after Enter and select the direction to move after pressing ENTER If you dont want to move the active cell after pressing ENTER simply un-tick the Move selection after Enter box 4 3 101 EXCEL TIPS, TRICKS & TIME SAVERS NAVIGATION
7
5 MOVE TO ANY EDGE OF A DATA LIST Here are 2 methods to instantly move to the edge of your data, one for the keyboard and one for the mouse. From within your range of data: Hold CTRL and press the direction arrow for the direction you wish to move Double-click the heavy black border of the selected cell. Which border you click determines the edge you move to
6 QUICKLY GO TO ANY CELL If you know the address of the cell you want to go to just type it into the Name Box and press ENTER, e.g. to quickly go to cell C10, type C10 in the Name Box.
7 FIND LAST OCCURRANCE OF AN ITEM To find the last occurrance of an item in a worksheet: 1 Select Edit | Find from the Menu Bar or press CTRL-F 2 Type the item you are looking for in the Find what field 3 The secret is to hold SHIFT and click Find next
5 6 Cell address entered in the Name Box 7 101 EXCEL TIPS, TRICKS & TIME SAVERS NAVIGATION
8
8 GO TO FIRST CELL OR LAST USED CELL ON A WORKSHEET Press CTRL-HOME to move to cell A1 Press CTRL-END to move to the last used cell on your worksheet Sometimes however, pressing CTRL-END to move to the last used cell in a worksheet takes you beyond where you expect. This is because Excel remembers all the cells ever used in that worksheet, even though you may have deleted these cells. To reset the last used cell as it currently appears in your worksheet: 1 Select Tools | Macro | Macros from the Menu Bar 2 The Macro dialog box appears. In the Macro name field type a short name without spaces e.g. LastCell
3 Select Create. This takes you to the Visual Basic Editor 4 In the main window, type ActiveSheet.UsedRange between Sub and End Sub(Excel will put the capital letters in for you)
5 Press the play button on the Toolbar 6 Close the Visual Basic Editor using File | Close and Return to Microsoft Excel
8 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
9
DATA MANAGEMENT These tips help you to more easily input, select, re- order and remove data. Tasks you may have found time consuming can often be done within a matter of seconds using a few simple techniques.
DATA MANAGEMENT 9 SELECT ALL DATA A great keyboard shortcut to select all (contiguous) data in your worksheet: 1 Select any cell within the data 2 Press either CTRL-A or CTRL- (note that if using a laptop the is placed above the 8 so you will need to press CTRL-SHIFT-)
10 EXTRACT UNIQUE ITEMS FROM A LIST This tip can be a real time saver if you have a long list of items from which you need to extract only one instance of each. 1 Select Data | Filter | Advanced Filter from the Menu Bar 2 In the Advanced Filter dialog box select Copy to another location 3 Click into the List range field and highlight the column of cells containing the items required (you can select the whole column if you wish) 4 Click into the Copy to field and select a cell on the same worksheet where you want to start the unique list 5 Tick Unique records only
6 Click OK A unique list of items is copied to your worksheet. If necessary you can cut and paste it elsewhere. 9 10 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
10
11 CREATE YOUR OWN SHORTHAND Do you find it frustrating having to repeatedly type in long text items, e.g. company names, staff names, headings etc? If so, you can create your own abbreviations and Excel will automatically convert them to their longhand equivalent. 1 Select Tools | Options from the Menu Bar 2 Choose the Spelling tab 3 Click AutoCorrect Options 4 In the Replace field enter your abbreviation e.g. ABC 5 In the With field enter the longhand equivalent e.g. ABC Manufacturing Company Limited
6 Click Add 7 Click OK twice Now whenever you type ABC into a cell, Excel will convert it to ABC Manufacturing Company Limited. Be careful when choosing an abbreviation. If you often type ABC and want it to show as ABC without converting to a longhand equivalent you might want to choose a more unique shorthand abbreviation of say ABC#. Note: Abbreviations are case sensitive. Abbreviations you create are stored on your computer, not with the workbook you have active at the time. This means that they are only available to Excel workbooks opened on the same computer. 11 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
11
12 MOVE ROWS AND COLUMNS EFFORTLESSLY To easily swap the order of rows and columns on your worksheet: 1 Select the whole row or column by clicking on the row number or column letter 2 Hold the SHIFT key 3 Click on any of the heavy black borders around the selected rows or columns and drag to a new location You can move multiple rows and columns at the same time.
13 CREATE A SERIES OF NUMBERS To create a series of numbers incrementing by one: 1 Enter the starting number 2 Hold CTRL while dragging the cell fill handle down or to the right (the cell fill handle is the small square in the bottom right corner of the selected cell) To decrement by one simply drag up or to the left
14 CREATE A CUSTOMISED SERIES If you want more control when creating a series of numbers or dates use the right mouse button to drag and fill from the starting cell. When released, you will see a pop-up menu with a range of options.
For dates you have the option of filling in increments of days, weekdays, months or years. For more control select the Series option. These reveals the Series dialog box which gives you many more options for both numbers and dates. The example below will complete a series of dates incrementing by quarters and ending on 31 December 2010. 12 14 13 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
12
15 EMBED FORMULAS WITHIN TEXT When creating reports in Excel you may find yourself having to combine text and values, e.g. Sales for the month increased by 5% to $685,000. If the figures of 5% and $685,000 are likely to change there is no need to keep re-typing this statement. Assume these figures are calculated elsewhere on the same worksheet in cells C5 and C6 respectively. The statement can be generated by the formula: =Sales for the month increased by &TEXT(C5,0%)& to &TEXT(C6,$#,##0) The components of this formula are: = A formula always needs to start with an = sign Sales for... The text part of the formula is set within double quotes (dont forget to insert spaces at the start and end of the text where required) & In formulas the ampersand is a concatenation operator which joins 2 values or text strings together TEXT(...) The TEXT(...) function is used to format the values in C5 and C6. The cell reference comes first, followed by the format code in double quotes. You could forego this function and just type the cell reference C5 or C6 but the values would be unformatted, appearing as ...increased by 0.05 to 685000. To understand the format codes used see tip 48 and Appendix 2.
Whenever the values in cells C5 and C6 change, the statement will automatically change.
15 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
13
16 SORT BY MORE THAN 3 LEVELS If youre familiar with the sort function you will know that it only allows you to sort by 3 levels e.g. by country, then state, then region. However if you need to sort by more than 3 levels e.g. by country, then state, then region, then city, then suburb, then street: 1 Select any single cell in the data 2 Sort by the lowest 3 levels first; city, then suburb, then street 3 Then sort by the higher levels; country, then state, then region You will find that the order of the lowest levels is preserved. In this example it effectively sorts by 6 levels.
17 SORT BY COLUMNS Occasionally you may need to sort by columns rather than rows. To do this: 1 Select any single cell in the data 2 Select Data | Sort from the Menu Bar 3 Click Options in the Sort dialog box 4 Choose Sort left to right 5 Click OK 6 In the Sort by field choose the row number to sort by (this defaults to the first row in the data range selected) 7 Click OK
18 SORT IN A CUSTOM ORDER If you need to sort in non-alphabetical order e.g. NSW, VIC, QLD, SA, WA, TAS, NT, ACT you first have to set up a Custom List in the order you want to sort by. 1 Select Tools | Options from the Menu Bar 2 Choose the Custom Lists tab 3 If your list already exists in a worksheet: Click the Minimise icon next to the Import list from cells field Highlight the list Click the Maximise icon Click Import Otherwise type the list into the List entries window, pressing ENTER after each item 4 Click OK 18 17 16 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
14
Now you can use this list to sort: 1 Select Data | Sort from the Menu Bar 2 In the Sort by field select the column to sort by 3 Click Options 4 Click the drop-down arrow in the First key sort order field. This reveals a list of all the Custom Lists you have created (some are Excel default lists which cant be changed or deleted) 5 Choose the list you require
6 Click OK twice Your data is now sorted in Custom List order. Note: Custom Lists you create are stored on your computer, not with the workbook you have active at the time. This means that they are only available to Excel workbooks opened on the same computer. 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
15
19 QUICKLY ENTER THE ALPHABET To quickly enter the alphabet into your worksheet you can use the CHAR(...) function. The value required in the parentheses represents something called the ASCII code e.g. =CHAR(65) represents the letter A, =CHAR(66) represents the letter B etc., through to CHAR(90) for the letter Z. Obviously, typing all these functions into 26 different cells would be much slower than just typing in the letters themselves so a trick is used with another Excel function to make this much faster. The ROW(...) function returns the row number of whichever cell is referenced in the parentheses e.g. =ROW(D16) returns the value 16. However, if no cell is referenced i.e. =ROW() the value returned defaults to whichever row the function is entered in. Therefore the formula =CHAR(ROW()) entered into any cell in row 65 would return the value A. Drag and fill this down to row 90 to complete the alphabet. If you want to start from a cell in row 1 this can be modified to either =CHAR(ROW()+64) or =CHAR(ROW(A65)) (you can use any cell address in row 65) For a very quick and easy way to lock in the results of formulas see tip 34. Note: For a lower case alphabet use ASCII codes 97 to 122.
19 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
16
20 INSERT LIVE WEB DATA Excel makes it very easy to import live data from the web. As an example assume that you have data containing formulas which need to reference up to date foreign exchange rates. 1 Select Data | Import External Data | New Web Query from the Menu Bar. This opens up your default internet browser inside a New Web Query window 2 Navigate to the web site from which you want to import data, in this example the foreign exchange spot rates on www.ozforex.com.au
3 As this is a web query the page is divided into sections marked with . Click on this icon adjacent to the section you want to import and it will change to 4 Click Import 5 Select the worksheet cell where you want to place the imported data 6 Click OK. Depending on the speed of your internet connection and the quantity of data selected this may take a few moments to import. Once complete you will notice that the imported data is correctly laid out in your spreadsheet with individual values in separate cells.
20 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
17
As it stands, this data is static. If the web page updates regularly and you want your imported data to automatically update as well: 7 Right click anywhere within the imported data 8 Choose Data Range Properties from the pop-up menu 9 Tick Refresh every and select how often you want to refresh the data and/or tick Refresh data on file open
Note: If using formulas to reference this imported data, leave plenty of space around the data. Sometimes the imported data places blank cells around its edge. Any formulas you write in these cells will be deleted when the data refreshes.
101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
18
21 CREATE A DYNAMIC RANGE Many Excel features and formulas reference ranges of data e.g. pivot tables and LOOKUP functions. When you add new data to these ranges the feature or formula has to be re-written to include this new data. To avoid this you can set up something called a dynamic range. This is a range which grows automatically as data is added. 1 Highlight the range referenced by your formula (or feature) 2 Select Data | List | Create List from the Menu Bar 3 A Create List dialog box appears asking you to confirm your selection. Click OK Notice that Excel has placed a thick blue border around the data and inserted an Autofilter. As you add new data to adjacent blank rows below (starting at the symbol) or adjacent blank columns to the right, the blue border stretches to accommodate it. The trick now is to give this range a name: 4 Highlight the range enclosed by the blue border 5 In the Name Box type an appropriate name (do not use spaces and do not start the name with a number) 6 Press ENTER (if you TAB out of the Name Box the name will not save)
When creating your formula, or when prompted to enter a range, type in the name of the range instead of the cell references. For a quick method of inserting a range name see tip 71. Now, as new data is added to the range, any feature or formula which references that range will automatically update (you will still need to manually refresh pivot tables as normal).
Range name SalesData entered in the Name Box 21 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
19
22 PREVENT DUPLICATE ENTRIES IN A LIST Here is a technique to ensure that an item cannot be entered in a list if it already appears. A feature called Data Validation is used which prevents users from entering data which doesnt meet certain criteria. 1 Select the column in which you want to prevent duplicate entries 2 Select Data | Validation from the Menu Bar 3 In the Allow field select Custom from the drop-down list 4 In the Formula field, if column A is your selected column, type the formula =COUNTIF(A:A,A1)=1 Instead of typing A:A and A1 you can simply select column A, type a comma and then select cell A1. Also, you do not need to type in upper case, Excel will correct this for you. 5 Click OK COUNTIF(A:A,A1) looks in column A (denoted by A:A) and returns the number of instances of the value in cell A1. If there is only one instance this formula is true. Otherwise this formula is false (i.e. when the same value appears elsewhere in column A). When false, Data Validation shows an error message which prevents you from entering the same value again. Excel will automatically change this formula so that e.g. in cell A2 it becomes: =COUNTIF(A:A,A2)=1 To refine this further you can write your own Data Validation error message which will pop up when you try and enter the same value as appears elsewhere in column A. 1 Select Data | Validation from the Menu Bar 2 Choose the Error Alert tab 3 Type a heading and a message in the Title and Error message fields respectively 4 Click OK
22 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
20
23 AN ALTERNATIVE TO THE COMMENT BOX You may be familiar with the Comment box which can be attached to a cell to provide more information (right click a cell and select Insert Comment). An alternative to the Comment box can be created as follows: 1 Highlight the cell or cells to which the comment applies 2 Select Data | Validation from the Menu bar 3 Select the Input Message tab 4 Type an optional heading for the comment in the Title field 5 Type the comment in the Input message field 6 Ensure Show input message when cell is selected is ticked 7 Click OK The differences between the 2 methods are: Input message Comment box Shows when cell is selected Shows when cursor rolls over cell Can be applied to multiple cells at once Can only apply to a single cell at once. Then Copy and Paste Special as Comments to apply to other cells Cannot be reformatted Can be reformatted Does not have an arrow pointing to the cell (some might consider this neater) Has an arrow pointing to the cell
23 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
21
24 FIND ALL CELLS MATCHING A DEFINED FORMAT The Find feature is more versatile than it may seem. Not only can it find all instances of a certain item but it can also find all instances of a certain cell format. 1 To search within: A range of cells, highlight the range A whole worksheet, select any single cell A whole workbook, select any single cell and group the worksheets (right click any worksheet tab and choose Select All Sheets remember to right click and choose Ungroup Sheets when you are finished) 2 Select Edit | Find from the Menu Bar or press CTRL-F 3 Click Options 4 Click Format. This reveals the familiar Format Cells dialog box from which you can select the formats you want to find. Alternatively, click Choose Format From Cell and select the cell which has the required format 5 Click Find All or Find Next Once you have finished your search, remember to turn off the set format. 1 In the Find and Replace dialog box click the drop-down arrow next to Format 2 Select Clear Find Format
3 Click Close
Previewed format to be cleared 24 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
22
25 SELECT CELLS USING THE FIND FEATURE Find is a great feature for selecting all instances of your search one cell at a time. However there is a cool trick which enables you to select all instances of your search at once. This can be very useful if you need to delete, edit or reformat these cells since you can do it in one go. 1 Select Edit | Find from the Menu Bar or press CTRL-F 2 Type the value you are searching in the Find what field 3 Click Find All The lower part of the Find and Replace dialog box shows the cell addresses for all instances of your search value. With any one of these cell addresses highlighted press CTRL-A and all these cells are selected on the worksheet.
26 DELETE ALL ERROR CELLS If you need to quickly delete all cell contents which result in an error: 1 To select: A range of cells, highlight the range A whole worksheet, select any single cell 2 Select Edit | Go To from the Menu Bar or press F5 or CTRL-G 3 Click Special 4 In the Go To Special dialog box which appears, select Formulas and underneath that ensure that only Errors remains ticked 5 Click OK to select all cells giving an error result 6 Press DELETE if you want to delete them or perhaps format them with a white font so they are no longer visible 43 instances of the search result for Sydney now selected on the worksheet 25 26 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
23
27 FILL BLANK CELLS Sometimes you may come across a worksheet with data laid out as below. Blank cells have been left where normally you would expect the data immediately above to be repeated.
As it is, this layout makes it impossible to e.g. sort, filter, create pivot tables etc. If you need to fill these blank cells with the appropriate values: 1 Highlight the range of cells affected. In the above illustration this might be A2:B100 2 Select Edit | Go To from the Menu Bar or press F5 or CTRL-G 3 Click Special 4 In the Go To Special dialog box which appears, select Blanks 5 Click OK 6 Type = and press the up arrow on the keyboard. This inserts a formula referencing the cell immediately above the active cell 7 The trick now is to press CTRL-ENTER. This enters the formula above into all the selected blank cells Remove the formulas to leave only the values by using Copy and Paste Special as Values (see tip 34 for a quick way to do this).
27 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
24
This results in a more usable format as below:
28 ADD THE FILEPATH TO A WORKSHEET To add the filepath of the active workbook to your worksheet type the following formula exactly as it appears here into a cell: =CELL(filename) This will enter the full path from the drive letter through to the worksheet, e.g.: C:\Documents and Settings\My Documents\Sales\[Sales Data.xls]August
29 ADD CURRENT DATE OR TIME TO A WORKSHEET To add a date stamp to your worksheet press CTRL-; To add a time stamp to your worksheet press CTRL-: To add a dynamic date to your worksheet type the function =TODAY() This is one of the few Excel functions that doesnt require anything between the parentheses. The parentheses are only there to identify it as a built in function. To add a dynamic date and time to your worksheet type the function =NOW() Again, nothing is required between the parentheses.
29 28 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
25
30 CREATE A STATIC WORKSHEET IMAGE Data entered into a worksheet is obviously confined to the grid of cells. However, objects such as charts, drawings, images and text boxes float freely above the grid. This tip shows you how to convert a range of cells to an object so you can place it anywhere on your worksheet. This can be particularly useful where e.g. you need to print different parts of a workbook on the same page or you need to have several tables adjacent to each other but they all have different column widths and row heights.
1 Set up your data in separate areas of your worksheet or on separate worksheets so that you can set appropriate column widths and row heights without affecting any other data 2 Highlight the first data range 3 Select Edit | Copy from the Menu Bar or press CTRL-C 4 Select a cell on a clean worksheet 5 Press SHIFT while selecting Edit | Paste Picture from the Menu Bar. Notice that the Paste Picture option is only available while holding SHIFT 6 Repeat this process for other data ranges These ranges are now copied as images which you can slide around freely on the worksheet. If you want to change the data you will need to delete these images and start again, but see tip 31.
Inappropriate column width Inappropriate row height 30 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
26
To tidy up the final layout you may want to either: Turn of the gridline view 1 Select Tools | Options from the Menu Bar 2 Choose the View tab 3 Un-tick Gridlines 4 Click OK Make the images opaque to hide the underlying gridlines: 1 Right click the image 2 Select Format Picture from the pop-up menu 3 Choose the Colors and Lines tab 4 Select a white fill colour from the Color drop-down menu 5 Click OK
31 CREATE A LIVE WORKSHEET IMAGE Tip 30 shows how to create a static image of a range of data in your worksheets. If this data is likely to change you may want to create a live image. Whenever you make changes to the data the image will automatically update too. This is a bit like having a live camera on your data. 1 Set up your data in separate areas of your worksheet or on separate worksheets so that you can set appropriate column widths and row heights without affecting any other data 2 Highlight the first data range 3 Select Edit | Copy from the Menu Bar or press CTRL-C 4 Select a cell on a clean worksheet 5 Press SHIFT while selecting Edit | Paste Picture Link from the Menu Bar 6 Repeat this process for other data ranges Data images allow row heights and column widths to be independent of grid 31 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
27
32 PASTING DATA TO IGNORE BLANK CELLS Normally when you copy a range containing blank cells over the top of another range, the blank cells are copied as well.
To avoid this: 1 Highlight the range to copy, including the blank cells 2 Select Edit | Copy from the Menu Bar or press CTRL-C 3 Highlight the first cell of the range to copy to 4 Select Edit | Paste Special from the Menu Bar 5 Tick Skip blanks 6 Click OK None of the blank cells will be copied.
33 TRANSPOSE DATA To convert a range of data so that rows become columns and columns become rows: 1 Highlight the range of cells to convert 2 Select Edit | Copy from the Menu Bar or press CTRL-C 3 Highlight the first cell of the range to copy to 4 Select Edit | Paste Special from the Menu Bar 5 Tick Transpose 6 Click OK Copy only non-blank cells from the Amended column over those in the Sales Units column 33 32 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
28
34 QUICK METHOD TO PASTE AS VALUES A great but obscure time-saver to quickly convert formulas to their values using Paste Special as Values: 1 Highlight the data to be pasted as values 2 Grab any of the ranges black borders with the right mouse button 3 Drag in any direction and drag back to its original position 4 Release the right mouse button to reveal a pop-up menu 5 Select Copy Here as Values Only
34 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
29
35 EMBED A MICROSOFT WORD DOCUMENT IN A WORKSHEET Excel is not intended as a text writing application. However there may be occasions when you need to add text to a worksheet to complement the data. To give you more control over the formatting of the text e.g. bullet points, line spacing etc. you can embed a Microsoft Word document. 1 Create and format your text in Microsoft Word 2 Highlight the required text and select Edit | Copy from the Word Menu Bar 3 Switch to your Excel workbook (use ALT-TAB or select it from the Task Bar at the bottom of your screen) 4 Select the cell to copy to 5 Select Edit | Paste Special from the Menu Bar 6 Choose Microsoft Word Document Object 7 Click OK The fully formatted text appears as a floating object on the worksheet which you can move independently of the grid by clicking and dragging its border. To edit the text simply double-click inside the object. Notice how the Excel Menu Bar and Toolbars change to a Word Menu Bar and Toolbars. You are effectively editing in Word from within Excel!
Editing a Word document within Excel 35 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
30
36 CREATE REFERENCES TO A RANGE OF CELLS To easily create references to a range of cells: 1 Highlight the range to create the references to 2 Select Edit | Copy from the Menu Bar or press CTRL-C 3 Highlight the first cell of the range to copy to 4 Select Edit | Paste Special from the Menu Bar 5 Click Paste Link
37 CONVERT NUMBERS TO TEXT AND TEXT TO NUMBERS Sometimes numbers can be formatted as text, particularly when data is imported from another application such as a database. This will prevent the numbers from being used in formulas and they may also sort in the wrong order. To convert them back to a usable number format: 1 Highlight the column containing the numbers which are formatted as text 2 Select Data | Text to Columns from the Menu Bar 3 Click Finish 4 Choose the required number format as normal
Cell references created with Paste Link (shown here as the underlying formula) 36 37 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
31
To convert numbers back to text: 1 Highlight the column containing the numbers which are formatted as text 2 Select Data | Text to Columns from the Menu Bar 3 Click Next twice
4 Select Text 5 Click Finish
38 MAKE A WORKSHEET VERY HIDDEN When you hide a worksheet (choose the worksheet and select Format | Sheet | Hide from the Menu Bar) anyone can then unhide it by selecting Format | Sheet | Unhide from the Menu Bar and choosing the worksheet to unhide. To make a worksheet more invisible so that it no longer appears in the list of hidden worksheets: 1 Right click the worksheet tab for the worksheet to be hidden and select View Code from the pop-up menu. This opens something called the Visual Basic Editor 2 In the window titled Properties click in the field which says -1 xlSheetVisible. If you dont see the Properties window press F4 3 Use the adjacent drop-down arrow which appears to select 2 xlSheetVeryHidden
38 101 EXCEL TIPS, TRICKS & TIME SAVERS DATA MANAGEMENT
32
4 Select File | Close and Return to Microsoft Excel from the Menu Bar to close the Visual Basic Editor To reveal the worksheet after it has been very hidden: 1 Right click any visible worksheet tab and select View Code from the pop-up menu 2 In the window titled Project select the worksheet to be unhidden. If you dont see the Project window press CTRL-R
3 In the Properties window change 2 xlSheetVeryHidden to -1 xlSheetVisible 4 Select File | Close and Return to Microsoft Excel from the Menu Bar to close the Visual Basic Editor
Select the worksheet in the Project window 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
33
FORMATTING These tips help you to really take charge of how your data appears to help make it more informative, more attractive and easier to read. With formatting, the underlying values or formulas in your cells remain unaffected.
FORMATTING 39 INDENT TEXT To indent text within a cell you may be tempted to type preceding spaces. Why not use the Indent feature instead? 1 Highlight the cells containing the text to indent 2 Select Format | Cells from the Menu Bar 3 Choose the Alignment tab 4 Use the up and down arrows on the Indent field to increase or decrease the indent size 5 Click OK
40 SNAP OBJECTS TO GRIDLINES Excel objects include such things as charts, text boxes and drawn objects. These examples of objects float freely over the top of the cell gridlines just click a border and drag. If you want extra precision in lining these up you can snap them to the nearest gridline border by holding ALT as you start dragging the object.
40 39 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
34
41 CHANGE DEFAULT COLOUR PALETTE The default Excel colour palette may not be to everyones taste and doesnt always lend itself to creating attractive charts and reports. You can create your own colour palette by modifying the default palette: 1 Select Tools | Options from the Menu Bar 2 Choose the Color tab 3 Select the colour square you want to change and click Modify 4 Select either: The Standard tab and click from any of the broader range of colours The Custom tab for more control. This allows you to enter an RGB colour giving over 16 million colour choices. Simply enter a number between 0 and 255 in the Red, Green and Blue fields 5 Click OK
Appendix 1 suggests a new RGB colour palette. Note: The colour palette is saved only with the workbook. To use this palette in other workbooks: 1 Open the workbook containing your colour palette 2 From the workbook you want to copy to, select Tools | Options from the Menu Bar 3 Choose the Color tab 4 In the Copy colors from drop-down list select the workbook containing your colour palette 5 Click OK
Standard and Custom options for changing the colour palette 41 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
35
You can also save the workbook which contains your colour palette as a template: 1 Select File | Save As from the Menu Bar 2 In the Save as type drop-down list select Template Open this template whenever you need to create a new workbook using File | New from the Menu Bar. Then navigate to the template via the On my computer option in the Task Pane which appears.
42 INSERT ALTERNATE BLANK ROWS To quickly insert alternate blank rows into your data: 1 In the first row of data in the first unused column to the right type 1 2 Press CTRL and drag this cell to the end of your data to create an incrementing series of numbers (see tip 13) 3 Copy the whole series immediately below itself 4 Highlight the whole data set including the column and rows containing both number series 5 Select Data | Sort from the Menu Bar 6 Select the column containing the number series in the Sort by drop-dow list 7 Click OK To tidy this up you may then want to clear or delete the column containing the number series.
42 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
36
43 SET A MINIMUM ROW HEIGHT For some layouts and reports you may want to set a minimum row height to maintain spacing between data. While there is no specific feature in Excel to do this, there is a very simple workaround. 1 Select a column well to the right of any you might enter data into 2 Increase the font size until the row heights expand to the desired minimum Note that you dont need to enter anything in this column for this to work. Now when you enter data, the row heights can expand (e.g. if you have wrapped text or use a larger font) but they will not reduce below the minimum unless you manually change the height.
44 RE-FORMAT THE COMMENT BOX You may be familiar with the default format of the Comment box; a pale yellow box with a black border (to see this right click a cell and select Insert Comment). While it is not possible to save a new default format (except using a Windows setting which affects other items), you can reformat individual Comment boxes and then copy that Comment to other cells as required. 1 Right click the cell with the Comment and select Edit Comment from the pop-up menu 2 Click the border of the Comment box to show a border of fine dots
3 Right click the border and select Format Comment from the pop-up menu 4 From the Format Comment dialog box choose from the options available including colours, borders and text alignment 5 Click OK To copy this reformatted Comment to other cells: 1 Select the cell with the Comment attached 2 Select Edit | Copy from the Menu Bar or press CTRL-C 3 Select the new cell or cells 4 Select Edit | Paste Special from the Menu Bar 5 Choose Comments 6 Click OK 43 44 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
37
45 INSERT POP-UP PICTURE The Comment box can be used to insert pictures which pop-up when the cursor rolls over a cell. This could be useful e.g. to show images of products as you roll over the product name. 1 Right click the cell and select Insert Comment from the pop-up menu 2 Highlight any text which appears in the Comment box and delete it using the DELETE key 3 Double click the border of the Comment box to show the Format Comment dialog box 4 Select the Colors and Lines tab 5 Click the Fill Color drop-down arrow and choose Fill Effects 6 Select the Picture tab from the Fill Effects dialog box 7 Click Select Picture and browse to the required image 8 Select the image and click Insert 9 Click OK twice The Comment box now becomes a picture. You may need to resize the Comment box by dragging the border to match the aspect ratio of the picture.
45 Picture appears when you roll over the cell 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
38
46 FORMAT ALTERNATE BANDED ROWS Often, a neater way than using borders to separate rows of data is to use alternate coloured rows.
This is easy to format in Excel but the pattern can easily be disrupted when rows are inserted or deleted or the data is re-sorted. A clever technique to overcome this is to base the formatting on whether the row number is odd or even. This requires the Conditional Formatting feature. 1 Highlight the range to apply the formatting to 2 Select Format | Conditional Formatting from the Menu Bar 3 From the Conditional Formatting dialog box select Formula Is 4 In the adjacent field type the formula: =MOD(ROW(),2) 5 Click Format 6 Select a cell fill colour from the Patterns tab (lighter colours are usually best) 7 Click OK twice
Every odd numbered row in your range is now coloured. To colour every even coloured row instead, change the formula to: =MOD(ROW()+1,2) You can now insert and delete rows and re-sort data and the pattern will be preserved. 46 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
39
The components of this formula are: MOD(...) Short for modulus, this returns the remainder when one number is divided by another e.g. the modulus of 7 divided by 2 is 1 since 2 divides into 7 3 times and leaves 1. This would be written as =MOD(7,2) in Excel ROW(...) Returns the row number for the cell reference which appears between the parentheses. If left blank it returns the row number for the row in which the formula is written
The complete formula divides the row number by 2 and returns the remainder. The result must always be either 1 (for odd rows) or 0 (for even rows). In certain circumstances Excel interprets a 1 as true and a 0 as false. In other words, when this formula returns true the formatting is applied. When false it is not applied.
47 QUICKLY ADD BORDERS An often overlooked method to quickly add borders around multiple ranges is the Draw Borders tool. 1 Select View | Toolbars from the Menu Bar 2 Select Borders. This will dock the Borders Toolbar next to your existing Toolbars
3 Choose a line style from the Line Style drop-down menu 4 Choose a line colour from the Line Color drop-down menu 5 From the Draw Border drop-down menu select whether you want to draw an outline border, Draw Border, or a grid, Draw Grid. The cursor will change to a pen 6 Click and drag over the cells you want to apply the border to 7 When finished, click Draw Borders to turn the feature off Multiple ranges can be drawn without the need to reset the drawing tool each time. To draw a line, simply drag the cursor along the same edge. To erase borders: 1 Select Erase Border. The cursor will change to an eraser 2 Click and drag over the borders you want to erase 3 When finished, click Erase Border to turn the feature off
47 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
40
48 CREATE CUSTOM NUMBER FORMATS Excel makes many different number formats available e.g. $12,345, AUD 12,345.00, 12345, 12.34% etc. However there can often be occasions when you need something more specific e.g. 38.76kmph or Overdue by 10 days. The advantage of changing number formats is that the cell value remains as a number and can be used in formulas. Fortunately Excel allows you to create your own number formats. 1 Select Format | Cells from the Menu Bar 2 Select the Number tab 3 Choose Custom in the Category list On the right hand side of the Format Cells dialog box you will see lots of different format codes, not just for numbers but for dates and times as well. The table in Appendix 2 explains what these codes mean. This tip shows you how to adapt existing formats for the examples above. To enter the number 38.76 in a cell and have it show as 38.76kmph: 4 From the right hand window select a format which gives you 2 decimal places (the Sample window will show you what the currently selected cell will look like). Assume you have selected the format #,##0.00 5 In the Type field enter kmph (including quote marks) immediately after the format code so that it reads #,##0.00kmph
48 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
41
6 Click OK To enter the number 10 in a cell and have it show as Overdue by 10 days: 1 Follow the same steps above except choose a format showing no decimal places e.g. #,##0 2 In the Type field enter text around the format code so that it reads Overdue by #,##0 days (including quote marks)
Custom number formats are saved with the workbook and will be found at the end of the list of format codes in the Format Cells dialog box. They can be selected from here and used as required.
49 FORMAT TELEPHONE NUMBERS To quickly enter telephone numbers into a worksheet you can set up a custom number format which will enable you to type in e.g. 0298761234 and have it appear as (02) 9876 1234. There is also a trick to distinguish mobile telephone numbers so that 0432123456 appears as 0432 123 456. Before following the steps below, type a number such as 0298761234 into a cell as you will then be able to see how this number changes as you create the custom format. 1 Select Format | Cells from the Menu Bar 2 Select the Number tab 3 Choose Custom in the Category list 4 In the Type field enter (0#) #### #### You will see in the Sample window that this reformats the number as (02) 9876 1234 and puts the leading zero back. 5 Click OK You may have noticed that many custom number formats are separated by semi-colons. These distinguish the formats for positive numbers, negative numbers, zeroes and text i.e.: Positive number; negative number; zero; text By adapting the custom number format above to (0#) #### ####;0### ### ### a negative number such as -432123456 will be formatted as 0432 123 456. This means that mobile telephone numbers can be entered by replacing the leading zero with a sign. Cell value remains as the number 10 49 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
42
50 CREATE CUSTOM DATE FORMATS Excel provides many built in formats for dates, however there can often be occasions when the format you need isnt available. To create your own format: 1 Select Format | Cells from the Menu Bar 2 Select the Number tab 3 Choose Custom in the Category list 4 In the Type field enter a format using by combining the codes in the following table 5 Click OK Code Description Example (4 th September 2009) m Month as a number without leading zeros 9 mm Month as a number with leading zeros 09 mmm Month as a 3 letter abbreviation Sep mmmm Full month name September mmmmm Month as a single letter abbreviation S d Day without leading zeros 4 dd Day with a leading zero 04 ddd Day name as a 3 letter abbreviation (Sun - Sat) Fri dddd Full day name Friday yy Year as a 2-digit number 09 yyyy Year as a 4-digit number 2009
Examples: ddd d mmmm yyyy Fri 4 September 2009 d-mmm-yy 4-Sep-09 dddd, d/m/yy Friday, 4/9/09
50 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
43
51 FORMAT TIMES TO ADD MORE THAN 24 HOURS If youve ever been frustrated when trying to total hours e.g. in a timesheet, then this tip is for you. Consider the example below which adds hours worked in a week (to enter e.g. 7.5 hours type 7:30 into the cell). The total for the week is 38 hours, however Excel shows only 14 hours.
This is because Excel treats the number of hours and minutes as a time of day e.g. 7:30 is treated as 7:30AM. Adding the other hours to this gives a result of 14:00, i.e. 2:00PM because the time of day can only go up to 24:00 after which it starts at 0:00 again. To get Excel to show the total as 38 hours: 1 Highlight the cells to reformat 2 Select Format | Cells from the Menu Bar 3 Select the Number tab 4 Choose Custom in the Category list 5 In the Type field enter [h]:mm. The square brackets are what make the difference 6 Click OK
Reformatted hours giving correct result 51 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
44
52 MAKE CELL CONTENTS INVISIBLE If you need to hide cell values on the face of the worksheet: 1 Highlight the cells to reformat 2 Select Format | Cells from the Menu Bar 3 Select the Number tab 4 Choose Custom in the Category list 5 In the Type field enter ;;; (3 semi-colons) 6 Click OK You will see in the right hand window of the Format Cells dialog box that many custom number formats are separated by semi-colons. These distinguish the formats for positive numbers, negative numbers, zeros and text i.e.: Positive number ; negative number ; zero; text
If no formats are specified i.e. by just entering ;;; then no values are visible (although the cell contents are still visible in the Formula Bar). Variations of this are possible e.g. to make only zeros and text invisible you might use a custom format such as: #,##0.00;-#,##0.00;;
Positive format Negative format Zero format Text format 52 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
45
53 TEMPORARILY UNHIDE ALL ROWS AND COLUMNS If your worksheet has many hidden rows and columns and you need to temporarily unhide some or all of them without having to set them all over again use this very obscure technique. 1 Select Tools | Options from the Menu Bar 2 Select the Transition tab. This contains settings to help users transition from Lotus 1-2-3, another spreadsheet application which was very popular in the 1980s 3 Tick Transition navigation keys 4 Click OK 5 In a blank cell type = and press one of the arrow keys as if you were creating a simple cell reference formula All hidden rows and columns are now visible. As soon as you press ENTER or ESC the rows and columns are again hidden. Once you no longer require this feature you will need to un-tick Transition navigation keys. Leaving it ticked will affect some of the navigation commands you may use.
54 CHANGE MULTIPLE WORKSHEETS AT THE SAME TIME To make the same changes to several worksheets in the same workbook at the same time, first select the worksheets you want to change using one of the following methods: To select all worksheets in the workbook either: Right click any worksheet tab and choose Select All Sheets from the pop-up menu Select the first worksheet tab, hold SHIFT and select the last worksheet tab To select non-adjacent worksheets hold CTRL while selecting the worksheet tabs The Title Bar at the very top of your screen will show [Group] after the workbook name to indicate that worksheets are grouped. Now make your data and formatting changes on one worksheet to have them duplicated on all other grouped worksheets. Note: The grouped worksheets mode does not allow you to sort, filter or set print ranges. Caution: Remember to ungroup worksheets once you are finished. Either: Select an ungrouped worksheet tab Right click any worksheet tab and choose Ungroup Sheets
54 53 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
46
55 USE CUSTOM VIEWS If you need to show or print different views of the same worksheet for different audiences one great method to save time is to use Custom Views. The illustration below shows an example report for sales by city and state.
The state managers may only need to see results for their state. Rather than filtering the relevant data for each manager every time this report is issued: 1 Apply the Autofilter for say NSW 2 Set the print range and print settings 3 Select View | Custom Views from the Menu Bar 4 Click Add 5 Enter a name for these settings e.g. NSW. Leave the 2 tick boxes ticked 6 Click OK 7 Repeat for the other states This is a one off set up. When the data changes it can be typed or pasted in without affecting the custom view settings. To show a view setting: 1 Select View | Custom Views from the Menu Bar 2 Select the name of the view from the list 3 Click Show Custom Views can save settings which include hidden rows and columns, filters, print settings, frozen panes and the selected cells at the time the view was created.
55 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
47
56 VIEW MULTIPLE WORKSHEETS AT THE SAME TIME To view several worksheets from the same workbook: 1 Select Window | New Window from the Menu Bar. This creates a duplicate view of the active workbook (this hasnt created a new workbook). Repeat this until you have a duplicate for each worksheet you want to view 2 Select Window | Arrange from the Menu Bar and choose how you want the windows to appear
3 Tick Windows of active workbook to ensure no other open workbooks appear in the view 4 In each window, select the worksheet you want to view
Viewing 3 worksheets at the same time 56 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMATTING
48
To view several worksheets including some from other open workbooks repeat the steps above as required but leave Windows of active workbook un-ticked. To remove any windows from view: 1 Minimise the window by clicking the Minimise button on the window Title Bar (not the Excel Title Bar) 2 Select Window | Arrange from the Menu Bar and reset how you want the windows to appear To return to a single worksheet view simply click the Maximise button from the window Title Bar (not the Excel Title Bar) To delete duplicate views of the same workbook: 1 Select the duplicate window 2 Click the Close button on the window Title Bar (not the Excel Title Bar) An alternative if you only need to see 2 worksheets at the same time: 1 Select Window | Compare Side by Side with from the Menu Bar 2 Choose the 2 nd workbook to view 3 Click OK A new Compare Side by Side Toolbar appears which allows you to synchronise the scrolling between the 2 worksheets.
If any other worksheets should appear in this view simply minimise them and reset the view by using Window | Arrange from the Menu Bar. To return to a single worksheet view, simply click the Close Side by Side option on the Toolbar.
57 INSERT MULTIPLE ROWS IN A CELL To wrap text onto another line within the same cell: 1 Type your text as normal 2 When you reach the point at which you want to wrap the text press ALT-ENTER and carry on typing
This gives you more control than relying on the Wrap Text feature.
58 CHANGING TEXT CASE To tidy up the appearance of text in a worksheet, Excel provides 3 handy functions: Function Original Text Converted Text UPPER(...) The quick brown fox THE QUICK BROWN FOX LOWER(...) The quick brown Fox the quick brown fox PROPER(...) The quick brown fox The Quick Brown Fox
The parentheses contain the cell reference containing the text you want to convert e.g. =UPPER(A3) where cell A3 contains the original text.
FORMULAS & FUNCTIONS These tips and shortcuts reveal some great techniques and obscure functions to manipulate your data. There is often an easy way to get the result you require.
FORMULAS & FUNCTIONS 59 USING THE STATUS BAR You have probably noticed that you can total cell values on the fly by highlighting the cells and reading the sum value on the Status Bar (at the very bottom right of your screen). However did you know that you are not just limited to seeing a sum total? Right click the Status Bar near to where the sum appears to reveal a pop-up menu of options which include count, maximum, minimum and average.
60 QUICKLY CREATE MULTIPLE ROW AND COLUMN TOTALS To very quickly insert multiple row and column totals: 1 Highlight the range of cells in all the rows and columns to be totalled. For row totals include the blank cells immediately to the right. For column totals include the blank cells immediately below 2 Click the AutoSum icon on the Toolbar This will place totals in all the blank cells at the end of the rows and/or columns.
61 TOTAL ALL SUBTOTALS To add grand totals to a data set with subtotals inserted throughout, as illustrated below: 1 Highlight the blank cells at the foot of each column to be totalled 2 Click the AutoSum icon on the Toolbar
Excel recognises that SUM functions are inserted throughout the data set and only totals these, giving the correct grand total.
SUM functions subtotalling data above SUM functions subtotalling data above Cells highlighted for grand totals 61 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
52
62 EDIT FORMULAS BY DRAGGING BORDERS Formulas often need editing to change the cells which they reference. This can often happen after a formula has been pasted elsewhere or after additional data has been added to a range of cells. It can be a fiddly process to manually re-type the necessary cell references and it is often easier to start the formula again. However, if the cells being referenced by the formula are on the same worksheet, Excel offers a more visual way to change your formulas. 1 Select the cell containing the formula 2 Press F2 or click into the Formula Bar You will now see borders around all the cells and ranges which are referenced by the formula. In addition both the borders and the cell references in the formula are colour coded to help you match them together. To change the cell references simply move or resize the border as follows: Move the border by dragging any edge (the cursor will change to an arrowed cross) Resize the border by dragging a corner (the cursor will change to a diagonal arrow) As you move or resize the cells references in the formula change.
Resize by dragging a border corner Move by dragging a border edge 62 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
53
63 THE VERSATILE SUBTOTAL FUNCTION On the surface the SUBTOTAL function appears to do pretty much the same as the SUM function. However it has 2 major differences: It only calculates based on visible cells. This means that SUBTOTAL can be used for filtered data where you only want a total for the cells displayed It doesnt just sum values, amongst other things it can also average, count and find the maximum and minimum The SUBTOTAL function requires the following information: =SUBTOTAL(n, cell range) where n is an index number which determines what function SUBTOTAL will perform e.g. sum, average etc. A selection of the more useful index numbers is shown below. Index Number Function 1 Average 2 Count values only 3 Count all 4 Maximum 5 Minimum 9 Sum
The examples below show how the SUBTOTAL result changes when data is AutoFiltered. Tip: For lengthy data sets insert column totals into the top row instead of the bottom row. This avoids having to scroll to the foot of each column each time you need to see the totals.
63 Summing unfiltered data 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
54
For extra versatility, instead of hard coding the index number use a cell reference. In that cell simply type the index number e.g. use =SUBTOTAL(F1,C3:C864) and in cell F1 enter whichever index number you require which you can quickly change as required.
64 ROUND NUMBERS TO A MULTIPLE Some useful functions arent included in the default version of Excel and need to be loaded using an Excel Add-In. This doesnt require any downloads or discs. 1 Select Tools | Add-Ins from the Menu Bar 2 Tick the required Add-In, in this case Analysis Toolpak 3 Click OK You now have the MROUND function which allows you to round numbers to a multiple e.g. to round a number in cell A1 to the nearest 50, enter the function =MROUND(A1,50)
65 SELECT A FORMULAS REFERENCE CELLS To highlight the cells on which a selected formula relies, known as the formulas precedent cells, press CTRL-[. If the precedent cells are in another closed workbook, the workbook will be opened and the cells will then be highlighted. To highlight the cells which rely on the selected cell, known as the dependent cells, press CTRL-]. Note that this only works for cells in the same worksheet.
Summing filtered data changes the result 64 65 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
55
66 RETURN THE START OR END OF A MONTH This requires the use of a function available within the Excel Analysis Toolpak Add-In. See tip 64. This gives you a new function called EOMONTH which returns the month end date based on a start date and the number of months before or after that date e.g. if cell A1 contains the date 12/9/09: =EOMONTH(A1,2) returns the date 30/11/09 (the end of the month 2 months after 12/9/09). =EOMONTH(A1,-3) returns the date 30/6/09 (the end of the month 3 months before 12/9/09). To return the start of a month, add one to the function e.g. =EOMONTH(A1,1)+1 returns the date 1/11/09 (the end of the month 1 month after 12/9/09, plus one day)
67 FIND NUMBER OF WORKDAYS BETWEEN 2 DATES This requires the use of a function available within the Excel Analysis Toolpak Add-In. See tip 64. This gives you a new function called NETWORKDAYS which gives you the number of workdays between 2 dates. You can even take public holidays into account. The following illustration shows the function =NETWORKDAYS(B3,C3,$G$3:$G$10) where the cell B3 contains a start date, C3 an end date and the range G3:G10 a list of public holiday dates (this is optional). Note that the range referencing the public holiday dates uses $ signs. This is an absolute reference which prevents the reference changing when the function is copied to other cells. 67 66 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
56
68 EASY WAY TO CHANGE ABSOLUTE AND RELATIVE REFERENCES To quickly cycle through the various relative and absolute cell reference options: 1 Select the cell containing the formula with the cell reference 2 Press F2 or click in the Formula Bar 3 Click within or immediately next to the cell reference 4 Press F4 repeatedly until you have the required relative or absolute reference The table below shows the effect on a reference to cell A1. Press F4 Cell Reference Once $A$1 Twice A$1 3 times $A1 4 times A1
69 COPY EXACT FORMULAS If you need to copy formulas exactly as they appear to another location and havent applied absolute cell referencing (which locks the cell addresses): 1 Select the cells containing the formulas to be copied 2 Select Edit | Replace from the Menu Bar 3 In the Find what field type = 4 In the Replace with field type #. This converts the formulas to text 5 Copy and paste the formulas where you require them 6 With the copied formulas still highlighted, select Edit | Replace from the Menu Bar 7 In the Find what field type # 8 In the Replace with field type =. This converts the text back to a formula 9 Highlight the original cells and repeat steps 6 to 8
70 REFERENCE COLUMNS TO ROWS AND ROWS TO COLUMNS This is a quick method to reference a row of data from a column as illustrated below. It can also be used to reference a column of data from a row.
1 Highlight the cell to be referenced. In the example above, cells B1 to U1 2 Select Edit | Copy from the Menu Bar or press CTRL-C 3 Select a cell in an unused row and select Edit | Paste Special from the Menu Bar or right click and choose Paste Special from the pop-up menu 4 In the Paste Special dialog box click Paste Link 5 With the copied cells still highlighted replace the = signs with # symbols (see tip 69) 6 Select Edit | Copy from the Menu Bar or press CTRL-C 7 Highlight the cell at the top of the column to be used, in the example above, cell A2 8 Select Edit | Paste Special from the Menu Bar or right click and choose Paste Special from the pop-up menu 9 In the Paste Special dialog box tick Transpose 10 With the copied cells still highlighted replace the # symbols with = signs (see tip 69) 11 Clear the cells used in step 3
Formulas to be created which reference the column headings 70 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
58
71 CALL UP NAMED RANGES ON THE FLY Naming ranges is a good housekeeping rule e.g. consider a formula such as =SUM(C2:C300) It may not be immediately obvious what the range C2:C300 refers to, particularly if it is off- screen or on another worksheet. If it refers to sales revenue then it would be more meaningful if this formula could be written as =SUM(Revenue) where Revenue represents the range C2:C300. To set this up simply highlight the range and type the name you require into the Name Box. Press ENTER to store the name. Note that you cannot use spaces in a name nor start the name with a number. Certain symbols are also disallowed.
To insert your range name into a formula 1 Start typing the formula and press F3 at the point the range needs inserting 2 Select the name from the list 3 Click OK 4 Complete the rest of the formula
Type a range name into the Name Box 71 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
59
72 NAME YOUR CONSTANTS Naming constants in formulas is not only a great way of giving them a meaningful name but it also allows you to very quickly change the value of the constant from one location. This is a huge time saver if you have many formulas using the same constant spread throughout a workbook. Suppose you have constant equal to 10% which is used in many different formulas: 1 Select Insert | Name | Define from the Menu Bar 2 In the Define Name dialog box select the Names in workbook field and type in a meaningful name e.g. DiscountRate. Note that you cannot use spaces in a name nor start the name with a number. Certain symbols are also disallowed. 3 In the Refers to field enter the value of the constant
4 Click OK To use this named constant in your formulas, press F3 as you type the formula to reveal a list of all names available (see tip 71). Simply select the one you require to insert it into your formula. To change the value of the constant and update all formulas: 1 Select Insert | Name | Define from the Menu Bar 2 In the Define Name dialog box select the name of the constant and enter the new value in the Refers to field 3 Click OK
73 NAME YOUR FORMULAS Just as you can name constants in your formulas (see tip 72), you can also name whole formulas which can make them very quick and easy to edit. Consider the formula illustrated below, which sums the 3 adjacent cells to the left and multiplies the result by 10%.
To give this formula a meaningful name: 1 Select Insert | Name | Define from the Menu Bar 2 In the Define Name dialog box select the Names in workbook field and type in a meaningful name e.g. TotalDiscount. Note that you cannot use spaces in a name nor start the name with a number. Certain symbols are also disallowed. 3 In the Refers to field type in the formula =SUM(C2:E2)*10% Ensure that cell references are relative (i.e. no $ signs) and that the formula is correct for the cell currently selected, cell F2 in the example above.
To use this named formula: 1 Select a cell to insert the formula 2 Press F3 to reveal a list of all names available (see tip 71) 3 Select the formula name you require 4 Click OK 5 Press ENTER to accept it
To change the formula: 1 Select Insert | Name | Define from the Menu Bar 2 In the Define Name dialog box select the name of the formula and enter the changes in the Refers to field 3 Click OK
The named formula applied to other cells 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
62
74 PICKING VALUES FROM A TABLE 1 There is a little known operator in Excel called intersection which can be very useful for extracting a value from a table. The illustration below shows a table with a value extracted from the intersection of ranges D4:D23 and C7:H7. This is written as =D4:D23 C7:H7 The intersection operator is simply a space between the 2 ranges.
To refine this you can very quickly name all the possible ranges e.g. the range C4:C23 will be named July, the range C9:H9 will be named Canberra etc. 1 Highlight the whole table including row and column titles 2 Select Insert | Name | Create from the Menu Bar 3 In the Create Names dialog box ensure that only Top row and Left column are ticked 4 Click OK All the possible intersecting ranges are now named as the row or column title. To extract the same value as above: 1 Select a cell to enter the formula 2 Press F3 (see tip 71) 3 Select August from the list 4 Click OK 5 Type a space 6 Press F3 7 Select Adelaide 8 Click OK 9 Press ENTER The formula is now in an easy to read format, appearing as: =August Adelaide 74 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
63
75 PICKING VALUES FROM A TABLE 2 Extracting a value from a table as shown in tip 74 can be refined even further by selecting row and column titles from a drop-down list and using an obscure Excel function. Referring to the example in tip 74 and assuming you have named your various table ranges as per steps 1 to 9: 1 Select cell B1 or any other appropriate cell from which you will select the city 2 Select Data | Validation from the Menu Bar 3 In the Data Validation dialog box choose List from the Allow drop-down menu 4 Click into the Source field and highlight the cells containing the names of the cities, B4 to B23 in this example 5 Click OK This has now set up a drop-down list of city names in cell B1. 6 Select cell C1 or any other appropriate cell from which you will select the month 7 Repeat steps 2 to 5 above but in step 4 choose the source range containing the months, C3 to H3 in this example Cell D3 now needs to be connected to the items chosen from the drop-down lists in cells B1 and C1. For this you require an obscure Excel function called INDIRECT. This interprets a value in a cell as a range e.g. if you select Adelaide in cell B1 and use the function =INDIRECT(B1) you are telling Excel to interpret the result Adelaide as a range (the cells C7 to H7 in this example). Therefore, in cell D1 type the formula = INDIRECT(B1) INDIRECT(C1) leaving a space between the 2 functions for the intersect operator. Selecting both a city and a month from the drop-down lists will now return the intersecting value from the table. 75 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
64
76 GET A QUICK STRAIGHT LINE FORECAST If you need a quick straight line forecast from a series of values, e.g. monthly sales as illustrated below: 1 Highlight all the values 2 Drag and fill the cells below using the bottom right hand fill handle
This gives the same result as using a tricky Excel statistical function called LINEST which calculates a straight line that most closely fits the trend of the given values (you could try plotting the results on a chart to see this result more clearly).
Select intersecting names from a drop-down list Drag and fill using the fill handle Forecast values 76 101 EXCEL TIPS, TRICKS & TIME SAVERS FORMULAS & FUNCTIONS
65
77 KEEP AN EYE ON REMOTE CELLS To keep an eye on values in cells which are off-screen, including cells in the same worksheet, in a different worksheet or in another open workbook: 1 Highlight the cell or cells to watch 2 Select Tools | Formula Auditing | Show Watch Window This places a Watch Window above the Formula Bar which shows the current values of those cells as well as their formulas.
The Watch Window can be moved elsewhere on the screen by clicking and dragging its Title Bar.
Watch Window showing full details of selected cells 77 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
66
CHARTS When done properly, charts can convey a lot of information quickly and efficiently. These tips show you some great tricks and shortcuts for working with charts.
CHARTS 78 QUICKLY UPDATE CHARTS 1 This tip allows you to easily add a new category or new series to a chart. A category is what generally appears on the horizontal axis. A series is what appears in the legend and is represented by columns, bars, lines etc. Simply highlight the new data as shown below, click on the black border and drag it onto the chart.
Note: Both the data and the chart must be on the same worksheet.
Drag a new category Oct onto the chart Drag a new series Units onto the chart 78 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
67
79 QUICKLY UPDATE CHARTS 2 If a chart and the data are on separate worksheets, the easiest method to update the chart with new data is: 1 Highlight the new category or series data (including its heading) 2 Select Edit | Copy from the Menu Bar or press CTRL-C 3 Select the chart 4 Select Edit | Paste from the Menu Bar or press CTRL-V
80 CHANGE DATA FROM THE CHART You will probably know that if you change chart data the chart will automatically update. However this also works in reverse: 1 Select a single data point on your chart using a slow double-click 2 Click and drag the data point or the end of the column/bar to a new position The data will now show the new value.
Note: This does not work with area charts.
Drag a column to change the data 80 79 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
68
81 APPLY A SEMI-TRANSPARENT FILL Unfortunately Excel 2003 does not offer the ability to use semi-transparent fill colours for your charts. However there is a clever trick to apply transparency to column and bar charts.
Firstly you need to draw an AutoShape since these have an option to set the level of transparency. 1 Select Insert | Picture | AutoShapes from the Menu Bar 2 From the AutoShapes Toolbar which appears, select Basic Shapes and click the rectangle
3 Draw a rectangle 4 Right click inside the rectangle and select Format AutoShape from the pop-up menu 5 From the Format AutoShape dialog box choose a fill colour and use the Transparency slider to set the level of transparency. Alternatively set the transparency percentage in the adjacent box 6 Select No Line in the Line Color field 7 Click OK Columns with a transparent blue fill 81 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
69
Now you simply copy this shape onto your chart columns or bars. 8 Click the AutoShape to select it 9 Select Edit | Copy from the Menu Bar or press CTRL-C 10 Click to select the series of columns or bars to be formatted (to select a single column or bar in a series use a slow double-click) 11 Select Edit | Paste from the Menu Bar or press CTRL-V Your chart series will now be semi-transparent.
101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
70
82 DISPLAYING BLANK DATA By default, blank cells within your chart data are treated as zeros which can have undesirable effects as illustrated below.
This example implies that sales for June were zero whereas it is more likely that the data is not available. To avoid this: 1 Click anywhere within the chart to select it 2 Select Tools | Options from the Menu Bar 3 Choose the Chart tab 4 Select Plot empty cells as to be Not plotted 5 Click OK This now leaves a gap in the series as below.
Blank data is treated as zero 82 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
71
83 SAVE FAVOURITE CHART FORMATS If you have invested time in creating and formatting a chart that you want to use again as a template for other charts you can save time by saving it. 1 Click anywhere within the chart to select it 2 Select Chart | Chart Type from the Menu Bar 3 Choose the Custom Types tab 4 Click User-defined
5 Click Add and enter a name and description for your chart 6 Click OK twice To select this chart template: 1 Highlight you chart data including the series and category names 2 Select Insert | Chart from the Menu Bar 3 Choose the Custom Types tab 4 Click User-defined 5 Choose your chart name from the list and click Finish 83 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
72
84 COMBINE 2 CHART TYPES You can use several different chart types on a single chart.
To combine a column and line type on the same chart firstly create your chart in one of the types required, say a column chart. Then: 1 Click on the series to be changed to another chart type 2 Select Chart | Chart Type from the Menu Bar 3 Choose the new chart type, in this case a line chart 4 Click OK You may need to reformat the series by double-clicking it and choosing the required format from the Format Data Series dialog box.
A combined column and line chart 84 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
73
85 COMBINE DIFFERENT FORMATS FOR THE SAME SERIES This is a quick method to apply different formatting within the same data series. You can of course select individual data points and reformat them as required but this can be very time consuming if you have lots of data points.
The trick here is to lay out your chart data correctly by setting up a separate series for each different format you require. The example below plots monthly sales as a line chart. Forecast sales (September to December) will be distinguished from actual sales by formatting them as a dotted line. The data for forecast sales is set up as a separate series from the data for actual sales. 1 Highlight all the data (including the blank cells, category and series names) and create a line chart. You will need to ensure that blank cells are not plotted as zeros (see tip 82) 2 Format the actual sales line by double-clicking and setting the required format from the Format Data Series dialog box 3 Format the forecast sales line by double-clicking and setting the required dotted line format from the Format Data Series dialog box Even though you have plotted 2 separate series on the chart it appears as one series which changes format part way through. Note: The sales data for August is repeated in both series to avoid a gap appearing between the August and September data points.
Line chart changes format from August onwards 85 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
74
86 CREATE A MINI BAR CHART IN A CELL 1 This tip is not strictly a chart but it is a very good visual trick for analysing large amounts of data as illustrated below. It relies on the obscure REPT function which repeats text or characters a defined number of times.
REPT requires the following information: =REPT(text or character to be repeated, number of times to repeat) 1 In cell C2 type the formula =REPT(|,B2/10000) The | character is found above the backslash key. Dividing the value in cell B2 by 10,000 scales the number of times the | character is repeated i.e. rather than repeat the character 112,489 times, this repeats it 11 times. 2 Format the result by changing the font colour as required. Using bold font will also make the result stand out more 3 Copy the function to the other cells
REPT function can create mini bar charts 86 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
75
87 CREATE A MINI BAR CHART IN A CELL 2 To refine the mini bar chart in tip 86 for negative numbers you need to adapt the REPT function and use 2 columns as illustrated below.
In column C you need a formula which says that if the number in the adjacent cell is negative then apply the REPT function, otherwise leave the cell blank. To do this the IF function is used which takes the form =IF(some criterion is true, then do this, otherwise do this) In cell C2 this would be: =IF(B2 is less than zero, then apply the REPT function, otherwise leave the cell blank) which is formulated as: =IF(B2<0,REPT(|,-B2/1000),) Note that: The reference to B2 in the REPT function is negative to convert B2 to a positive number since you cant repeat a character a negative number of times The 2 double quotes is the Excel notation to return a blank cell The value in cell B2 is scaled down by 1,000 To complete this: 1 Re-align cell C2 by clicking the Align Right icon from the Toolbar 2 In cell D2 type a similar formula for positive numbers i.e. =IF(B2>0,REPT(|,B2/1000),) 3 Copy cells C2 and D2 to the remaining cells and format the font colour as required
87 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
76
PRINTING Printing is often the final step, after your worksheets are completed. These tips show you some easy techniques to make sure you set things up properly to get what you expect.
PRINTING 88 QUICKLY SET PAGE BREAKS The Page Break Preview mode is a great way of letting you control exactly where to place page breaks. Complete your document and select View | Page Break Preview from the Menu Bar. This shows a view similar to that below. The blue dashed lines indicate where Excel will automatically place page breaks to fit the paper size. To re-position the suggested page breaks simply click and drag them where required To insert a new page break highlight a row or column and select Insert | Page Break from the Menu Bar. This will insert a page break immediately above or to the left of the selected row or column To remove a page break, highlight a row or column immediately below or to the right of the break and select Insert | Remove Page Break from the Menu Bar
88 Click and drag to re-position page breaks 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
77
89 PRINT CELL COMMENTS If you use cell comments (select Insert | Comment from the Menu Bar) you have 3 options available when printing: Dont show any comments on the printed page. This is the default setting. Show comments as displayed Show comments at the end of the last page To change these settings: 1 Select File | Page Setup from the Menu Bar 2 Choose the Sheet tab 3 Select the required setting from the Comment drop-down list The option to print comments As displayed on sheet does exactly that. If comments are not visible on your worksheet then they will not print. To make all comments visible: 1 Select Tools | Options from the Menu Bar 2 Choose the View tab 3 Select Comment & Indicator 4 Click OK To make individual comments visible: 1 Right click the cell with the comment 2 Select Show/Hide Comments from the pop-up menu
90 CONTROL HOW ERRORS PRINT If your worksheet contains errors you can control how these are shown on the printed page. 1 Select File | Page Setup from the Menu Bar 2 Choose the Sheet tab 3 In the Cell errors as drop-down list select whether to show errors as: Displayed Blanks -- #N/A
Re-positioned page breaks which show as solid blue lines 89 90 101 EXCEL TIPS, TRICKS & TIME SAVERS PRINTING
78
91 APPLY SAME PAGE SETUP ACROSS WORKSHEETS By grouping worksheets you only need to apply page setup settings once. To group all worksheets right click any worksheet tab and choose Select All Sheets To group adjacent worksheets click the first required worksheet tab, hold SHIFT and click the last required worksheet tab To group non-adjacent worksheets hold CTRL and click the worksheet tabs required To ungroup worksheets right click a worksheet tab and choose Ungroup Sheets or simply select one of the ungrouped worksheets Now apply your page setup by selecting File | Page Setup from the Menu Bar and choosing from the available options in the Page Setup dialog box. These will then be applied across all selected worksheets. If you have previously applied your page settings to a worksheet and want to copy them to other worksheets: 1 Using one of the worksheet grouping methods above, select the required worksheets ensuring that the first one selected is the one with the page settings applied 2 Select File | Page Setup from the Menu Bar 3 Click OK 4 Ungroup the worksheets
90 101 EXCEL TIPS, TRICKS & TIME SAVERS DRAWING
79
DRAWING Excel is not renowned for its drawing abilities but here are a few tips that you may occasionally find useful and save you time in the process.
DRAWING 92 CREATE AN ORGANISATION CHART If you ever need to create an organisation chart or any other type of hierarchical diagram then the often overlooked Organisation Chart tool can save a lot of time. To start the organisation chart select Insert | Picture | Organization Chart from the Menu Bar. This will create a default starting point and reveal an Organization Chart Toolbar as shown below.
To add more items: 1 Click on a shape to which the new item will be connected 2 From the Insert Shape drop-down list select whether to add a Subordinate, Coworker or Assistant
The chart will automatically rescale to include new items. To remove items simply click the item and press DELETE. 92 101 EXCEL TIPS, TRICKS & TIME SAVERS DRAWING
80
To select other presentation styles click the Layout drop-down list and choose from the available options.
To restyle your organisation chart select the Autoformat icon to reveal a list of available styles. However you can set your own styles by right clicking any shape and selecting Format AutoShape from the pop-up menu.
93 REFERENCE A CELL FROM A TEXT BOX When using a text box in a worksheet you can link the contents to a worksheet cell. Click the text box to activate it and in the Formula Bar type = followed by the cell address. The content of that cell will now appear in the text box which will update whenever the cells value changes.
List of built-in styles and preview pane 93 101 EXCEL TIPS, TRICKS & TIME SAVERS DRAWING
81
94 USE CONNECTORS TO JOIN OBJECTS When drawing connecting lines between shapes e.g. for flow charts, use connectors instead of lines. Connectors snap onto the shape at defined points and stay connected even when the shape is moved or resized. 1 Draw the required shapes using the AutoShapes Toolbar (select Insert | Picture | AutoShapes from the Menu Bar) 2 Click the Connectors icon to reveal a menu of connector types. This menu can be dragged away from the Toolbar to keep it visible
3 Select a connector style and draw a line between the 2 shapes to connect. Note that when you are in the vicinity of a shape small blue points appear on the border. These are the points which the connector will snap to
95 DRAW A PRECISE CIRCLE The AutoShapes feature does not provide a circle. To insert a circular AutoShape: 1 Select Insert | Picture | AutoShapes from the Menu Bar 2 From the Basic Shapes icon choose the oval 3 As you draw the oval press SHIFT. This will draw a perfect circle
Blue connection points on a rectangular AutoShape 94 95 Click and drag here to keep connector types visible 101 EXCEL TIPS, TRICKS & TIME SAVERS GENERAL
82
GENERAL Dont just accept Excel as it appears out of the box. Use these tips to change the Excel environment so that it works for you.
GENERAL 96 CUSTOMISE THE TOOLBAR The Excel Toolbars include only a small number of the command icons available. It is a very simple process to add or remove icons. E.g. if you find that you frequently insert rows into your worksheets it would be convenient to have a one-click icon in the Toolbar to do this for you. 1 Right click anywhere within the Toolbars 2 From the foot of the drop-down menu select Customize 3 Choose the Commands tab 4 The left hand pane groups the icons into categories. Select the most likely category, in this case Insert. The right hand pane then shows all the command icons available within that category
5 Scroll through the right hand pane until you find the icon you require, in this case the one called Rows 6 Click and drag the icon to place it where you require in one of the Toolbars. A vertical black line indicates where it will be placed 96 101 EXCEL TIPS, TRICKS & TIME SAVERS GENERAL
83
To remove a command icon, with the Customize dialog box visible simply drag the icon away from the Toolbar.
97 VIEW MORE RECENTLY USED WORKBOOKS By default when you select File from the Menu Bar you will see the last 4 files you have used listed at the bottom of the drop-down menu. You can increase this up to 9 files. 1 Select Tools | Options from the Menu Bar 2 Choose the General tab 3 Change the Recently used file list to a number between 1 and 9 4 Click OK
98 CHANGE DEFAULT FOLDER WHEN OPENING WORKBOOKS If you save most of your commonly used files in the same location this tip can be a time saver. When you go to open a file you can tell Excel which folder to open by default e.g. if you commonly use files saved in the location C:\Documents\Work Files then: 1 Select Tools | Options from the Menu Bar 2 Choose the General tab 3 Type the path C:\Documents\Work Files into the Default file location field 4 Click OK
99 CLOSE ALL OPEN WORKBOOKS To quickly close all open workbooks: 1 Press and hold SHIFT 2 Select File | Close All from the Menu Bar The Close All command is only available when you hold SHIFT
Dragging a command icon onto the Toolbar 99 98 97 101 EXCEL TIPS, TRICKS & TIME SAVERS GENERAL
84
100 OPEN MULTIPLE WORKBOOKS AT ONCE If you have a collection of workbooks which you need to open simultaneously you can save them as a Workspace. Opening a Workspace will open all the workbooks together, even if they are in many different locations. To set up a Workspace: 1 Open only those workbooks which form the collection you want to open 2 Select File | Save Workspace from the Menu Bar 3 Give the Workspace an appropriate name and choose where you want to save it 4 Click Save Now, instead of searching for and opening each workbook in turn, open the Workspace instead. Note: A Workspace is not a file or folder. Although it resembles a file in Windows Explorer it is simply a command which opens multiple workbooks.
101 SHOW FULL MENUS By default Excel shows only the most recently used commands in the Menu Bar drop-down menus. To reveal the other commands you need to click the double arrows at the foot of the menu. To always show the full menu options: 1 Right click anywhere within the Menu Bar or Toolbars 2 From the foot of the drop-down menu select Customize 3 Choose the Options tab 4 Tick Always show full menus 5 Click Close
100 101 101 EXCEL TIPS, TRICKS & TIME SAVERS APPENDIX
85
APPENDIX 1 Suggested colour palette (see tip 41) R 0 R 227 R 109 R 85 R 48 R 0 R 87 R 77 G 0 G 108 G 65 G 107 G 157 G 66 G 68 G 77 B 0 B 10 B 41 B 47 B 219 B 105 B 90 B 77 R 255 R 239 R 255 R 107 R 89 R 51 R 153 R 128 G 0 G 161 G 225 G 142 G 177 G 104 G 119 G 128 B 0 B 67 B 79 B 35 B 226 B 135 B 157 B 128 R 219 R 189 R 255 R 127 R 131 R 102 R 194 R 178 G 142 G 183 G 231 G 165 G 196 G 142 G 173 G 178 B 132 B 107 B 114 B 22 B 233 B 165 B 196 B 178 R 239 R 205 R 255 R 179 R 172 R 153 R 214 R 230 G 182 G 175 G 236 G 219 G 216 G 179 G 201 G 230 B 177 B 113 B 143 B 132 B 241 B 195 B 216 B 230 R 248 R 238 R 255 R 217 R 214 R 204 R 235 R 255 G 232 G 232 G 243 G 237 G 235 G 217 G 228 G 255 B 230 B 170 B 185 B 193 B 248 B 225 B 235 B 255
APPENDIX 2
Custom number format codes (see tip 48) Code Description 0 Pads out the value with zeros e.g. the format 0.00 shows the value .1 as 0.10 # Placeholder for digits e.g. the format #.00 shows .1 as .10 ? Placeholder for insignificant zeros e.g. the format 0.0? shows the value .1 as 0.1 but leaves a space at the end so it would line up in a column with values showing 2 decimal places * Pads the cell width with the character following it e.g. the format (* #,##.0), where a space follows the *, shows the value 1234 as ( 1,234.0) with the space after the first parenthesis being sufficient to pad the value to the full cell width _ Skips the width of the character following it e.g. the format _(* #,##0.0_) would show 1234 as 1,234.0 but leaves the width of an opening and closing parenthesis at the beginning and end. This is useful in a column when wanting to line up positive numbers with negative numbers in parentheses (a favoured format of accountants) @ Placeholder for text
Wilson, Richard - EXCEL 2022 - From Beginner To Expert - The Illustrative Guide To Master All The Essential Functions and Formulas in Just 7 Days W (2022) - Libgen - Li