Excel

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 185

Training Manual

Excel

Getting Started with Excel...................................................................................................1 Opening Excel .................................................................................................................1 Creating a Workbook.......................................................................................................2 Creating a Workbook: Menu Option...........................................................................2 Creating a Workbook: Toolbar Option........................................................................3 Entering Text ..................................................................................................................3 Entering Numbers ..........................................................................................................3 Entering Numbers as Text...........................................................................................3 Entering Dates or Times..................................................................................................4 Entering a Date or Time Manually..............................................................................4 Entering the Current Date or Time Automatically......................................................4 Saving Your Work...........................................................................................................4 Saving for the First Time.............................................................................................4 Saving Subsequent Times............................................................................................5 Worksheet Terms.................................................................................................................5 Editing Cell Contents...........................................................................................................7 Moving Information.........................................................................................................7 Drag and Drop vs. Cut and Paste.................................................................................7 Moving Information: Drag and Drop ..........................................................................7 Moving Information: Cut and Paste ............................................................................8 Copying Formulas............................................................................................................8 Copy and Paste ............................................................................................................9 Using the Fill Command................................................................................................10 Calculating with Functions................................................................................................10 Working with Functions................................................................................................10 Writing Functions with the Insert Function Dialog Box...........................................10 About the Function Arguments Dialog Box..............................................................13 Writing Formulas and Functions with the Point Method...............................................13 Adding Cells Together...............................................................................................13 Adding a Range of Cells with the SUM Function: Option 1.....................................13 Adding a Range of Cells with the SUM Function: Option 2.....................................14 Working with Rows and Columns.....................................................................................14 Adjusting Row Height and Column Width....................................................................14 Adjusting Row Height: Menu Option........................................................................14 Adjusting Row Height: Mouse Option......................................................................15 Adjusting Column Width: Menu Option...................................................................15 Adjusting Column Width: Mouse Option..................................................................15 Using AutoFit to Adjust Rows and Columns................................................................16 Using AutoFit to Adjust Row Height: Mouse Option...............................................16 Using AutoFit to Adjust Row Height: Menu Option.................................................16 Using AutoFit to Adjust Column Width: Mouse Option...........................................16 Using AutoFit to Adjust Column Width: Menu Option............................................16 Adding and Removing Rows and Columns...................................................................16 Adding Rows.............................................................................................................17 Adding Columns........................................................................................................17 Deleting Rows............................................................................................................17

Deleting Columns......................................................................................................17 Importing an External Data File........................................................................................18 Working with Comments...................................................................................................20 The Reviewing Toolbar.................................................................................................21 Adding Comments.........................................................................................................21 Adding Comments: Menu Option..............................................................................21 Adding Comments: Mouse Menu..............................................................................21 Adding Comments: Toolbar Option..........................................................................22 Editing Comments.........................................................................................................22 Editing Comments: Menu Option..............................................................................22 Editing Comments: Mouse Option............................................................................22 Editing Comments: Toolbar Option...........................................................................22 Displaying/Hiding Comments.......................................................................................23 Displaying/Hiding Comments: Single Cell...............................................................23 Displaying/Hiding Comments: Toolbar Option.........................................................23 Displaying/Hiding Comments: All Cells...................................................................23 Deleting Comments.......................................................................................................23 Removing Comments from a Single Cell: Menu Option...........................................23 Removing Comments from a Single Cell: Mouse Option.........................................23 Removing Comments from a Single Cell: Toolbar Option.......................................24 Removing Comments from All Cells: Menu Option.................................................24 Printing Comments........................................................................................................24 Using the Fill Command....................................................................................................25 Filling Cells....................................................................................................................25 Filling Cells: Menu Option........................................................................................25 Filling Cells: Mouse Option.......................................................................................26 Creating Custom Fills ...................................................................................................26 Creating a Custom Fill ..............................................................................................26 Importing Custom Fills .............................................................................................28 Using a Custom Fill ..................................................................................................29 Using the Paste Special Feature.........................................................................................29 Example: To copy and paste only the results of a formula:.......................................30 Using the Find and Replace Features.................................................................................30 Using the Find Feature...................................................................................................30 Finding Information...................................................................................................31 Searching Options......................................................................................................31 Using the Replace Feature.............................................................................................32 Replacing Information...............................................................................................32 Establishing Criteria...........................................................................................................33 Types of Conditions.......................................................................................................33 Alphabetic Conditions...............................................................................................33 Numeric Conditions...................................................................................................33 Date Conditions.........................................................................................................34 Defining a Single Criterion............................................................................................34 Format........................................................................................................................34 Example.....................................................................................................................34

Defining Multiple Criteria.............................................................................................34 AND Match Two Conditions................................................................................35 Format........................................................................................................................35 Example.....................................................................................................................35 BETWEEN ... Match Two Conditions......................................................................35 Format........................................................................................................................35 Example.....................................................................................................................35 OR ... Match Either of Two Conditions (Same Field)...............................................35 Format........................................................................................................................35 Example.....................................................................................................................35 OR Match Either of Two Conditions (Different Fields).......................................35 Format........................................................................................................................36 Example.....................................................................................................................36 Filtering Your Database.....................................................................................................36 Cautions for Working with Filters.................................................................................36 Using AutoFilter............................................................................................................36 Activating AutoFilter ................................................................................................37 Running AutoFilter....................................................................................................37 Using Custom Filter...................................................................................................37 Turning Off the AutoFilter.........................................................................................38 Using Advanced Filter...................................................................................................38 Before You Start........................................................................................................38 Running an Advanced Filter......................................................................................39 Turning Off Advanced Filter.....................................................................................40 Copying an Advanced Filter to a Second Location...................................................40 Using the Sort Command...................................................................................................41 Analyzing Your Database with Functions.........................................................................42 Defining the Syntax of Database Functions ..................................................................42 =function(database,field,criteria)...............................................................................42 Performing Database Functions.....................................................................................43 Examples of Database Functions ..................................................................................44 Working with Range Names..............................................................................................47 Naming Ranges: Tips.....................................................................................................48 Creating Range Names..................................................................................................48 Creating Range Names: Dialog Box Option .............................................................48 Creating Range Names: Name Box Option ..............................................................48 Creating Range Names: Multiple Range Names.......................................................49 Adjusting Range References..........................................................................................49 Deleting Range Names..................................................................................................49 Using Range Names in Formulas/Functions..................................................................50 Using Range Names in Functions: List Option.........................................................50 Using Range Names in Functions: Typing Option....................................................50 Using Range Names: Additional Options......................................................................51 Calculating Subtotals in Databases....................................................................................51 Adding Subtotals............................................................................................................51 Adjusting Views with Subtotals.....................................................................................52

Removing Subtotals.......................................................................................................53 Re-sorting the Data........................................................................................................53 Organizing Worksheets......................................................................................................53 Renaming Worksheet Tabs ...........................................................................................53 Renaming Worksheet Tabs: Menu Option................................................................53 Renaming Worksheet Tabs: Mouse Option...............................................................54 Changing Worksheet Tab Colors ..................................................................................54 Changing Worksheet Tab Colors: Menu Option.......................................................54 Changing Worksheet Tab Colors: Mouse Option......................................................54 Inserting Worksheets.....................................................................................................55 Inserting Worksheets: Menu Option..........................................................................55 Inserting Worksheets: Mouse Option........................................................................55 Moving Worksheets.......................................................................................................56 Moving Worksheets: Same Workbook, Menu Option .............................................56 Moving Worksheets: Same Workbook, Drag and Drop Option................................56 Moving Worksheets: Different Workbook................................................................57 Copying Worksheets......................................................................................................57 Copying Worksheets: Same Workbook.....................................................................57 Copying Worksheets: Different Workbook...............................................................58 Deleting Worksheets......................................................................................................58 Deleting Worksheets: Menu Option .........................................................................58 Deleting Worksheets: Mouse Option.........................................................................58 Working with Groups of Worksheets................................................................................59 Grouping Worksheets....................................................................................................59 Ungrouping Worksheets................................................................................................59 Ungrouping Worksheets: All Sheets .........................................................................59 Ungrouping Worksheets: Individual Sheets .............................................................60 Formatting Worksheet Groups.......................................................................................60 Printing Worksheet Groups............................................................................................60 Working with Range Names..............................................................................................61 Naming Ranges: Tips.....................................................................................................61 Creating Range Names..................................................................................................61 Creating Range Names: Dialog Box Option .............................................................61 Creating Range Names: Name Box Option ..............................................................62 Creating Range Names: Multiple Range Names.......................................................62 Adjusting Range References..........................................................................................63 Deleting Range Names..................................................................................................63 Using Range Names in Formulas/Functions..................................................................63 Using Range Names in Functions: List Option.........................................................64 Using Range Names in Functions: Typing Option....................................................64 Using Range Names: Additional Options......................................................................64 Navigating Your Large Workbook....................................................................................64 Keyboard Shortcuts........................................................................................................65 Keyboard Shortcuts from the Help Menu..................................................................65 Using the Go To Command...........................................................................................65 Using the Go To Command: Menu Option................................................................65

Using the Go To Command: Name Box Option........................................................66 Moving Between Open Workbooks...............................................................................66 Using Screen Options....................................................................................................66 Freezing the Panes ....................................................................................................66 Splitting the Screen....................................................................................................67 Performing Calculations in Your Workbook.....................................................................69 Writing Formulas for Your Workbook..........................................................................69 Writing Formulas for Multiple Worksheets...............................................................69 Writing Formulas for Other Workbook Files............................................................71 Using Range Names in Formulas..............................................................................71 Cell Reference............................................................................................................71 Range Name Reference..............................................................................................71 Calculating Your Workbook..........................................................................................71 Changing to Manual Calculation...............................................................................72 Correcting Circular References .........................................................................................74 Introduction to Troubleshooting....................................................................................74 Tracking Down Circular References.............................................................................74 Correcting Circular References......................................................................................75 Protecting Your Worksheet................................................................................................76 Protection Options.........................................................................................................76 Locking & Unlocking Cells...........................................................................................76 Locking Cells.............................................................................................................77 Unlocking Cells.........................................................................................................77 Workbook Level Protection...........................................................................................77 Protecting the Workbook...........................................................................................77 Unprotecting the Workbook......................................................................................78 Worksheet Level Protection...........................................................................................78 Protecting the Worksheet...........................................................................................78 Unprotecting the Worksheet......................................................................................80 File Level Protection......................................................................................................80 Protecting the File......................................................................................................80 Unprotecting the File ................................................................................................81 About Charting...................................................................................................................82 Charting Rules...............................................................................................................82 Bad Data Sample .......................................................................................................82 Good Data Sample ....................................................................................................83 About Charting Elements...............................................................................................83 Guidelines for Charting......................................................................................................85 General Hints.................................................................................................................85 Pie Charts.......................................................................................................................85 Bar Graphs.....................................................................................................................86 Line Graphs....................................................................................................................87 Summary........................................................................................................................88 Getting Ready to Chart......................................................................................................89 Designing Your Worksheet for Charting ......................................................................89 Recommended: Range Names.......................................................................................90

Creating a Basic Chart.......................................................................................................91 Using the Chart Wizard.................................................................................................91 Using the Chart Wizard: Selecting Your Data...........................................................91 Using the Chart Wizard: Range Names.....................................................................92 Modifying a Chart..........................................................................................................92 Changing the Chart Type...............................................................................................93 Working with Ranges / Data Series ..............................................................................93 Deleting a Data Series ...............................................................................................93 Adding a Data Series.................................................................................................93 Positioning Your Chart..................................................................................................94 Moving Your Chart ...................................................................................................94 Resizing Your Chart .................................................................................................94 Formatting Your Chart.......................................................................................................94 Selecting Chart Elements ..............................................................................................95 Adjusting Chart Colors and Patterns .............................................................................95 Adding Arrows and Text Boxes....................................................................................95 Adjusting Chart Fonts....................................................................................................96 Working with Chart Elements...........................................................................................96 Adding a Chart Title......................................................................................................96 Working with Legends ..................................................................................................97 Placing the Legend ....................................................................................................97 Working with Axes .......................................................................................................98 Scaling an Axis .........................................................................................................98 Creating Charts with a Percent Scale ............................................................................99 Creating Charts with a Percent Scale: Menu Option.................................................99 Creating Charts with a Percent Scale: Mouse Option................................................99 Adding Data Labels to Your Chart ...............................................................................99 Working with Grids ....................................................................................................100 Inserting Gridlines ..................................................................................................100 Creating Exploding Pie Charts.........................................................................................101 Creating an Exploding Pie Chart.................................................................................101 Exploding an Existing Pie Chart..................................................................................101 Changing the Chart Type ........................................................................................102 Exploding All Pie Slices..........................................................................................102 Exploding a Single Pie Slice....................................................................................102 Charting Extras................................................................................................................102 Printing Chart and Worksheet Data.............................................................................103 Printing the Data and Chart .....................................................................................103 Printing Only the Chart............................................................................................103 Copying Charts to Word..............................................................................................103 Functions: Rank...............................................................................................................104 Functions: Countif and Sumif..........................................................................................106 Countif ........................................................................................................................106 Sumif............................................................................................................................107 Functions: Concatenate....................................................................................................109 Functions: Subtotal..........................................................................................................110

Function Numbers........................................................................................................111 Using the Subtotal Function.........................................................................................111 Filtering........................................................................................................................113 Modifying the Subtotal Function.................................................................................113 Inserting Dates and Times...............................................................................................114 Inserting Dynamic Dates and Times............................................................................114 Inserting a Dynamic Date Only...............................................................................114 Inserting a Dynamic Date and Time........................................................................114 Inserting Static Dates and Times.................................................................................114 Inserting a Static Date..............................................................................................114 Inserting a Static Time.............................................................................................115 Functions in Excel............................................................................................................116 The Absolute Value.....................................................................................................118 The Ceiling of a Number ............................................................................................118 The Floor of a Number................................................................................................118 The Power of a Number...............................................................................................120 The Exponential ..........................................................................................................120 The Log10....................................................................................................................120 The Square Root..........................................................................................................121 Financial Functions .....................................................................................................121 The Future Value of an Investment.............................................................................123 The Number of Periods of an Investment....................................................................124 Investment or Loan Payment.......................................................................................124 The Amount Paid As Interest During a Period ...........................................................126 The Present Value of a Loan or an Investment ...........................................................130 The Interest Rate .........................................................................................................130 The Internal Rate of Return ........................................................................................132 The Net Present Value ................................................................................................134 Logical Function..........................................................................................................137 IF..................................................................................................................................137 Nested IF .....................................................................................................................137 VLOOKUP..................................................................................................................137 HLOOKUP..................................................................................................................140 Index............................................................................................................................142 Match...........................................................................................................................146 Creating a Pivot Table....................................................................................................148 What is a Pivot Table...................................................................................................148 PivotTable Wizard Step 3 of 3.................................................................................150 Graphing Your Report.................................................................................................153 Editing your Graph......................................................................................................154 CUSTOMIZING A PIVOT TABLE...........................................................................155 Redesigning the Pivot Table Report............................................................................155 Including an Additional Data Field..............................................................................156 Using the Page Option..............................................................................................157 Displaying Pages on Separate Worksheets..................................................................158 Grouping Your Data....................................................................................................159

Representing Your Dollar Amounts as Percentages of a Column or a Row...............160 Custom calculations for PivotTable data fields...........................................................161 Function Result......................................................................................................161 Displaying The Detail Data Behind A Summarized Amount......................................162 Sorting a Pivot Table Report........................................................................................162 Collapsing and Expanding a Pivot Table.....................................................................163 Hiding a Row or Column Item.....................................................................................164 Suppressing Subtotals..................................................................................................165 Changing Field Button Labels ....................................................................................170 Automating Excel with Macros...................................................................................171 Macro Tips...................................................................................................................171 Naming a Macro......................................................................................................171 Saving a Macro........................................................................................................172 Assigning Macros ...................................................................................................172 Recording Notes ......................................................................................................172 Accessing the Record New Macro Command ............................................................172 Accessing the Record New Macro Command: Menu Option ................................172 Accessing the Record New Macro Command: Toolbar Option..............................172 Creating & Recording a New Macro...........................................................................174 Running a Macro..........................................................................................................175 Running a Macro: Dialog Box Option.....................................................................175 Running a Macro: Keyboard Option........................................................................175 Suspending a Macro.....................................................................................................176 Deleting a Macro..........................................................................................................176 Advanced Macros........................................................................................................176

Getting Started with Excel


Excel worksheets adapt calculations from paper and the calculator to the computer. Welldesigned worksheets can save hours of work and help you experiment with a wide variety of scenarios with little effort. Before creating a worksheet, you should do some initial planning. Although it is not difficult to change a worksheet, it can take a great deal of time making the necessary adjustments.

Opening Excel Creating a Workbook Entering Text Entering Numbers Entering Dates or Times Saving Your Work

Opening Excel
When Excel is opened, it opens a blank worksheet. An Excel worksheet file is called a workbook. A workbook is the Excel worksheet file in which related data and information for a specific project are stored. A workbook consists of many worksheets, or multiple layers, which are for listing and analyzing data. For more information on Excel terminology, refer to Worksheet Terms. 1. Windows: From the Start menu, select All Programs Microsoft Office Microsoft Office Excel 2003 Macintosh: Double click MACINTOSH HD, select Applications Microsoft Office 2004 Microsoft Excel

Creating a Workbook
An Excel workbook contains multiple worksheets. Worksheets can be used to group information together. A worksheet can contain data, charts, or both.

Creating a Workbook: Menu Option


Windows: 1. From the File menu, The New Workbook task pane appears. 2. Under New, select A new workbook appears. Macintosh: 1. From the File A new workbook appears. menu, select New Workbook select Blank New workbook

Creating a Workbook: Toolbar Option


1. On the Standard A new workbook appears. toolbar, click NEW or

Entering Text
A cell containing text and numbers or only text cannot be used in formulas, even if numbers exist with the alphabetic characters. 1. Select the cell where you want to enter text 2. Type the alpha-numeric text that should be in the cell 3. Windows: To accept the information, press [Enter] or an [Arrow] key To force text to wrap at a specific point in a cell, press [Alt] + [Enter] Macintosh: To accept the information, press [return] or an [arrow] key To force text to wrap, in the Formatting Palette, under Alignment and Spacing, select Wrap Text

Entering Numbers
Numeric cells can be used for calculations and functions. A numeric cell may contain numbers, plus (+), minus (-), currency ($). 1. Select the cell where you want to enter numbers 2. Type the numeric information that should be in the cell HINT: To enter a fraction, type 0 and press [Space] before the fraction; otherwise, Excel will interpret the fraction as a date. 3. Windows: To accept the information, press [Enter] or an [Arrow] key Macintosh: To accept the information, press [return] or an [arrow] key NOTES: Excel automatically right-aligns values and left-aligns text. Do not include spaces or alphabetic characters in a calculation cell.

Entering Numbers as Text


Text formatted cells are treated as text even when a number is in the cell. The cell is displayed as it is entered. 1. From the Format menu, select Cells... The Format Cells dialog box appears. 2. Select the Number tab 3. From the Category scroll list, select Text 4. Click OK 5. Type the desired numbers and/or alphanumeric text that should be in the cell 3

6. Windows: To force text to wrap at a specific point in a cell, press [Alt] + [Enter] Macintosh:To force text to wrap at a specific point in a cell, press [command] + [option] + [return] 7. Windows: To accept the information, press [Enter] or an [Arrow] key Macintosh: To accept the information, press [return] or an [arrow] key

Entering Dates or Times


Entering a Date or Time Manually
1. Select the cell where you want to enter the date or time 2. To enter a date, type the date in one of the following formats: 6/23/2004, 6-232004, or June 23, 2004 To enter a time, type the time NOTE: To indicate AM or PM, leave a space and press [Shift] + [A] or [P], respectively. 3. To accept the information, press [Enter] or [return]

Entering the Current Date or Time Automatically


Windows: 1. To enter today's date, press To enter the current time, press [Ctrl] + [Shift] + [;] 2. To accept the information, press [Enter] Macintosh: 1. To enter today's date, press To enter the current time, press [command] + [;] 2. To accept the information, press [return] [control] + [;] [Ctrl] + [;]

Saving Your Work


Saving for the First Time
The following steps should be used when you are saving a worksheet for the first time, when you want to save it to a new location (perhaps a backup), or when you want to save a copy with a different name. 1. From the File menu, select Save As... The Save As dialog box appears. 2. Windows: From the Save in pull-down list, select the desired save location Macintosh: From the Where pull down list, select the desired save location 3. Windows: In the File name text box, type a filename Macintosh: In the Save As text box, type a filename 4

NOTE: You do not need to type the file extension ".xls." The file extension will be automatically added to the filename. 4. Click SAVE The file is saved.

Saving Subsequent Times


1. From OR the File toolbar, menu, click select SAVE or Save

2. On the Standard The file is saved.

Worksheet Terms
Like all other areas of computer technology, Microsoft Excel worksheets have their own "language." This list of common terms is provided to serve as a reference for you as you work in Excel. Term Cell Cell Pointer Definition The intersection of a column and row. Information is stored in cells. The cell pointer is similar to Word's insertion point. It selects or marks the current cell (where the next activity is going to take place). The Excel pointer changes shape depending on location and corresponding function. For more information, refer to Pointer Shapes. The address (consisting of the column and row IDs) of a specific cell. The current cell location is displayed in the upper left corner of the worksheet. A vertical group of cells within a worksheet. A set of instructions which a calculation based on numbers entered in the cell or numbers entered in other cells (referred to by cell references). All formulas begin with the equal sign ( = ). A pre-programmed formula. The function performs the calculation based on the cells referenced in the function. All functions begin with the equal sign ( = ). A group of cells. Ranges are often referenced for formulas, printing, and designating information to be copied or cut. Ranges can be selected by dragging (also referred to as painting) over the cells. A horizontal group of cells within a worksheet. A number that can be used in an Excel calculation. 5

Cell References Column Formula

Function

Range

Row Value

Workbook

A collection of worksheets contained within a single file.

Worksheet A single layer or single sheet within the workbook. A worksheet can contain data, charts, or both. Instead of compiling all of your information into one worksheet, you can create several worksheets within the one workbook file. With this organization, similar information is grouped together to make it easier to locate and use. The worksheets for your workbook will vary based on its content and purpose. EXAMPLE: If you want one file containing the gradebooks for all sections you teach, each section can be on a separate sheet. NOTE: The terms worksheet and spreadsheet are often used interchangeably.

Editing Cell Contents


This document will cover various editing techniques you can use in Excel.

Moving Information Copying Formulas Using the Fill Command

Moving Information
Often, your first approach at organization will not be the same as your final ideas. For this reason, you may want to reorganize information. Also, you may have the need for a similar formula in a second location. The Drag and Drop, Cut and Paste, and Copy and Paste options will help you do this without having to recreate the entire worksheet.

Drag and Drop vs. Cut and Paste


Drag and Drop allows you to move the information from a single cell or a range of cells. Drag and Drop is great for moving short distances but challenging for moving to cells not displayed on the current screen. The Excel default settings will warn you if you try to drop on cells already containing information. Cut and Paste is the better method when moving information over long distances.

Moving Information: Drag and Drop


In Word, it makes little difference if you Drag and Drop text rather than Cut and Paste it; however, the difference is significant when formulas are involved. When using the Drag and Drop method, cell references are updated. 1. Select the cell(s) to be moved HINTS: To select an individual cell, click that cell. To select multiple contiguous cells, click and drag across the desired cells. 2. Point to and click the heavy border surrounding the cell(s) Windows: The mouse pointer changes to a four-headed arrow . 7

Macintosh:

The

mouse

pointer

changes

to

hand

3. Holding the mouse button, drag the cell(s) to the new location NOTE: An outline of the cell(s) you are moving will appear over the new location. As you move the cell(s), a box appears next to the pointer indicating the cell location. 4. When you reach the desired location, to drop the cell(s), release the mouse button WARNING: If information already exists at the new location, a dialog box will appear asking if you want to replace the information. To undo Drag and Drop: 1. From the Edit menu, select OR On the Standard toolbar, click UNDO Undo Drag and Drop

Moving Information: Cut and Paste


When using Cut and Paste, double check formulas to ensure that cell references are properly updated. 1. Select the cell(s) to be moved HINTS: To select an individual cell, click that To select multiple contiguous cells, click and drag across the desired cells. 2. From the Edit menu, select OR On the Standard toolbar, click CUT A moving border appears around your selection. 3. Select the cell where you want the cell(s) to be pasted 4. From the Edit menu, select OR On the Standard toolbar, click PASTE

cell. Cut

Paste

Copying Formulas
With a relative formula, the cell references change in relation to the new location of the cell. For example, if you copied the formula from column A to B and the formula used a 8

value in cell A12, the formula would now be referring to cell B12. If you cut the formula, it would refer to the original cell, A12. With an absolute formula, in the same example, the cell reference to A12 would remain constant. A formula can have both relative and absolute components. When formulas are created, they are created as relative. By adding a dollar sign ($) before either the column or row location or both, that reference becomes absolute. When copying formulas, cell references are important to the result of the formula. If you want to copy the formula and look at cells with similar information one column over, a relative formula is the best choice. However, if you want to copy the formula and refer to the same cell (perhaps the wage rate of a student employee), you should be working with an absolute formula, not a relative formula. NOTE: Absolute references are automatically updated for column and row additions and deletions. Example =A12+B12 =SUM(A12:A16) =$A$12+$B$12 =$A12+$B12 =SUM(A$12:A$16) Description Formula with relative references Function with relative references Formula with absolute references Formula with absolute column references but relative row references Function with absolute row references but relative column references

=SUM($A$12:$A$16) Function with absolute references

Copy and Paste


Copy and Paste works well for duplicating formulas, values, and labels without reentering them. The process for copying information is similar to copying in Word or other Windows applications. For another option for copying cell information, refer to Using the Fill Command. 1. Select the cell(s) to be copied HINTS: To select an individual cell, click that cell. To select multiple contiguous cells, click and drag across the desired cells. 2. From the Edit menu, select Copy OR On the Standard toolbar, click COPY A moving border appears around your selection. 9

3. Select the cell where you want the cells to be pasted 4. From the Edit menu, OR

select

Paste

On the Standard toolbar, click PASTE 5. To deselect Copy, double click outside the area just pasted or copied

Using the Fill Command


To repeat information to contiguous cells instead of copying cells, you can use the Fill option. If the first cell contains a formula, the formula will be repeated in the additional cells. If the first cell contains text, the text will be repeated in the additional cells. However, with the Fill option, if Excel recognizes a pattern of information, the additional cells will contain the next item in the pattern. For more information, refer to Using the Fill Command.

Calculating with Functions


To create a basic worksheet, some of the core tasks involve entering formulas and functions. Both formulas and functions are instructions for Excel to do calculations for you by referring to values in the worksheet or within the formula.

Working with Functions Writing Formulas and Functions with the Point Method

Working with Functions


There are multiple ways you can create a function. You can insert functions manually (by typing them), or you can use the Insert Function dialog box. The Insert Function dialog box eliminates the possibility of a typing error, so it is the recommended method. For more information on formulas, refer to Performing Calculations in Your Workbook.

Writing Functions with the Insert Function Dialog Box


Determining what functions are available, what function you should be using, and what you need to include in the function is easier with the Insert Function dialog box. The Insert Function dialog box will display a listing of all functions or categories of functions available with Excel. As you select a function (as in the following graphic), a sample of the function appears at the bottom of the dialog box. As you make your selection, the 10

Insert Function dialog box will request certain types of information. You simply select the cells where that information is located. Windows: 1. Place the cell pointer on the cell where the formula should be added 2. From the Insert menu, select Function The Insert Function dialog box appears.

3. From the Or select a category pull-down list, select the appropriate function category or All 4. From the Select a function scroll box, select the desired function HINT: A description of the selected function appears beneath the Select a function scroll box. 5. Click OK The Function Arguments dialog box appears.

6. In the text boxes, type the data to be in the function HINTS: To hide the dialog box so you can select cell ranges with the mouse rather than type them, click COLLAPSE DIALOG . To restore the dialog box, click RESTORE DIALOG . 7. Click OK 11

Macintosh: 1. Place the cell pointer on the cell where the formula should be added 2. From the Insert menu, select Function The Paste Function dialog box appears.

3. From the Function category scroll box, select the appropriate function category or All 4. From the Function name scroll box, select the desired function HINT: A description of the selected function appears beneath the Function category scroll box . 5. Click OK The Function Arguments dialog box appears.

6. In the HINTS:

text

boxes,

type

the

data

to

be

in

the

function 12

To hide the dialog box so you can select cell ranges with the mouse rather than type them, click COLLAPSE DIALOG . To restore the dialog box, click EXPAND DIALOG . 7. Click OK

About the Function Arguments Dialog Box


The Function Arguments dialog box helps you to enter worksheet functions. As you type the function, the Function Arguments dialog box displays the name of the function, the function arguments, a description of the function and its arguments, and the result of the function. Once you have entered a function, you can further edit it using the Function Arguments dialog box. To access the Function Arguments dialog box: 1. Select a cell containing a function 2. On the Formula bar, click INSERT The Function Arguments dialog box appears. FUNCTION

Writing Formulas and Functions with the Point Method


Formulas based on cell references can be "written" by pointing to the cells rather than typing the cell entries. This "point" method can help reduce the chance of error in the formulas and sometimes may make more sense. The point method may not work as well when the cells in question are located in different areas of the worksheet, but the method can be used then as well. The key to the point method is to point to click the cells to be included and to type the operators where appropriate. The following examples provide step-by-step instructions for a simple addition of two cells and for adding a range of cells.

Adding Cells Together


1. 2. 3. 4. 5. 6. 7. Place the insertion point in the cell where the results should be displayed To start the function, press [=] Point and click the first cell to be added Press [+] Point and click the next cell to be added Repeat steps 4-5 as necessary Press [Enter] or [return]

Adding a Range of Cells with the SUM Function: Option 1


13

1. 2. 3. 4. 5. 6. 7. 8.

Place the insertion point in the cell where the results should be displayed To start the function, press [=] Type SUM( Point and click the first cell in the range to be added Press [:] Point and click the last cell to be added Type ) Press [Enter] or [return]

Adding a Range of Cells with the SUM Function: Option 2


1. 2. 3. 4. 5. 6. Place the cell pointer in the cell where the results should be displayed To start the function, press [=] Type SUM( Click and drag the mouse to select the range of cells to be added Type ) Press [Enter] or [return]

Working with Rows and Columns


Excel allows you to adjust your worksheets to achieve the desired look.

Adjusting Row Height and Column Width Using AutoFit to Adjust Rows and Columns Adding and Removing Rows and Columns

Adjusting Row Height and Column Width


When you start working on a worksheet, all columns are eight characters wide and row heights are set to fit the content of the cell with a maximum of 12 points. Depending on what you are doing, this may be perfect, too big, or too small. In addition, Excel may widen the column or increase the row height to fit the cell content. Adjusting the column width or row height is easy to do and can be done using the menu or the mouse option. Since columns and rows extend through the worksheet, the setting applies to the entire column or row. If you need to have two settings, you will have to move some of your information.

Adjusting Row Height: Menu Option


14

1. To adjust a single row, select any cell from Windows: To adjust multiple non-contiguous rows, from each row to Macintosh: To adjust multiple non-contiguous rows, cells from each row to be adjusted 2. From the Format menu, select The Row Height dialog box appears. 3. In the Row height text box, type the desired height 4. Click OK The row height is adjusted.

the row to be adjusted press [Ctrl] + select cells be adjusted press [command] + select Row Height...

Adjusting Row Height: Mouse Option


Using this option, you can only adjust the height of one row at a time. 1. Along the row ID (1, 2, 3, ...), point to the border below the row to be adjusted 2. When the pointer turns into a double-arrow, click and drag HINT: For a shorter row, drag up; for a taller row, drag down. A box appears next to the pointer, indicating the current row height as you drag it.

3. When the row reaches the desired height, release the mouse button The row height is adjusted.

Adjusting Column Width: Menu Option


1. To adjust a single column, select any cell from the column to be adjusted Windows: To adjust multiple non-contiguous columns, press [Ctrl] + select cells from each column to be adjusted Macintosh: To adjust multiple non-contiguous columns, press [command] + select cells from each column to be adjusted 2. From the Format menu, select Column Width... The Column Width dialog box appears. 3. In the Column width text box, type the desired width 4. Click OK The column width is adjusted.

Adjusting Column Width: Mouse Option


Using this option, you can only adjust the width of one column at a time. 15

1. Along the column ID (A, B, C, ...), point to the border right of the column to be adjusted 2. When the pointer turns into a double-arrow, click and drag HINT: For a narrower column, drag left; for a wider column, drag right. A box appears next to the pointer, indicating the current column width as you drag it.

3. When the column reaches the desired width, release the mouse button The column width is adjusted.

Using AutoFit to Adjust Rows and Columns


To adjust the column width or the row height, Excel can determine the best "fit" based on the information in the column or row.

Using AutoFit to Adjust Row Height: Mouse Option


1. Along the row ID (1, 2, 3, ...), point to the border below the row to be adjusted 2. When the pointer turns into a double-arrow, double click The row height adjusts so the largest (tallest) item is displayed in full.

Using AutoFit to Adjust Row Height: Menu Option


1. To select a row to be adjusted, click the ROW ID (1, 2, 3, ...) The entire row is selected. 2. From the Format menu, select Row AutoFit The row height adjusts so the largest (tallest) item is displayed in full.

Using AutoFit to Adjust Column Width: Mouse Option


1. Along the column ID (A, B, C, ...), point to the border right of the column to be adjusted 2. When the pointer turns into to a double-arrow, double click The column width adjusts so the largest (widest) item is displayed in full.

Using AutoFit to Adjust Column Width: Menu Option


1. To select a column to be adjusted, click the COLUMN ID (A, B, C, ...) The entire column is selected. 2. From the Format menu, select Column AutoFit Selection The column width adjusts so the largest (widest) item is displayed in full.

Adding and Removing Rows and Columns


16

When working with worksheets, you will often need to make changes to the original worksheets. You will often need to delete old information or add new information. To make this task easier, you can add new rows and columns or delete existing rows and columns. The process is similar for both rows and columns.

Adding Rows
1. Select a cell below where you want to add a new row 2. From the Insert menu, A new row is added above the selected cell. select Rows

Adding Columns
1. Select a cell to the right of where you want to add a new column 2. From the Insert menu, select A new column is added left of the selected cell. Columns

Deleting Rows
WARNING: When you delete a row, everything in the row is deleted. If you do not want to delete the whole row, delete information from specific cells instead. 1. To delete a single row, select any cell from the row to be deleted Windows: To delete multiple non-contiguous rows, press [Ctrl] + select cells from each row to be deleted Macintosh: To delete multiple non-contiguous rows, press [command] + select cells from each row to be deleted 2. From the Edit menu, select Delete... The Delete dialog box appears. 3. Select Entire row 4. Click OK The row is deleted.

Deleting Columns
WARNING: When you delete a column, everything in the column is deleted. If you do not want to delete the whole column, delete information from specific cells instead. 1. To delete a single column, select any cell from the column to be deleted Windows: To delete multiple non-contiguous columns, press [Ctrl] + select cells from each column to be deleted Macintosh: To delete multiple non-contiguous columns, press [command] + select cells from each column to be deleted 2. From the Edit menu, select Delete... The Delete dialog box appears. 3. Select Entire column 17

4. Click The column is deleted.

OK

Importing an External Data File


Importing data into an Excel worksheet is helpful if you want to use Excel's features to view, process and/or analyze data stored in another file. For example, many people store data in tab-delimited text files or comma-separated values (csv) files because they can be opened from virtually any computer. 1. Windows: From the Data menu, select Import External Data Import Data... The Select Data Source dialog box appears. Macintosh: From the Data menu, select Get External Data Import Text File... The Choose a File dialog box appears. 2. Windows: From the Files of type pull-down list, select All Files (*.*) Macintosh: From the Enable pull-down list, select All Documents 3. Windows: Using the Look in pull-down list, locate and select the file Macintosh: Navigate to and select the file 4. Windows: Click OPEN Macintosh: Click GET DATA The Text Import Wizard appears. 5. Select Delimited or Fixed Width NOTES: The Text Import Wizard automatically selects the display type that it thinks best fits your data. A delimiter is a character that separates pieces of data and was specified when the

18

data

was

created.

6. Click NEXT 7. If your data is delimited, change and/or confirm the delimiters and click NEXT NOTE: The Text Import Wizard automatically selects the delimiter that it thinks is being used (usually Tab), however, if you know it to be something different you can specify a different delimiter such as, Semicolon, Comma, or Space. 8. To set the data format of each column a. In the Data preview section, select a column

19

b. In the Column data format section, select the data format HINT: All of the columns will be automatically formatted as General by the Text Import Wizard. If you are unsure about how to format the data, allow the columns to remain General. 2. Click FINISH The Import Data dialog box appears.

3. To place the data in a new worksheet, select New worksheet 4. To place the data in the existing worksheet, a. Select Existing worksheet b. Click COLLAPSE DIALOG The Import Data dialog box is collapsed. c. Select the cell where the imported data should begin d. Click RESTORE DIALOG The Import Data dialog box is restored. 5. Click Your data appears in the designated location.

or or OK

Working with Comments


Comments are notes that are inserted into your worksheet. Comments can be used for many things including adding notes for other users, adding reminders for yourself, and creating cross-references to other reports.

The Reviewing Toolbar Adding Comments Editing Comments Displaying/Hiding Comments Deleting Comments Printing Comments 20

The Reviewing Toolbar


The Reviewing toolbar is used to edit, navigate through, display/hide, and delete comments. To display the Reviewing toolbar: Windows: 1. From The the View menu, Reviewing select Toolbars toolbar Reviewing appears.

Macintosh: 1. From The the View menu, Reviewing select Toolbars toolbar Reviewing appears.

Adding Comments
Adding a comment to a cell allows you place additional information within that cell. The comment, along with the username of the person who inserted the comment, appears when you point to the cell.

Adding Comments: Menu Option


1. Select the cell to which the comment will be added 2. From the Insert menu, select Comment The Comment box appears with your username. 3. Type your comment 4. Click another cell A red triangle appears in the upper right-hand corner of the cell indicating a comment has been attached. When you place your mouse over the cell, the comment appears. Cell with comment Text of comment revealed

Adding Comments: Mouse Menu


21

1. Windows: Right click the cell to which you want to add a comment select Insert Comment Macintosh: Press [control] + click the cell to which you want to add a comment select Insert Comment The Comment box appears with your username. 2. Type your comment 3. Click another cell A red triangle appears in the upper right-hand corner of the cell indicating a comment has been attached. When you place your mouse over the cell, the comment appears.

Adding Comments: Toolbar Option


1. Select the cell to which the comment will be added 2. On the Reviewing toolbar, click NEW COMMENT The Comment box appears with your username. 3. Type your comment 4. Click another cell A red triangle appears in the upper right-hand corner of the cell indicating a comment has been attached. When you place your mouse over the cell, the comment appears.

Editing Comments
Editing a comment allows you to add to or change the information you have placed within a cell as a comment.

Editing Comments: Menu Option


1. Select the cell that contains the comment to be edited 2. From the Insert menu, select The Comment box appears. 3. Make the appropriate changes to the comment 4. Click another cell Edit Comment

Editing Comments: Mouse Option


1. Windows: Right click the cell which contains the comment select Edit Comment Macintosh: Press [control] + click the cell to which you want to add a comment select Edit Comment The Comment box appears. 2. Make the appropriate changes to the comment 3. Click another cell

Editing Comments: Toolbar Option


22

1. Select the cell that contains the comment to be edited NOTE: On the Reviewing toolbar, the New Comment button now changes to the Edit Comment button 2. On the Reviewing toolbar, click EDIT COMMENT The Comment box appears. 3. Make the appropriate changes 4. Click another cell

Displaying/Hiding Comments
To have comments remain on the screen or disappear from the screen when your pointer is not "over" the cell, use one of the following sets of directions.

Displaying/Hiding Comments: Single Cell


1. Windows: Right click the cell which contains the comment select Show Comment or Hide Comment Macintosh: Press [control] + click the cell to which you want to add a comment select Show Comment or Hide Comment

Displaying/Hiding Comments: Toolbar Option


1. Select the cell which contains the comment 2. On the Reviewing toolbar, click SHOW/HIDE COMMENTS NOTE: When you click to show, the comment appears next to the selected cell. When you click to hide, the comment disappears.

Displaying/Hiding Comments: All Cells


1. On the Reviewing toolbar, click SHOW/HIDE ALL COMMENTS NOTE: Selecting Comments acts as a toggle turning comments on/off.

Deleting Comments
Deleting comments allow you to either remove the comment you have placed within an individual cell, or to remove all of the comments you have placed within a document.

Removing Comments from a Single Cell: Menu Option


1. Select the cell with the comment to be deleted 2. From the Edit menu, select Clear Comments

Removing Comments from a Single Cell: Mouse Option


1. Windows: Right click the cell which contains the comment select Delete Comment 23

Macintosh: Press [control] + click the cell to which you want to add a comment select Delete Comment

Removing Comments from a Single Cell: Toolbar Option


1. Select the cell which contains the comment to be deleted 2. On the Reviewing toolbar, click DELETE COMMENT

Removing Comments from All Cells: Menu Option


1. Open the sheet with the comments to be deleted 2. From the Edit menu, select The Go To dialog box appears. 3. Click The Go To Special dialog box appears. 4. Select Comments 5. Click All comments on the active sheet will be selected. 6. From the Edit menu, select Clear Comments Go To SPECIAL... OK

Printing Comments
Comments must be displayed before printing. Windows: 1. Open the worksheet that contains the comments you want to print 2. From the File menu, select Page Setup... The Page Setup dialog box appears. 3. Select the Sheet tab 4. To print all comments in a group, under Print, from the Comments pull-down list, select At end of sheet To print comments as they appear, under Print, from the Comments pull-down list, select As displayed on sheet NOTE: Only displayed comments will print for the second option. 5. Click PRINT... The Print dialog box appears. 6. Make the appropriate selections Click OK Macintosh: 1. Open the worksheet that contains the comments you want to print 2. From the File menu, select Page The Page Setup dialog box appears. 3. Select the Sheet tab Setup...

24

4. To print all comments in a group, under Print, from the Comments pull-down list, select At end of sheet To print comments as they appear, under Print, from the Comments pull-down list, select As displayed on sheet NOTE: Only displayed comments will print for the second option. 5. Click OK 6. From the File menu, select Print... The Print dialog box appears. 7. Make the appropriate selections 8. Click PRINT

Using the Fill Command


Rather than using copy and paste, you can use the Fill command to repeat information to contiguous cells. If the first cell contains a formula, the formula will be repeated in the additional cells. If the first cell contains text, the text will be repeated in the additional cells. NOTE: If Excel recognizes a pattern in the information you entered, the additional cells will contain the next item in the pattern. For example, if the first cell contains the day Sunday, Excel will fill the following cells with Monday, Tuesday, etc. Other examples include filling for the months of the year and hours of the day.

Filling Cells Creating Custom Fills

Filling Cells
Filling Cells: Menu Option
This option copies (repeats) the information from one cell to another. To extend the series, refer to the Mouse Option. 1. Type the information (cell contents or formula) in the first cell of the group 2. Starting with the cell containing the contents to be copied, select the group of cells to be filled 3. From the Edit menu, select Fill Down or Right OR Windows: Press [Ctrl] + [D] or [Ctrl] + [R], respectively Macintosh: Press [control]+ [D] or [control] + [R], respectively 25

Filling Cells: Mouse Option


Using this option will extend the data in the series to the selected cells. 1. Type the information (cell contents or formula) in the first cell of the group 2. In this cell, move your pointer over the fill corner so your pointer changes into crosshairs NOTE: Before filling, verify that the pointer changes into crosshairs.

3. When your pointer changes into crosshairs, click and hold the crosshairs 4. Drag the crosshairs in the direction you want the information to be copied NOTES: You can drag the corner in any one direction either to the left, right, up, or down. You can move in only one direction at a time. 5. Release the mouse button The information is extended.

Creating Custom Fills


Custom fills allow you to select what information you want repeated. For example, if you typed the UW-Eau Claire terms (Fall, Winterim, Spring, Interim and Summer) several times, custom fills allows you to automate the process. Using the regular Fill function would start at Fall and would repeat Fall over and over again. With a custom fill, when you type Fall and use the Fill command, Winterim, Spring, Interim, and Summer will be entered in the adjacent cells. This feature is also handy when using Excel to create a grade book. For example, you could create a Custom Fill for letter grades (e.g., A, A-, B+, B, B-, ..., F). NOTE: Custom fills will work only with word lists. Lists of values do not work consistently.

Creating a Custom Fill


Windows: 1. From the Tools menu, select Options The Options dialog box appears. 2. Select the Custom Lists tab 3. From the Custom lists scroll box, select NEW LIST 4. In the List entries text box, type the information you want to be added in the custom fill, pressing [Enter] after each entry 26

EXAMPLE:

A,

A-,

B+,

B,

B-,

...,

5. Click ADD Your new entries appear in the Custom lists scroll list. 6. Click OK Macintosh: 1. From the Excel menu, select Preferences The Preferences dialog box appears. 2. From the list on the left, select Custom Lists 3. From the Custom lists scroll box, select NEW LIST 4. In the List entries text box, type the information you want to be added in the custom fill, pressing [return] after each entry

27

EXAMPLE:

A,

A-,

B+,

B,

B-,

...,

5. Click ADD Your new entries appear in the Custom lists scroll box. 6. Click OK

Importing Custom Fills


1. Select the cells which contain the information you want to repeat NOTE: Excel will use only the information you select and will not continue trends. 2. Windows: From the Tools menu, select Options... The Options dialog box appears. Macintosh: From the Excel menu, select Preferences... The Preferences dialog box appears. 3. Windows: Select the Custom Lists tab Macintosh: From the list on the left, select Custom Lists

28

4. Click Your

selection

appears

in

the

List

entries

IMPORT text box.

5. Click You are returned to your data sheet.

OK

Using a Custom Fill


1. To use your custom fill, place the cell pointer in any cell and type the first entry EXAMPLE: A 2. With the pointer positioned over the fill corner, click and hold the mouse button 3. Drag the corner in the direction you want the information to be copied NOTE: For more information about filling cells, refer to Filling Cells: Mouse Option. 4. Release the mouse button The cells will be filled with the information you provided.

Using the Paste Special Feature


Excel's standard Copy and Paste feature works for a wide variety of situations; however, occasions may arise when it does not meet your needs. For example, if you want the results of a formula but no longer need the formula itself, you can isolate the results using the Paste Special command. Additional Paste Special options include the following:

All (the default) Formulas Values Formats Comments Validation 29

All except borders Column widths Formulas and number formats Values and number formats

Example: To copy and paste only the results of a formula:


1. Select the cell(s) whose values should be copied 2. From the Edit menu, A moving border appears around your selection. 3. Select the first cell where the results should be pasted 4. From the Edit menu, select The Paste Special dialog select Paste box Copy Special... appears.

5. Under Paste, select Values 6. Click The results of the formula are pasted into the selected cell(s).

OK

Using the Find and Replace Features


The Find and Replace features are time-saving techniques that allow you to rapidly change the content of your worksheets.

Using the Find Feature Using the Replace Feature

Using the Find Feature


30

The Find feature can be helpful if you are trying to locate information not currently visible on the screen. You can search for information used in formulas, values, and notes.

Finding Information
1. From the Edit menu, select Find... OR Windows: Press [Ctrl] + [F] The Find and Replace dialog box appears. Macintosh: Press [control] + [F] The Find dialog box appears. 2. In the Find what text box, type the text or data to be found 3. OPTIONAL: Adjust the searching options 4. Click FIND NEXT The information is found and selected. NOTES: Clicking FIND NEXT again finds subsequent occurrences of the information in the document. If Excel cannot find the information you are looking for, a message to that effect will be displayed. 5. To close the dialog box, click CLOSE

Searching Options
You can limit the results of a search by using the available search options. 1. Windows: From the Find and Replace dialog box, click OPTIONS Macintosh: From the Find or Replace dialog box, select the following search options. Option Windows Format... Within Search Look In Match case Description Only: Match content when specific formatting is applied. Specify the search area (i.e., worksheet or workbook). Control the order of the search: left to right (columns) or top to bottom (rows). Limit the search to type of content: values, formulas, comments. Limit search results to cells in which the case is an exact match. EXAMPLE: Spring instead of spring. Match entire contents cell Limit search results to cells where an exact match occurs. EXAMPLE: Smith will locate Smith but not Chris Smith.

31

Using the Replace Feature


The Replace feature is useful when you want to change the same piece of information throughout your worksheet. NOTES: Use the Replace option to replace each occurrence of the information individually. Clicking FIND NEXT will advance to and review subsequent occurrences. WARNING: Use the Replace All option with caution. If you do not first select specific cells to change, this option will replace the selected information throughout the entire document.

Replacing Information
1. OPTIONAL: If you do not want to replace the information throughout the entire document, select only those cells you want to change Windows: To select non-contiguous cells, hold down [Ctrl] + click the desired cell(s) Macintosh: To select non-contiguous cells, hold down [command] + click the desired cell(s) 2. From the Edit menu, select Replace... OR Windows: Press [Ctrl] + [H] The Find and Replace dialog box appears. Macintosh: Press [control] + [H] The Replace dialog box appears. 3. In the Find what text box, type the text or data to be found 4. In the Replace with text box, type the text or data to replace the information found 5. OPTIONAL: Adjust the searching options 6. Click FIND NEXT The first occurrence is highlighted. 7. Click REPLACE or REPLACE ALL The old information is replaced with the new. WARNING: Use the Replace All option with caution. If you do not first select specific cells to change, this option will replace the selected information throughout the entire document. 8. To close the dialog box, click CLOSE

32

Establishing Criteria
Excel needs criteria as a special feature for certain types of database functions. Criteria can be defined as the range of cells that includes the column label and a condition for that label. Criteria can be established to match a single field or multiple fields. It can be established for records to match multiple conditions (AND), match one of multiple conditions (OR), or match a range of conditions (BETWEEN). The criteria can be looking for an exact match or a match within a range of information. Using range names may make database functions easier to write.

Types of Conditions Defining a Single Criterion Defining Multiple Criteria

Types of Conditions
To properly write criteria, it is important to understand how to format the condition for each criterion. There are three different formats: alphabetic conditions, numeric conditions, and date conditions. The following tables illustrate the conditions, the corresponding format, and a sample for each criteria.

Alphabetic Conditions
Condition exact match begins with greater or equal to less or equal to between* Format ="=text_string" text_string than >letter >=letter than <letter <=letter >letter <letter Sample ="=john" john >j >=j <j <=j >j <q

*must be in separate cells within the same row

Numeric Conditions
Condition exact match Contains greater or equal to Format value n/a than >value >=value Sample 15 n/a >15 >=15 33

less or equal to between*

than <value <=value >value <value

<15 <=15 >15 <25

*must be in separate cells within the same row

Date Conditions
Condition Format one date contains month/day/year n/a Sample 4/1/1999 n/a >4/1/1999 >=4/1/1999 <4/1/1999 <=4/1/1999

date after >month/day/year or equal to >=month/day/year date <month/day/year before <=month/day/year or equal to

range of >month/day/year<month/day/year >1/1/1999<12/31/1999 dates* *must be in separate cells within the same row

Defining a Single Criterion


A single criterion defines a condition that when the database is searched, will return only one type of match for the particular field. The field name goes in the first cell; the condition for that field goes below the field name.

Format
Field name condition

Example
Pay Period 15

NOTE: In this example, only records where the pay period was equal to 15 would be evaluated for the database function.

Defining Multiple Criteria


Multiple criteria define conditions that when the database is searched, will return two or more matches. If both conditions must be met, the criteria need to be set up as AND. If a range of conditions must be met, the criteria need to be set up as BETWEEN. However, if only one of multiple conditions must be met, the criteria should be set up as OR. 34

AND Match Two Conditions


For "AND" criteria, the fields are within the same row.

Format
Field name condition field name2 condition

Example
Pay Period 15 Student Johnson

NOTE: In this example, only records where the pay period is 15 and the student name contains Johnson would be evaluated for the database function.

BETWEEN ... Match Two Conditions


For "BETWEEN" criteria, the field is repeated in separate cells within the same row.

Format
Field name condition Field name condition

Example
Date Date >3/31/2001 <6/30/2001

NOTE: In this example, only records between March 31, 2001 and June 30, 2001 would be evaluated for the database function.

OR ... Match Either of Two Conditions (Same Field)


For "OR" criteria with the same field, the field criteria are listed in a column under the field name.

Format
Field name condition condition

Example
Pay Period 15 16

NOTE: In this example, only records where the pay period is 15 or 16 would be evaluated for the database function.

OR Match Either of Two Conditions (Different Fields)


For "OR" criteria with different fields, the conditions are listed under the appropriate field name but in separate rows so that they are not treated like "AND" conditions.

35

Format
Field name condition Field name 2 condition

Example
Pay Period Student 15 Doe

NOTES: In this example, records where the pay period is 15 or the student name contains Doe would be evaluated for the database function.

Filtering Your Database


Using a filter allows you to work with a portion of the records in your database by extracting only records that match a set of criteria.

Cautions for Working with Filters Using AutoFilter Using Advanced Filter

Cautions for Working with Filters


Commands in Excel can have different results on database records while using filters. NOTE: The pull-down lists located at each column heading help remind you that the filtering is turned on. Some effects of filtering a database include the following:

Cell formatting affects only visible cells in the database. When printing the database, only visible cells will be printed. The Sort command will affect visible cells. When deleting data from the database, entire rows must be deleted. Most of the Edit menu commands affect entire rows, not individual fields (cells).

Using AutoFilter
36

AutoFilter works for most filtering needs, but when you have complex criteria or want to create a copy of the information, use Advanced Filter. The AutoFilter command applies pull-down lists directly to the column headings in the database. These menus are used to select the field contents, which determine what records will display.

Activating AutoFilter
1. Select a cell within the database 2. From the Data menu, select Filter AutoFilter A pull-down list will be placed next to each column heading within the selected database.

Running AutoFilter
1. Activate AutoFilter 2. From the appropriate pull-down list, select a value to use as filter criteria Rows meeting the filter criteria are now displayed. NOTE: When you use AutoFilter within a database, the row numbers will turn blue, and the results of the filter will appear in the status bar (e.g., 1 of 12 records found).

Using Custom Filter


A custom filter allows you to select a "range" of information or set multiple criteria. 1. Activate AutoFilter 2. Windows: From the appropriate pull-down list, select (Custom) Macintosh: From the appropriate pull-down list, select (Custom Filter)

37

The

Custom

AutoFilter

dialog

box

appears.

3. From the Comparison Operator pull-down list, select a type of comparison 4. From the Corresponding pull-down list, select or type a criteria value 5. OPTIONAL: If you want multiple criteria, select either And or Or and repeat steps 3 and 4 6. Click OK NOTE: When you use AutoFilter within a database, the row numbers will turn blue.

Turning Off the AutoFilter


1. From the Data menu, select Filter AutoFilter NOTE: AutoFilter is active if a checked box appears before it; it is inactive if no checked box is present.

Using Advanced Filter


The Advanced Filter command allows you to extract the records in your database based on a criterion and then move the results to a different location on the current worksheet. It also allows you to place the results onto a new worksheet so that you can overcome the problems of using certain features of Excel (printing, formatting, and editing options) while your database is filtered. Advanced Filter has advantages not offered by the AutoFilter command. For example, it allows you to filter using complex "and/or" criteria.

Before You Start


Creating a criteria range A criteria range consists of at least two rows. The first row must contain a column label(s). The other row(s) contains your filtering condition. Additionally, at least one blank row must be between the criteria range and your database. For examples of which criteria may be used, refer to Establishing Criteria. Establishing a Placement Location (optional) A placement location is a row with column headings for the types of information you 38

want to place in a different location. You do not need to include all the headings of the original database and the headings that you do use can be in a different order. For example, you may have a large database of conference attendees and want to filter only the attendees' names and whether their registration fee has been paid and send that data to another sheet in your workbook. WARNING: If there is any information under the headings for the placement location, it will be deleted. As a precaution, you may want to place the placement headings on a separate sheet in the workbook file.

Running an Advanced Filter


1. Create a criteria range within your worksheet NOTE: For more information, refer to Establishing Criteria. 2. Select any cell within your database 3. From the Data menu, select Filter Advanced Filter... The Advanced Filter dialog box appears.

4. If you want the filter to replace the current database, select Filter the list, in-place NOTE: If you do not want the filter to replace the current database, refer to Copying an Advanced Filter to a Second Location. 5. In the List range text box, type the range of cells containing your database OR To minimize the Advanced Filter dialog box so you can select the range of cells manually, a. Click COLLAPSE DIALOG or b. Select the cells c. Click RESTORE DIALOG or 2. In the Criteria range field, type the range of cells or the range name containing the criteria OR To minimize the Advanced Filter dialog box so you can select the range of cells manually, a. Click COLLAPSE DIALOG or b. Select the cells 39

c. Click RESTORE DIALOG or 3. Click NOTE: With a filtered "in-place" database, the row numbers will turn blue.

OK

Turning Off Advanced Filter


To remove filters applied to all columns in a range or list: 1. From the Data menu, select Filter Show All

Copying an Advanced Filter to a Second Location


1. Create a criteria range within your workbook NOTE: For more information, refer to Establishing Criteria. 2. OPTIONAL: Create a placement location within your workbook NOTES: For more information, refer to Establishing a Placement Location. A placement location is not necessary if you will be using the same headings in the same order as your original database. 3. Select a cell within your database NOTE: If you are using a placement location, you should not select one of the heading cells. 4. From the Data menu, select Filter Advanced Filter... The Advanced Filter dialog box opens. 5. To create a second set of information, select Copy to another location 6. In the List range text box, type the range of cells containing your database OR To minimize the Advanced Filter dialog box so you can select the range of cells manually, a. Click COLLAPSE DIALOG or b. Select the cells c. Click RESTORE DIALOG or 2. In the Criteria range text box, type the range of cells or the range name containing the criteria OR To minimize the Advanced Filter dialog box so you can select the range of cells manually, a. Click COLLAPSE DIALOG or b. Select the cells c. Click RESTORE DIALOG or 3. In the Copy to text box, type the range of cells to which you want to copy the filter OR To minimize the Advanced Filter dialog box so you can select the range of cells manually, a. Click COLLAPSE DIALOG or 40

b. Select the cells c. Click RESTORE DIALOG 4. Click OK

or

Using the Sort Command


The Sort command will arrange the records (rows) in your database according to the contents of a particular column. Excel will sort the following in ascending order: numbers, text, logical values, error values, and blank cells. A descending sort will reverse the above order, except for blank cells, which are always sorted last. NOTE: Once data is sorted, subgroups can be subtotaled. For more information, refer to Calculating Subtotals in Databases. 1. Select a cell in the column to be sorted 2. From the Data menu, The Sort dialog select box Sort... appears.

3. From the Sort by pull-down list, select the column by which you want to sort NOTE: If column IDs appear instead of column titles, under My data range has in Windows or under My list has on Macintosh, select Header row. 4. Select Ascending or Descending 5. OPTIONAL: To sort by more than one column, a. From the Then by pull-down list(s), select the column(s) by which you want to sort 41

b. Select Ascending or Descending 2. OPTIONAL: To control how to sort lists of days or months, case-sensitive data, and the sort's orientation, a. Click OPTIONS... The Sort Options appears. b. Make any necessary changes c. Click OK 3. Click OK The data is sorted.

Analyzing Your Database with Functions


Database functions can make your worksheet more useful by extracting information about the data in a form that will answer a question or help in deciding the best way to spend your resources. Whether in your office, school, or preparation for an important meeting, database functions can be an important way to analyze your information. For information on subtotals, refer to Calculating Subtotals in Databases.

Defining the Syntax of Database Functions Performing a Database Functions Examples of Database Functions

Defining the Syntax of Database Functions


All database functions use the same format for calculations. The format is the following:

=function(database,field,criteria)
Database Refers to the range of cells that make up the database. This includes the row with the field names identifying the type of information in each column. Field Indicates which field will be analyzed and used in the function. The field can be referred to as the position number of the column or the field label within quotes. Criteria Criteria is the range of cells containing the conditions by which Excel will identify records to be evaluated to complete the function. Criteria must have a column label and at least one condition in the cell below its range. For more information, refer to Establishing Criteria. 42

Performing Database Functions


Before performing a database function, you must create the criteria for the function. If you have not already established your criteria, refer to Establishing Criteria. Windows: 1. Place the cursor in the cell where you want the results of the function to appear 2. On The the Formula Insert Bar, click Function INSERT dialog FUNCTION box appears.

3. From the Or select a category pull-down list, select Database 4. From the Select a function scroll list, select the appropriate function 5. Click OK The Function Arguments dialog box appears. 6. To complete the Database, Field, and Criteria text boxes, NOTE: For a definition of these terms, refer to Defining the Syntax of Database Functions. a. Select the appropriate text box b. Click COLLAPSE DIALOG c. Select the data range d. Click RESTORE DIALOG e. Repeat steps a-d until all text boxes are completed 2. To perform the function, click OK Macintosh: 1. Place the cursor in the cell where you want the results of the function to appear 43

2. On The

the

Standard toolbar, Paste Function

click PASTE FUNCTION dialog box appears.

3. From the Function Category list, select Database 4. From the Function name scroll list, select the appropriate function NOTE: A description of the selected function appears below the lists. 5. Click OK The respective dialog box appears. 6. To complete the Database, Field, and Criteria text boxes, NOTE: For a definition of these terms, refer to Defining the Syntax of Database Functions. a. Select the appropriate text box b. Click COLLAPSE DIALOG c. Select the data range d. Click RESTORE DIALOG e. Repeat steps a-d until all text boxes are completed 2. To perform the function, click OK

Examples of Database Functions


For more information on how to perform any of these functions, refer to Performing a Database Function, which provides information on the Insert Function dialog box. The table in this section summarizes the most commonly used database functions and is based on the following Excel database:

44

DSUM: Adds the numbers in the field column of records in the database that match the criteria. Syntax Example =DSUM(database, field, criteria) To calculate the total amount that Chris was paid, type the following function: =DSUM(C3:G15,G3,C31:C32) field as cell 31 reference =DSUM(C3:G15,5,C31:C32) field as column 32 =DSUM(C3:G15,"$period",C31:C32) field as field name 280.80 C Student Chris

Results

DAVERAGE: Averages the values in the field column of records in the database that match the criteria. Syntax Example =DAVERAGE(database, field, criteria) To calculate the average number of hours that the students worked during pay period 14, type the following function: 34 =DAVERAGE(C3:G15,F3,E34:E35) field as cell reference 35 =DAVERAGE(C3:G15,4,E34:E35) field as column =DAVERAGE(C3:G15,"Hours",E34:E35) field as field name 13 hours E PP# 14

Results

DCOUNT: Counts the cells containing numbers that match the criteria in the field column 45

of records in the database. Syntax Example =DCOUNT(database, field, criteria) To count the number of pay periods in which the hours are greater than 12 and less than 10, type the following function: 44 =DCOUNT(C3:G15,C3,H44:H45) field as cell reference 45 =DCOUNT(C3:G15,1,H44:H46) field as 46 column =DCOUNT(C3:G15,"PP#",H44:H46) field as field name 8 pay periods H Hours >12 <10

Results

DCOUNTA: Counts the cells containing non-numerical data that match the criteria in the field column of records in the database. Syntax Example =DCOUNTA(database, field, criteria) To count the number of students that were paid $5.40, type the following function: =DCOUNTA(C3:G15,D3,C40:D41) field as cell reference 40 =DCOUNTA(C3:G15,2,C40:D41) field as 41 column =DCOUNTA(C3:G15,"Student",C40:D41) field as field name 1 student C Pay rate 5.40

Results

DGET: Locates a single record matching the specified criteria and displays the results of the requested field. If multiple records meet the criteria, an error message will occur. Syntax Example =DGET(database, field, criteria) To display the student who worked 15 hours during a pay period, type the following function: 37 =DGET(C3:G15,D3,G37:G38) field as cell 38 reference> =DGET(C3:G15,2,G37:G38) field as column =DGET(C3:G15,"Student",G37:G38) field as field name Chris G Hours 15

Results

DMAX: Returns the highest number for the field column of records matching the criteria. 46

Syntax Example

=DMAX(database, field, criteria) To determine the maximum number of hours worked during pay period 16, type the following function: 37 =DMAX(C3:G15,F3,E37:E38) field as cell 38 reference =DMAX(C3:G15,4,E37:E38) field as column =DMAX(C3:G15,"Hours",E37:E38) field as field name 11 hours E PP# 16

Results

DMIN: Returns the smallest number for the field column of records matching the criteria. Syntax Example =DMIN(database, field, criteria) To determine the minimum number of hours worked during pay period 16, type the following function: 37 =DMIN(C3:G15,F3,E37:E38) field as cell 38 reference =DMIN(C3:G15,4,E37:E38) field as column =DMIN(C3:G15,"Hours",E37:E38) field as field name 8 hours E PP# 16

Results

Working with Range Names


Range names refer to a specific group of cells. They are often used for cell references in functions and for printing.

Naming Ranges: Tips Creating Range Names Adjusting Range References Deleting Range Names Using Range Names in Formulas/Functions Using Range Names: Additional Options 47

Naming Ranges: Tips


The name should be descriptive (grades is more descriptive than range1). The first character must be a letter or an underscore character. Other characters can be letters, numbers, or periods. The name cannot look like a cell reference (e.g., "A1", "R1C1"). To separate words, the underscore character or a period must be used instead of a space. The name can be up to 255 characters long. The names are not case sensitive; they can contain upper and lowercase letters. If you name one range BUDGET and a second range Budget, Excel will overwrite the first range with the second one.

Creating Range Names


Creating Range Names: Dialog Box Option
1. Select the data to be included in the range 2. From the Insert menu, select Name OR Windows: Press [Ctrl] + Macintosh: Press [command] + The Define Name dialog box Define... [F3] [F3] appears.

3. In the Names in workbook text box, type the desired range name 4. Click OK The range name is created.

Creating Range Names: Name Box Option


1. Select the cells to be included in the range 2. In the Name Box, highlight the currently appearing range name HINT: On Macintosh, if the Name Box does not appear, from the View menu, 48

select

Formula

Bar.

3. Type the desired range name 4. Windows: Macintosh: Press The range name is created.

Press [return]

[Enter]

Creating Range Names: Multiple Range Names


You may want to assign names to multiple ranges in your worksheet without having to follow a separate dialog box process for each range. 1. From the Insert menu, select Name The Define Name dialog box appears. 2. In the Names in workbook text box, type the desired range name 3. In the Refers to text box, type the range OR To select the cells, Define... of cells

a. Windows: Click COLLAPSE DIALOG Macintosh: Click COLLAPSE DIALOG b. Select the cells to be included in the range HINT: To select non-contiguous cells, press the [Ctrl] key for Windows or the [command] key for Macintosh while clicking the cells. c. Windows: Click RESTORE DIALOG Macintosh: Click EXPAND DIALOG 2. Click ADD 3. Repeat steps 2-4 as necessary for additional ranges 4. Click OK The range names are created.

Adjusting Range References


Adjusting range references allows you to modify the cell references, formulas, and constants included in the range. 1. From the Insert menu, select Name Define... The Define Name dialog box appears. 2. From the Names in workbook scroll box, select the range name whose cell reference, formula, or constant you want to change 3. In the Refers to text box, change the reference, formula, or constant 4. Click OK The range reference(s) are adjusted.

Deleting Range Names


49

To delete a range name, use the following directions: 1. From the Insert menu, select Name Define... The Define Name dialog box appears. 2. From the Names in workbook scroll box, select the range name to be deleted 3. Click DELETE 4. To delete other range names, repeat steps 2-3 as necessary 5. Click OK The range name(s) are deleted.

Using Range Names in Formulas/Functions


When writing functions, referring to a range name rather than using the cell references reduces the chance of errors. Range names can be used almost anywhere that you would enter a range of cell references. Common uses of range names are in formulas, functions, and print ranges. When writing a function, simply use the range name instead of the cell references. A SUM formula is written as follows: EXAMPLE: =SUM(C3:C15) With the range C3:C15 named Payroll, the function could also be written as follows: EXAMPLE: =SUM(Payroll) Both functions will yield the same result. The second is often easier to write, understand, and troubleshoot. If you cannot recall a range name when you are writing a function/formula, you can use one of the following methods to determine your names and to include them in the function/formula.

Using Range Names in Functions: List Option


1. Begin creating your formula/function 2. To add the range name, press [F5] The Go To dialog box appears. 3. Under Go To, select the desired range name 4. Click OK 5. Continue creating your formula/function, repeating steps 2-4 as necessary to add other range names

Using Range Names in Functions: Typing Option


If you know the range name you want to use and do not need to see the range name list, follow these instructions: 1. Begin creating your formula/function 50

2. To add the range name, type it into the formula/function EXAMPLE: =SUM(RangeName) 3. Continue creating your formula/function, repeating step 2 as necessary to add other range names

Using Range Names: Additional Options


To move to a specific cell on a worksheet, you can use the Go To command and your range names. The Go To command is useful when moving between ranges. For more information, refer to Using the Go To Command. Range names can also be used to help you define a printing area. For instructions on how to print ranges, refer to Printing a Range of Cells.

Calculating Subtotals in Databases


Calculating subtotals based on subgroups of information is made easier with the Data Subtotal command. Once the data is sorted, Excel can add subtotals based on data within the database, automatically inserting a new row and adding an appropriate total heading for each line.

Adding Subtotals Adjusting Views with Subtotals Removing Subtotals Re-sorting the Data

Adding Subtotals
1. Sort the data NOTES: For more information, refer to Using the Sort Command. Sorting the database is important for grouping the information you want subtotaled. If you do not have column labels on what you are subtotaling, Excel will prompt you to enter column labels or to choose the top row as your column labels. Be aware that if you choose the first row as your column labels, that data will not be included in the subtotals. 2. Select a cell within the database 51

3. From The

the Subtotal

Data dialog

menu, box

select

Subtotals... appears.

4. 5. 6. 7.

From the At each change in pull-down list, select the desired option From the Use function pull-down list, select the desired function From the Add subtotal to scroll box, select the desired column label OPTIONAL: At the bottom of the dialog box, select/deselect the appropriate options 8. Click OK Subtotal lines are added to the database along with outlines for adjusting the view of the data.

Adjusting Views with Subtotals


When you have applied subtotals to your database, an outline-type bar appears to the left of the row IDs. The represents the levels of the view. Level 1: grand total Level 2: subtotals and grand total Level 3: all data in the database To expand the view one level: 1. Click the plus sign To collapse the view one level: 1. Click the minus sign

52

Removing Subtotals
If you no longer need the subtotals, you can easily remove them with a command rather than deleting each row. To remove the subtotals, use the following instructions: 1. Select a cell within the database 2. From the Data The Subtotal dialog box appears. 3. Click The subtotals are removed. menu, REMOVE select Subtotals... ALL

Re-sorting the Data


If you re-sort the database, Excel will warn you that it will remove the subtotals and resort. After the database has been sorted, you can add subtotals again.

Organizing Worksheets
Organizing the worksheets within your workbook files can make your Excel documents easier to maintain and manage.

Renaming Worksheet Tabs Changing Worksheet Tab Colors Inserting Worksheets Moving Worksheets Copying Worksheets Deleting Worksheets

Renaming Worksheet Tabs


The tabs on the bottom of the worksheets contain the name of each worksheet. You can change the default name of the worksheet to describe its contents.

Renaming Worksheet Tabs: Menu Option


1. Click anywhere within the sheet to be renamed 2. From the Format menu, select The sheet name within the tab is selected. Sheet Rename 53

3. Type the new sheet name 4. Press [Enter] The worksheet is renamed.

or

[return]

Renaming Worksheet Tabs: Mouse Option


1. To select the sheet name, double click the appropriate SHEET tab 2. Type the new sheet name 3. Press [Enter] The worksheet is renamed. or [return]

Changing Worksheet Tab Colors


Coloring worksheet tabs can make specific worksheets easier to locate within a large workbook. Windows only:

Changing Worksheet Tab Colors: Menu Option


1. Click anywhere within the sheet to be renamed 2. From the Format menu, select The Format Tab Color Sheet dialog Tab box Color... appears.

3. Select the desired tab color 4. Click The worksheet tab color is changed.

OK

Changing Worksheet Tab Colors: Mouse Option


1. Right click the appropriate SHEET tab select Tab Color...

54

The

Format

Tab

Color

dialog

box

appears.

2. Select the desired tab color 3. Click The worksheet tab color is changed.

OK

Inserting Worksheets
The Excel default for new workbooks is 3 worksheets. If you need additional sheets, you can easily insert them.

Inserting Worksheets: Menu Option


1. From the Insert menu, select The new worksheet is inserted in front of the current worksheet. Worksheet

Inserting Worksheets: Mouse Option


Windows: 1. Right click the appropriate SHEET tab select Insert...

The Insert dialog box appears. 2. Select the General tab 3. Select Worksheet 4. Click OK The new worksheet is inserted in front of the current worksheet. Macintosh: 1. Press [control] + click the appropriate SHEET tab select Insert... The Project Gallery dialog box appears. 2. Select the New tab 3. Select Worksheet 55

4. Click OPEN The new worksheet is inserted in front of the current worksheet.

Moving Worksheets
You may want your worksheets in a particular order when printing the final document. You may also want to rearrange the order for easier access while working on a file or to group similar worksheets together. If the original worksheet order no longer fits your needs, you can rearrange worksheets within the same workbook or move a worksheet to another workbook.

Moving Worksheets: Same Workbook, Menu Option


1. Click anywhere within the sheet to be moved 2. From the Edit menu, select Move The Move or Copy dialog or Copy box Sheet... appears.

3. From the To book pull-down list, select the current workbook 4. From the Before sheet scroll box, select where the sheet will be moved NOTE: The sheet will be placed in front of the sheet you select. 5. Click OK The worksheet is moved.

Moving Worksheets: Same Workbook, Drag and Drop Option


The Drag and Drop option works only if you want to move a worksheet within the same workbook. 1. Click A and hold sheet the SHEET icon tab of the and worksheet arrow to be moved appears.

2. Drag the sheet icon to the The arrow indicates where the sheet will be placed.

desired

location 56

3. Release the The worksheet is moved.

mouse

button

Moving Worksheets: Different Workbook


1. Open both the worksheet to be moved and the workbook to which it will be moved 2. From the Window menu, select the workbook containing the worksheet to be moved 3. Click anywhere within the sheet to be moved 4. From the Edit menu, select Move or Copy Sheet... The Move or Copy dialog box appears.

5. To move the worksheet to an existing workbook, from the To book pull-down list, select the destination workbook To move the worksheet to a new workbook, from the To book pull-down list, select (new book) 6. From the Before sheet scroll box, select where the sheet will be moved NOTE: The sheet will be placed in front of the sheet you select. 7. Click OK The worksheet is moved.

Copying Worksheets
You may need to create a copy of a worksheet if the same information is needed in multiple files. Or, you may want to use the same format without having to reformat a new worksheet. For example, if you have created a worksheet for one project but do not want to recreate the worksheet for another project, copying the worksheet saves you the time of creating another worksheet.

Copying Worksheets: Same Workbook


1. Click anywhere within the sheet to be copied 57

2. From the Edit menu, select Move or Copy Sheet... The Move or Copy dialog box appears. 3. Select Create a copy 4. From the Before sheet scroll box, select where the sheet will be pasted NOTE: The sheet copy will be placed in front of the sheet you select. 5. Click OK The worksheet is copied.

Copying Worksheets: Different Workbook


1. Open the worksheet to be copied and the workbook to which it will be copied 2. From the Window menu, select the workbook containing the worksheet to be copied 3. Click anywhere within the sheet to be copied 4. From the Edit menu, select Move or Copy Sheet... The Move or Copy dialog box appears. 5. To copy the worksheet into an existing workbook, from the To book pull-down list, select the destination workbook To copy the worksheet into a new workbook, from the To book pull-down list, select (new book) 6. From the Before sheet scroll box, select where you want the worksheet copied NOTE: The sheet copy will be placed in front of the sheet you select. 7. Select Create a copy 8. Click OK The worksheet is copied.

Deleting Worksheets
If you no longer have a need for a particular worksheet, you can delete that sheet from the workbook.

Deleting Worksheets: Menu Option


1. Click anywhere within the sheet to be deleted 2. From the Edit menu, select Delete A confirmation dialog box appears. 3. To delete the worksheet, click DELETE or The worksheet is deleted. Sheet OK

Deleting Worksheets: Mouse Option


1. Windows: Right click the appropriate SHEET tab select Delete Macintosh: Press [control] + click the appropriate SHEET tab select Delete A confirmation dialog box appears. 2. To delete the worksheet, The worksheet is deleted. click DELETE or OK 58

Working with Groups of Worksheets


Grouping your worksheets can help improve consistency among them and save you time. Once sheets are grouped, you can format or print the entire group.

Grouping Worksheets Ungrouping Worksheets Formatting Worksheet Groups Printing Worksheet Groups

Grouping Worksheets
1. Click the SHEET tab of the first sheet to be grouped 2. Windows: To select non-contiguous sheets, press [Ctrl] + click the sheets to be grouped Macintosh: To select non-contiguous sheets, press [command] + click the sheets to be grouped To select contiguous sheets, press [Shift] + click the last sheet to be grouped NOTE: The tabs of the selected sheets will appear white. Unselected sheets' tabs will remain unchanged (colors may differ based on your windows color scheme). 3. Windows: When all the sheets of the group are selected, release the [Shift] or [Ctrl] key Macintosh: When all the sheets of the group are selected, release the [shift] or [command] key The selected worksheets are grouped. NOTE: The notation [Group] appears next to the filename.

Ungrouping Worksheets
When you are finished working with your sheet groups, you will need to ungroup them.

Ungrouping Worksheets: All Sheets


1. Windows: Right click one of the SHEET tabs within the group select Ungroup Sheets Macintosh: Press [control] + click one of the SHEET tabs within the group select Ungroup Sheets All grouped worksheets are ungrouped. 59

Ungrouping Worksheets: Individual Sheets


1. Windows: Press [Ctrl] + click the SHEET tab of the sheet to be removed from the group Macintosh: Press [command] + click the SHEET tab of the sheet to be removed from the group The selected worksheet is removed from the group.

Formatting Worksheet Groups


If you have multiple sheets within your workbook that require the same formatting, you can format all worksheets within a group at the same time. This option works when the worksheets have similar information in the same relative location. Many types of formatting can be done with sheet groups:

Column width Shading Formulas and functions Borders Typing of content

To format groups of sheets, use the following instructions: 1. Group the worksheets 2. On the current worksheet, select the cell(s) to be formatted 3. Using the Formatting toolbar or the Format menu, apply the appropriate formatting NOTE: For more information about formatting options, refer to Formatting Your Worksheets. 4. Repeat steps 2-3 as necessary 5. Ungroup the worksheets

Printing Worksheet Groups


If you have multiple sheets in your workbook and you want to print select worksheets, you can do this using worksheet groups. This method will print the active area of each sheet (A1 to the last column and row containing information) or the assigned print area. This may result in different ranges being printed for each sheet. 1. Group the worksheets 2. From the File menu, select Print... The Print dialog box appears. 3. In the Print what section, select Active sheet(s) 4. Adjust print settings as necessary NOTE: For more information about printing, refer to Printing Basics.

60

5. Windows: Macintosh: Click The selected worksheets are printed. 6. Ungroup the worksheets

Click PRINT

OK

Working with Range Names


Range names refer to a specific group of cells. They are often used for cell references in functions and for printing.

Naming Ranges: Tips Creating Range Names Adjusting Range References Deleting Range Names Using Range Names in Formulas/Functions Using Range Names: Additional Options

Naming Ranges: Tips


The name should be descriptive (grades is more descriptive than range1). The first character must be a letter or an underscore character. Other characters can be letters, numbers, or periods. The name cannot look like a cell reference (e.g., "A1", "R1C1"). To separate words, the underscore character or a period must be used instead of a space. The name can be up to 255 characters long. The names are not case sensitive; they can contain upper and lowercase letters. If you name one range BUDGET and a second range Budget, Excel will overwrite the first range with the second one.

Creating Range Names


Creating Range Names: Dialog Box Option
1. Select the data to be included in the range 2. From the Insert menu, select Name OR Windows: Press [Ctrl] + Macintosh: Press [command] + Define... [F3] [F3] 61

The

Define

Name

dialog

box

appears.

3. In the Names in workbook text box, type the desired range name 4. Click OK The range name is created.

Creating Range Names: Name Box Option


1. Select the cells to be included in the range 2. In the Name Box, highlight the currently appearing range name HINT: On Macintosh, if the Name Box does not appear, from the View menu, select Formula Bar. 3. Type the desired range name 4. Windows: Macintosh: Press The range name is created.

Press [return]

[Enter]

Creating Range Names: Multiple Range Names


You may want to assign names to multiple ranges in your worksheet without having to follow a separate dialog box process for each range. 1. From the Insert menu, select Name The Define Name dialog box appears. 2. In the Names in workbook text box, type the desired range name 3. In the Refers to text box, type the range OR To select the cells, Define... of cells

a. Windows: Click COLLAPSE DIALOG Macintosh: Click COLLAPSE DIALOG b. Select the cells to be included in the range HINT: To select non-contiguous cells, press the [Ctrl] key for Windows or the [command] key for Macintosh while clicking the cells. 62

c. Windows: Click RESTORE Macintosh: Click EXPAND DIALOG 2. Click ADD 3. Repeat steps 2-4 as necessary for additional ranges 4. Click OK The range names are created.

DIALOG

Adjusting Range References


Adjusting range references allows you to modify the cell references, formulas, and constants included in the range. 1. From the Insert menu, select Name Define... The Define Name dialog box appears. 2. From the Names in workbook scroll box, select the range name whose cell reference, formula, or constant you want to change 3. In the Refers to text box, change the reference, formula, or constant 4. Click OK The range reference(s) are adjusted.

Deleting Range Names


To delete a range name, use the following directions: 1. From the Insert menu, select Name Define... The Define Name dialog box appears. 2. From the Names in workbook scroll box, select the range name to be deleted 3. Click DELETE 4. To delete other range names, repeat steps 2-3 as necessary 5. Click OK The range name(s) are deleted.

Using Range Names in Formulas/Functions


When writing functions, referring to a range name rather than using the cell references reduces the chance of errors. Range names can be used almost anywhere that you would enter a range of cell references. Common uses of range names are in formulas, functions, and print ranges. When writing a function, simply use the range name instead of the cell references. A SUM formula is written as follows: EXAMPLE: =SUM(C3:C15) With the range C3:C15 named Payroll, the function could also be written as follows: EXAMPLE: =SUM(Payroll) 63

Both functions will yield the same result. The second is often easier to write, understand, and troubleshoot. If you cannot recall a range name when you are writing a function/formula, you can use one of the following methods to determine your names and to include them in the function/formula. For more information, refer to Creating Range Names.

Using Range Names in Functions: List Option


1. Begin creating your formula/function 2. To add the range name, press [F5] The Go To dialog box appears. 3. Under Go To, select the desired range name 4. Click OK 5. Continue creating your formula/function, repeating steps 2-4 as necessary to add other range names

Using Range Names in Functions: Typing Option


If you know the range name you want to use and do not need to see the range name list, follow these instructions: 1. Begin creating your formula/function 2. To add the range name, type it into the formula/function EXAMPLE: =SUM(RangeName) 3. Continue creating your formula/function, repeating step 2 as necessary to add other range names

Using Range Names: Additional Options


To move to a specific cell on a worksheet, you can use the Go To command and your range names. The Go To command is useful when moving between ranges. For more information, refer to Using the Go To Command. Range names can also be used to help you define a printing area. For instructions on how to print ranges, refer to Printing a Range of Cells.

Navigating Your Large Workbook


64

Efficiently navigating a workbook can be challenging when the workbook or worksheets are large. This document includes tips and shortcuts for navigating a large worksheet and multiple open workbooks.

Keyboard Shortcuts Using the Go To Command Moving Between Open Workbooks Using Screen Options

Keyboard Shortcuts
Learning keyboard shortcuts will save you time when working with your workbook. There are several keyboard shortcuts available to help you move around your worksheets and workbook more efficiently. The following table displays some common shortcuts and their keyboard combinations. To... Move to the next sheet Move to the previous sheet Move to the next open workbook Press... [Ctrl] + [Page Down ] [Ctrl] + [Page Up ] Windows: [Ctrl] + [F6] Macintosh: [command] + [F6] OR [Ctrl] + [Tab]

Move to workbook

the

previous

open Windows: [Ctrl] + [Shift] + [F6] Macintosh: [command] + [shift] + [F6] OR [Ctrl] + [Shift] + [Tab]

Keyboard Shortcuts from the Help Menu


You can use the Microsoft Excel Help through the Help menu to obtain a complete list of keyboard shortcuts by searching for the keywords keyboard shortcuts.

Using the Go To Command


To move to a specific cell of the worksheet, you can use the Go To command. The Go To command is also useful when moving between ranges, for a discussion of how to add a range, refer to Working with Range Names: Creating a Range Name.

Using the Go To Command: Menu Option

65

1. From the Edit menu, select Go To... OR Press [F5] or [Ctrl]+[G] The Go To dialog box appears. 2. From the Go to scroll box, select the range name OR In the Reference text box, type the cell location EXAMPLE: A1, C1:C5, A1:G1 3. Click OK

Using the Go To Command: Name Box Option


If you have created range names in your worksheet, you can move to a cell or range of cells with a particular range name. 1. From the Name Box pull-down list, select the appropriate range name You will be moved to the range you specified.

Moving Between Open Workbooks


If you have more than one workbook open, you can move between files using the Window menu. NOTE: Using the Recent Files option from the File menu is not recommended. Using this option may result in multiple versions of the same file being opened. To move to a different workbook: 1. From the Window menu, select the You will be moved to the file you specified. name of the workbook

Using Screen Options


Working on large worksheets can be frustrating when you need to see different parts of the worksheet at once. Excel has two ways to work around this: Splitting the Screen and Freezing the Panes.

Freezing the Panes


The Freeze Panes option is often used when you have several columns or rows grouped together. In this situation, if you go beyond one screen of information, you generally lose the row or column headings so you may not know what the information you are looking at refers to. With the Freeze Panes option, you can freeze either, or both, the rows or the 66

columns. This means that, regardless of where you are in the worksheet, you can see the information in that row and/or column at all times. Freezing a Row and a Column 1. Place your cursor in the cell below and to the right of the row and column you want to freeze 2. From the Window menu, select Freeze Panes The row and column above and to the left of the cursor are frozen. Freezing a Row 1. Within column A, select the row directly below the row you want to freeze 2. From the Window menu, select Freeze Panes The row is frozen. Freezing a Column 1. Within row 1, select the column directly to the right of the column you want frozen 2. From the Window menu, select Freeze Panes The column is frozen. OPTIONAL: If you would like to print frozen columns on every page, refer to Other Excel Printing Options: Repeating Items on Each Page. Unfreezing Rows and Columns 1. From the Window menu, select Unfreeze Pane

Splitting the Screen


The Split Screen option works well when you want to see separate sections of a worksheet at the same time. You can split the screen into two or four different sections at a time. Splitting the screen using the Menu option will split the screen into four sections. Splitting the screen using the Mouse option will allow you to split the screen into two or four sections. The following graphic is an example of what the screen looks like after

67

being

split

into

four

using

the

Menu

option:

Splitting the Screen: Menu Option 1. Select the cell where you would like the worksheet split 2. From the Window menu, The screen will be split into four sections. Splitting the Screen: Mouse Option 1. Point to the black line above the vertical scroll arrow or to the right of the horizontal scroll arrow The pointer will turn into a double arrow. select Split

2. Click and drag the Split Bar to the desired location 3. Release the mouse Your screen will be split in two sections. 4. OPTIONAL: To split the screen into four sections,

button

a. Point to the black line you did not use to create the first split The pointer will turn into a double arrow. 68

b. With the double arrow, click and drag the Split Bar to the desired location c. Release the mouse button Unsplitting the Screen: Menu Option 1. From the Window menu, The screen will return to a normal view. Unsplitting the Screen: Mouse Option 1. Drag each Split Bar back to its original position (above the vertical scroll bar or to the left of the horizontal scroll bar) OR Double click each Split Bar select Remove Split

Performing Workbook

Calculations

in

Your

Excel performs its calculations through formulas and functions (a function is a prewritten formula) which are shortcuts for working with your document. For example, rather than writing a formula to add numbers, count them, and divide to find the average, you can just use the Average function. It tells the computer what it needs to do to find the average of the numbers, so you do not need to type in all of the commands to find an average. This document has been designed to examine the usage of formulas as well as provide some existing formulas to make working with your workbook and worksheets faster.

Writing Formulas for Your Workbook Calculating Your Workbook

Writing Formulas for Your Workbook


Formulas can be used not only for small mathematical operations within cells and worksheets but also to link to other worksheets and other workbook files.

Writing Formulas for Multiple Worksheets

69

While multiple worksheets can make working with your workbook more manageable, writing formulas that include information on different worksheets is more complicated. However, when writing formulas, you can create a link between cells on one or more worksheets within the same workbook. Using Special Characters Five symbols can be used when creating a formula that links two separate worksheets. Each of these symbols can be placed directly into the formula to complete its respective function. Character Use within Formula ! ' [] : + Place between the worksheet name and cell reference Place around the filename and sheet name or when a sheet name contains a space ('Budget 2001'!C4:C8) Place around a filename Signifies a range (B3:C2 means B3 through C2) Signifies a range (B3+C2 means B3 and C2)

NOTE: The following examples assume that the worksheets Budget and Salary are located within the workbook 03Budget.xls. Creating a Link to Another Worksheet (same file) Excel allows you to create links to other worksheets. 1. Select the cell where you want the formula to appear 2. To create the formula, use this format: =function_name(worksheet_name! cell_reference) EXAMPLE: =SUM(Budget!C4:C8) EXAMPLE: (with space in sheet name) =SUM('Budget 2003'!C4:C8) 3. To accept the formula, press [Enter] or [return] Creating a Link to More than One Worksheet (same file) Excel allows you to create links to more than one worksheet at a time. 1. Select the cell where you want the formula to appear 2. To create the formula, use this format: =function_name(worksheet range! cell_reference) EXAMPLE: =SUM(Budget:Salary!D2:D10) EXAMPLE: (with space in sheet name) =SUM('July 2003:June 2004!'C4:C8) NOTE: Be sure to include a plus sign (+) or colon (:) between the worksheet range. 70

3. To accept the formula, press [Enter] or [return]

Writing Formulas for Other Workbook Files


You can create a formula to reference cells between workbook files. 1. Select the cell where you want the formula to appear 2. To create the formula, use this format: =function_name([workbook_name]worksheet_name!cell_reference) EXAMPLE: =SUM([03Budget.xls]Salary!D2:D10) NOTES: If the two files you are working with are in different directories, you must include the file path in your formula. There is no difference in the formula if your sheet name contains a space. Use the following format: =function_name('[file_path\workbook_name]worksheet_name'! cell_reference) EXAMPLE: =SUM('[E:\Accounting\03Budget.xls]Salary'!D2:D10) 3. To accept the formula, press [Enter] or [return]

Using Range Names in Formulas


Using range names for some cells can be especially helpful if you cannot remember the cell location. Range names should not be assigned to every group of cells. Special groups, like assumptions and key totals, are good groups with which to use range names. For guidelines and instructions for assigning and adding range names, refer to Working with Range Names. When using a range name in your formulas, the name will replace the cell reference. For example, if the percent increase is stored in cell C24 and the cell is named INC, you can refer to the cell in a formula either way as demonstrated in the following examples:

Cell Reference Range Name Reference


=C24*5000 =INC*5000

Calculating Your Workbook


When you are working with large workbooks and several calculations, you may find data entry slowing down (especially on older computers). This slowdown occurs because each time you enter information, all formulas are recalculated, by default, in case they were being impacted by the change that you just made. To speed up data entry, you can change the calculation mode to manual so the workbook is recalculated only when you specify (and optionally, when you save your file). 71

WARNING: Excel has an option for automatically calculating before you save your work, but not before you print. If you change to manual calculation, you will need to make sure that you recalculate before you print, and especially before others view your document.

Changing to Manual Calculation


To speed up data entry time, you can choose the Manual Calculation option. To choose this option, follow these steps: Windows: 1. From The the Tools Options menu, dialog select box Options... appears.

2. Select the Calculation tab 3. Under Calculation, select Manual 4. Click OK Macintosh:

72

1. From The

the Excel Preferences

menu, dialog

select box

Preferences... appears.

2. From the list on the left, select Calculation 3. Under Calculation, select Manual 4. Click OK Calculating Your Workbook Manually To use the Manual Calculation feature, you have two options: the keyboard or Options dialog box. Keyboard Option: 1. Windows: Macintosh: Press [command] + [=] Menu Option: Windows: 1. From the Tools menu, The Options dialog box appears. 2. Select the Calculation tab 3. Under Calculation, click CALC NOW (F9) 4. Click Your data is now updated. Macintosh: 73 select Options... Press [F9]

OK

1. From the Excel menu, select The Preferences dialog box appears. 2. From the list on the left, select Calculation 3. Click CALC NOW Your data is now updated.

Preferences... (CMD+=)

Correcting Circular References


In order to troubleshoot formulas, one of the steps to take is to identify and correct all circular references within your worksheet.

Introduction to Troubleshooting Tracking Down Circular References Correcting Circular References

Introduction to Troubleshooting
As you are reviewing your worksheets, asking yourself the following questions can help you identify problems within your worksheet and ensure the integrity and accuracy of your worksheets.

Compute some formulas by hand; do they equal Excel's results? Are the numbers reasonable and within the expected range? Verify the accuracy with source documents; make sure you transferred the information correctly. Do your labels accurately describe the values within the worksheet? When multiplying numbers by values with decimals, do the values that print out add up correctly? This is a common problem because of Excel's automatic rounding. When creating formulas that you find awkward, use values that are easy to test.

Tracking Down Circular References


Circular references occur when a formula refers to itself to determine the answer. For example, if the function =sum(b1:b10) was to be displayed in cell B10, we would have a circular reference because the result of this formula is required to determine the result. To correct the problem, place the function in a different cell, perhaps B11, or edit the range to stop at B9.

74

When you try to enter a formula containing a circular reference, a dialog box appears, helping you avoid such references. The Formula Auditing and Circular Reference toolbars can also help you avoid circular references. To access the Formula Auditing toolbar:

Windows: 1. From The the View menu, Formula select Toolbars Auditing Formula toolbar Auditing appears.

Macintosh: 1. From The the View menu, Auditing select Toolbars toolbar Auditing appears.

To access the Circular Reference toolbar: 1. Windows: From the View menu, select Toolbars Customize... The Customize dialog box appears. Macintosh: From the View menu, select Toolbars Customize Toolbars/Menus... The Customize Toolbars/Menus dialog box appears. 2. Select the Toolbars tab 3. From the Toolbars scroll box, select Circular The Circular Reference toolbar

Reference appears.

4. Click OK

Correcting Circular References


1. On the Circular Reference toolbar, from the Navigate Circular Reference pulldown list, select the cell reference to be adjusted 2. In the Formula bar, review and correct the formula until the status bar no longer reflects a circular reference HINT: To display arrows showing which cells are referenced in the formula, on 75

the Circular Reference toolbar, click TRACE DEPENDENTS or TRACE PRECEDENTS.

Protecting Your Worksheet


Protection of documents and cells can help prevent inadvertent changes to your worksheet. This can be especially helpful if you have someone who is unfamiliar with worksheets or doing your data entry, or if you spent many hours struggling to get the worksheet right. Excel offers the option of protecting the entire document, individual objects, structure of a window, and/or specific cells. With Excel, you can even add a password to the file. If you want to prevent changes to sheets or cells, you need to lock the cells and then protect the sheet.

Protection Options Locking & Unlocking Cells Workbook Level Protection Worksheet Level Protection File Level Protection

Protection Options
When you are protecting your workbook, you have two primary options:

Prevent data entry for select cells Users can access the worksheet and view the information; however, access for making changes is restricted. For more information, refer to Locking & Unlocking Cells. Restrict or prevent access to the file Users can be prevented from viewing the worksheet, or users can view the workbook but not make changes to it. For more information, refer to File Level Protection.

Locking & Unlocking Cells


By default, Excel protects cells, graphics, charts, and other worksheet objects. This protection will only take effect by turning on the Worksheet Protection option in the 76

Protect Sheet dialog box. Therefore, if you enable protection, no changes can be made to a cell until you unlock that cell.

Locking Cells
You can easily lock any cell in a worksheet. NOTE: Make sure to lock the cells before you protect the sheet or document. Once a sheet or a document has been protected, you cannot access menu selections that allow you to make changes to cells. 1. Select the cell(s) to be locked 2. From the Format The Format Cells dialog box appears. 3. Select the Protection tab 4. Select There will be a menu, select Cells... Locked it.

check

before

5. Click OK 6. You must now protect the worksheet

Unlocking Cells
In order to unlock cells, sheet protection must first be turned off. For more information, refer to Worksheet Level Protection or Workbook Level Protection. 1. Unprotect the worksheet 2. Select the cells you want to unlock 3. From the Format The Format Cells dialog box appears. 4. Select the Protection tab 5. Deselect There will no longer be a check before it. 6. Click The cells are unlocked.

menu,

select

Cells... Locked OK

Workbook Level Protection


You can prevent a workbook from having its structure and windows modified or resized by another user.

Protecting the Workbook


77

1. From The

the

Tools Protect

menu, select Workbook

Protection dialog

Protect box

Workbook... appears.

2. In the Protect Workbook dialog box, select the appropriate option(s): Option Description

Structure Prevents the user from changing the order of the sheets within a workbook. This includes adding or deleting worksheets. Windows Prevents the user from being able to resize or move the window. Password Allows only those who know the password to turn the workbook protection off. 3. Click OK The workbook is protected.

Unprotecting the Workbook


1. From the Tools menu, select Protection Unprotect Workbook The workbook is unprotected. Users can now modify the structure and windows of the workbook. NOTE: If you included a password when you turned the protection on, you must enter the password to turn the protection off.

Worksheet Level Protection


You can protect a single worksheet from being modified by another user.

Protecting the Worksheet


Windows:

78

1. From The

the

Tools Protect

menu, select Sheet

Protection dialog

Protect box

Sheet... appears.

2. In the Protect Sheet dialog box, select the appropriate options: Option Description

Protect worksheet and contents of Prevents changes to locked cells. locked cells Password to unprotect sheet Allows only those who know the password to unprotect the worksheet.

Allow all users of this worksheet Checked boxes are aspects that any user can to access. 3. Click OK The worksheet is protected. Macintosh:

79

1. From The

the

Tools Protect

menu, select Sheet

Protection dialog

Protect box

Sheet... appears.

2. In the Protect Sheet dialog box, select the appropriate options: Option Description

Contents Prevents changes to locked cells, columns or rows, chart sheet, and any formulas in the cells Objects Prevents changes to graphic objects (e.g., text boxes, an embedded chart). Scenarios Prevents changes to scenarios (i.e., any input values you substituted in a worksheet). Password Allows only those who know the password to unprotect the worksheet. 3. Click OK The worksheet is protected.

Unprotecting the Worksheet


1. From the Tools menu, select Protection Unprotect Sheet The worksheet is unprotected. Users can now modify the worksheet. NOTE: If you included a password when you turned the protection on, you must type the password in the Password text box to turn the protection off.

File Level Protection


You have two options when saving your workbook file with a password. You can save the file so only those who know the password can open or modify the file.

Protecting the File


1. From the File The Save As dialog box appears. menu, select Save As...

80

2. Windows: From Macintosh: The Save

the

pull-down list, Click Options dialog

Tools

select box

General Options... OPTIONS... appears.

3. To prevent unauthorized access to the file, in the Password to open text box, type a password To prevent unauthorized changes to the file, in the Password to modify text box, type a password 4. Click OK The Confirm Password dialog box appears. 5. In the Reenter password to proceed/modify text box, type the password(s) in the order of the password(s) that you typed in the Save Options dialog box HINT: If you type apple in the Password to open text box and orange in the Password to modify text box, you must type apple in the first confirmation dialog box and orange in the second confirmation dialog box. 6. Click OK 7. Click SAVE

Unprotecting the File


If you no longer need to password-protect the file, you can remove the password. 1. From the File menu, select Save As The Save As dialog box appears. 2. Windows: In the Save As dialog box, from the Tools pull-down list, select General Options... Macintosh: Click OPTIONS 3. In the Password to open text box, press [Delete] 4. In the Password to modify text box, press [Delete] 5. Click OK The file is no longer password protected. 6. To save the file, click SAVE A confirmation dialog box appears. 7. Windows: Click YES Macintosh: Click REPLACE

81

About Charting
Charts are objects on your worksheet that can be moved, resized, and deleted without affecting your worksheet. If the chart is placed on top of information, the information will not be modified or lost.

Charting Rules About Chart Elements

Charting Rules
Excel follows seven basic rules for creating charts with the Chart Wizard. Understanding these rules can help avoid frustration and reduce the steps necessary for creating charts. Once the chart is created, you can modify it to meet your needs. Rule Rule 1 Description Excel does not automatically add a chart title to your chart based on the first row of selected information. A chart title can be added during the creation process or later Excel does not automatically add a chart subtitle to your chart based on the second row of selected information. A subtitle can be added after the chart is created Blank rows and columns in your information are not ignored. Excel will leave a blank bar or pie slice for every blank row or column in your information If the data contains more rows than columns, Excel will plot the data by column. The first column becomes the X-axis labels; the balance of the columns are the data series. The first row becomes the legend's labels If the data contains more columns than rows, Excel will plot the data by row. The first row becomes the X-axis labels; the balance of the rows are the data series. The first column becomes the legend's labels If the data contains an equal number of rows and columns, Excel defaults to plot the data by rows but gives you the option to plot by columns If only numeric data is selected, Excel follows rules 4 and 5

Rule 2

Rule 3

Rule 4

Rule 5

Rule 6

Rule 7

Bad Data Sample


82

In the following example, notice how the blank cells in the data series create blanks spaces in the chart. The lack of row labels makes it difficult for the reader to understand the chart, because no legend exists to guide them.

Good Data Sample


In the following example, notice that no blank spaces exist in the data series, so no empty spaces exist in the chart. The row labels allow a legend that makes the chart much easier to understand.

About Charting Elements


A chart contains several elements, which are illustrated in this graphic. 83

The following table describes the various elements. Element Title (Subtitle) Category (X) Axis Category Axis Title Value Axis Purpose Identifies the chart and frequently includes a date or time period Identifies the data being charted on the horizontal x-axis. Examples of Category (X) Axis types include dates, projects, and salespersons Identifies the title of the Category (X) Axis

(Y) Identifies the data being charted on the vertical y-axis. Examples of Value (Y) Axis types include numbers and years

Value Axis Identifies the title of the Value (Y) Axis Title Legend Identifies the information charted. This is especially important when you have more than one type of information charted. For example, if you have a chart for enrollment by class (freshman, sophomore, junior, senior), a legend will be important for identifying which information relates to what class Ticks, indicating measurement increments, appear on both the y-axis and xaxis and can help improve the readability of a chart. Both y-axis and x-axis ticks are optional The origin is the point where the x-axis and y-axis meet. The origin is generally at zero (0) but can be modified

Ticks

Origin

84

Guidelines for Charting


The ability to create effective charts, whether for oral presentations or printed text, is an important skill for anyone involved with projecting numeric information. Research has shown that visual depictions of data communicate faster than words or lists of numbers. Knowledge of effective charting methods allows you to present numerical information in a visually appealing way. Essentially, a chart's effectiveness depends on its ability to generate for the viewer an immediate sense of orientation and access to information.

General Hints Pie Charts Bar Graphs Line Graphs Summary

General Hints
Generally, effective charts use the simple techniques of good design. Any reference material discussing page layout will assist you in this area. Some design techniques are especially important, as they relate directly to charting. These techniques include the following: Choosing the correct chart format Chart formats are designed to portray certain types of information; therefore, choose the correct chart format for your information. Maintaining simplicity Clarifying information is the main goal of creating a chart, so complicated charts only serve to make your information less clear. Maintaining consistency When creating several charts, use a design grid. This grid will help you maintain a consistent chart format, eliminating distractions for your audience. Using labels Effective use of labels that are created using legible typefaces will assist your audience in understanding a chart's information. Each of these design factors is important, but the choice of chart format comes first. For this reason, the following sections discuss the design considerations for three of the most common chart formats.

Pie Charts

85

Pie charts are best used to compare parts of a whole; in other words, they help divide a group into components. Some factors to keep in mind when creating pie charts include the following:

Source: UWEC Campus Profile, 2001 Limiting the number of slices Keep the number of slices to a minimum by combining smaller categories into one. Too many slices will hinder interpretation by making your pie chart appear complicated and cramped; it will also create difficulties for labeling. Using labels for slices Try to place labels within slices whenever possible; this will help you create pie charts that are both clear and readable. Focusing attention If necessary, draw your audience's attention to the particular slices you are discussing, perhaps by "exploding" it to make it appear separate from the pie or by selecting a dominant color or pattern. For more information on enhancing pie chart effects, refer to Using Pie Chart Options. Enhancing the chart Consider enhancing the appearance of the pie chart, perhaps by adding perspective. Keep in mind, however, that three-dimensional pies can sometimes make certain slices appear larger than they really are; thus, your pie chart may be misleading.

Bar Graphs
Bar graphs work best to emphasize the contrast between quantities. Two types of bar graphs can be used: vertical and horizontal. Vertical bar graphs work well for comparing quantities at different times, while horizontal bar graphs compare different quantities when time is not an important consideration. For example, a graph showing student enrollment by year would probably work best in the vertical format, while a graph showing current participation in faculty organizations would be most effective in the 86

horizontal format. Some design considerations to keep in mind when creating either type of bar graph include the following:

Source: UWEC Campus Profile, 2001

Source: UWEC Campus Profile, 2001 Limiting the scale Make sure your bar graph is kept within a reasonable scale; in other words, try to avoid showing three quantities of similar size and one quantity that is drastically larger or smaller. Enhancing the graph Consider adding perspective or a drop shadow to your chart for visual appeal, but again, be aware that (as with pie charts) the third dimension can confuse or even mislead the audience. Numerical values placed above or within the bars themselves may help solve this problem. For more information, refer to Formatting Your Chart.

Line Graphs
Line graphs best indicate the relationship of one variable to another, and they can be created using either straight or curved lines. Which type of line graph you use depends on the type of information you wish to convey: straight-line graphs show specific observation points, while curved-line graphs show general trends. Some design 87

considerations to keep in mind when creating either type of line graph include the following:

Source: UWEC Institutional Planning, 1999-2003

Source: UWEC Institutional Planning, 1999-2003 Using contrast Make sure to use lines with sufficient contrast; in other words, create a line that is bold enough to clearly appear to your audience but thin enough to still convey specific information. Limiting multiple lines When using multiple lines to compare trends, keep the number of lines to three or less. Comparing more than three trends on the same line graph can create confusion for your audience, especially if your graph is not in color.

Summary
Adhering to the guidelines in this document will help you create charts and graphs that present information clearly. Of course, the three chart formats discussed here are not the only ways to convey numerical data; other formats can effectively portray information as well. The following table provides a quick guide to most of your choices: 88

Chart Format Pie Bar Line Area Scatter Plot

Description Compares parts of a whole Shows contrast between quantities Indicates the relationship of one variable to another Indicates the volume relationship of one variable to another Correlates two factors by marking the points where particular events occurred

Each chart format has its own design considerations, but you have plenty of room for experimentation. You can use your computer software to try new techniques. As long as you choose the correct format and keep in mind the general concepts of simplicity, consistency, and labeling, you will be well on your way toward creating an effective chart that is understandable and effective.

Getting Ready to Chart


Excel offers several options for designing worksheets along with creating and modifying charts. Even before you make your chart, however, you should consider creating range names for your data. Specifying range names in advance will decrease the potential for errors and enable you to add more data at a later date.

Designing Your Worksheet for Charting Recommended: Range Names

Designing Your Worksheet for Charting


You have two basic options for setting up your worksheet. First, you can design your worksheet so the information to be charted is close together. Second, you can create a summary section for charting.The right option for you will often depend on what the worksheet is designed to do. Often worksheets are designed to track information; later on, charting becomes a secondary purpose. With this type of worksheet, a summary section may be the easiest. You can summarize the detailed data in a different area on your worksheet and make it much easier for charting.

89

A summary section will include the information to be charted in a contiguous group. The more complete the summary section, the less work you will have to do when creating your chart. Based on the Charting Rules, an organization similar to the following graphic will make it easiest for automatic charting. While this setup may not always be appropriate, keep in mind the format can reduce the amount of adjustments required for your charts.

This sample worksheet section was used to create the following chart. Aside from telling Excel to create a chart and indicating where the chart was to appear, the default setup created the chart.

Charts can be enhanced by modifying the individual chart elements or by adding a new data series. Notice that the chart title and subtitle are not included in the chart. Excel requires that these be added after the chart is created or during the Chart Wizard process.

Recommended: Range Names


Before you create your chart, you should create a range name to represent the data on your worksheet. Range names refer to specific groups of cells and are often used for cell references in functions, charting, and printing. Using range names when creating a chart rather than using the cell references will reduce the chance of error and allow you to add data to your chart in the future. For more information on range names, refer to Working with Range Names or Working with Ranges / Data Series.

90

Creating a Basic Chart


The Excel Charting Wizard makes it easy to create a basic chart. With a few clicks, Excel will create a basic chart you can edit and enhance to meet your needs.

Using the Chart Wizard Modifying a Chart Changing the Chart Type Working with Ranges / Data Series Positioning Your Chart

Using the Chart Wizard


Sometimes the data in your worksheet may not fit the Excel basic chart criteria, or you may not want to spend time creating a summarizing section. Instead of creating the basic Excel chart, you can go through all four steps in the Chart Wizard and add several options to your chart immediately. By using the Chart Wizard, you can alter the chart type, add a title, and specify which direction Excel charts your data.

Using the Chart Wizard: Selecting Your Data


1. Select the data to be charted NOTES: If you are using range names, refer to Using the Chart Wizard: Range Names. If you are selecting data from different areas of your worksheet, to select noncontiguous cells, hold down the [Ctrl] key for Windows or the [command] key for Macintosh while selecting the cells. 2. On the Standard toolbar, click CHART WIZARD The Chart Wizard - Step 1 of 4 - Chart Type dialog box appears. 3. From the Chart type scroll box, select the appropriate chart type NOTES: For information on the various chart types, refer to Guidelines for Charting. To preview your information in any chart before you create it, click PRESS AND HOLD TO VIEW SAMPLE. 4. Under Chart sub-type, select the appropriate sub-type and click NEXT The Chart Wizard - Step 2 of 4 - Chart Source Data dialog box appears. 5. Select the Data Range tab 6. For Series in, select Rows or Columns and click NEXT The Chart Wizard - Step 3 of 4 - Chart Options dialog box appears. 7. Select the Legend tab 8. To use a legend, select Show legend NOTE: For more information, refer to Working with Legends. HINT: If you are using a pie chart, use labels instead of a legend. For more information, refer to Adding Data Labels to Your Chart. 9. To create a title for your chart, select the Titles tab 10. In the Chart title text box, type the desired title 91

11. In the appropriate text boxes, type the desired x- and y-axes labels and click NEXT The Chart Wizard - Step 4 of 4 - Chart Location dialog box appears. NOTE: For more information, refer to Working with Axes. 12. To make your chart appear within the Excel sheet, a. Select As object in b. From the pull-down box, select the desired worksheet To make your chart appear as a separate sheet, c. Select As new sheet d. OPTIONAL: In the text box, type a name for the new worksheet 2. Click FINISH The chart is created. NOTE: To enhance this chart, refer to Modifying a Chart.

Using the Chart Wizard: Range Names


NOTE: To create a range name for your data, refer to Working with Range Names. 1. On the Standard toolbar, click CHART WIZARD The Chart Wizard - Step 1 of 4 - Chart Type dialog box appears. 2. From the Chart type scroll list, select the appropriate chart type NOTE: For information on the various chart types, refer to Guidelines for Charting. 3. Under Chart sub-type, select the appropriate sub-type and click NEXT The Chart Wizard - Step 2 of 4 - Chart Source Data dialog box appears. 4. Select the Data Range tab 5. In the Data range text box, press [=] and type the range name EXAMPLE: To chart the clerk3 range, in the Data range text box, type =clerk3 6. OPTIONAL: To complete the remaining Chart Wizard steps, follow steps 7-12 in Using the Chart Wizard: Selecting Your Data. 7. Click FINISH The chart is created. NOTE: To enhance this chart, refer to Modifying a Chart.

Modifying a Chart
Once your chart is created, you can modify it to fit your needs or the evolving nature of your data. For more information, refer to the following documents:

Working with Chart Elements Formatting Your Chart Charting Extras

92

Changing the Chart Type


If the default chart type is not appropriate for the information you are charting, you can change it by using the Chart Type selection from the Chart menu. 1. Select the chart 2. From the Chart menu, select Chart Type... The Chart Type dialog box appears. 3. From the Chart type scroll box, select the appropriate chart type NOTES: For information on the various chart types, refer to Guidelines for Charting. To preview your information in any chart before you create it, click PRESS AND HOLD TO VIEW SAMPLE. 4. Under Chart sub-type, select the appropriate sub-type 5. Click OK The chart type is changed.

Working with Ranges / Data Series


A data range/series identifies the information charted. For example, a data range may contain the enrollment, by school, for the current academic year. Another data range may contain the forecasted enrollment for the next academic year. If you need to delete or change the references to the cells containing the information, you will need to edit the data ranges/series.

Deleting a Data Series


1. Select the chart 2. Click the column, bar, line, or pie segment representing the data series to be deleted 3. From the Chart menu, select Source Data... The Source Data dialog box appears. 4. Select the Series tab 5. From the Series scroll box, select the series to be deleted 6. Click REMOVE 7. Click OK The data series is deleted.

Adding a Data Series


1. Select the chart 2. From the Chart menu, select Add Data... The Add Data dialog box appears. 3. In the Range text box, type the appropriate data range to be added NOTE: Be sure to include the cell containing the row or column label in the cell range. 93

OR To select a cell range, a. Windows: Click COLLAPSE Macintosh: Click COLLAPSE DIALOG b. Select the data range to be added c. Windows: Click RESTORE Macintosh: Click EXAPAND DIALOG 2. Click OK The data series is added. DIALOG DIALOG

Positioning Your Chart


Moving Your Chart
The chart is an object on your worksheet. While your chart may be placed on top of some worksheet information, the information still exists. The chart can be moved anywhere on your worksheet. 1. 2. 3. 4. 5. Select the chart Click and hold the mouse button Drag the chart to the appropriate location Release the mouse button To deselect the chart, click outside the chart

Resizing Your Chart


As you resize the chart, the chart elements are adjusted proportionally. 1. 2. 3. 4. 5. Select the chart Click and hold one of the sizing handles Drag the handle inward or outward Release the mouse button To deselect the chart, click outside the chart

Formatting Your Chart


94

Adding formatting to your chart can greatly enhance its overall appearance and clarity. Formatting is also a way to emphasize important areas of your chart. Some useful formatting options include colors, patterns, arrows, text boxes, and font types.

Selecting Chart Elements Adjusting the Chart Colors and Patterns Adding Arrows and Text Boxes Adjusting Chart Fonts

Selecting Chart Elements


The key to formatting a chart in Excel is selecting the correct chart element(s). When you hold your mouse over a certain element, a Screen Tip appears, telling you what element (e.g., gridlines, data series) your mouse is hovering over. NOTE: For a data series, one click selects the series, and the second click selects a single data point within that series. 1. Hold your mouse over the desired chart element A Screen Tip appears, indicating the type of element. 2. Windows: Right click the element select Format (Element Name)... Macintosh: Press [control] + click the mouse select Format (Element Name)... OR Double click the element The Format (Element Name) dialog box appears. 3. Make the necessary changes

Adjusting Chart Colors and Patterns


Colors and patterns can enhance your chart. If you have a black-and-white printer, you should do a test print to make sure the chart is legible. Using patterns instead of colors can also help enhance the readability of your chart. The patterns should be easily differentiated by the reader of the chart. 1. Select the appropriate chart 2. Access the Format dialog box 3. Make the necessary changes NOTE: For more information, refer to Modifying Objects: Coloring Objects or Using the Fill Effects Dialog Box.

Adding Arrows and Text Boxes


To draw attention to specific points on your chart, you can draw arrows to them or add a text box for further description. For more information, refer to Drawing in Office 2003 or Working with Text Boxes. 95

Adjusting Chart Fonts


Several methods are available for adjusting the type specifications (font, size, and color) of your chart elements. For more information, refer to Formatting Your Worksheets: Formatting Fonts.

Working with Chart Elements


Learning how to use Excel's chart elements can make your charts easier to understand and therefore, convey a more effective message. Titles, legends, and X-axis and Y-axis options can help specify the purpose of the chart, while using gridlines, exploding pie pieces (on pie charts), and adding text boxes can give your chart a helpful visual boost.

Adding a Chart Title Working with Legends Working with Axes Creating Charts with a Percent Scale Adding Data Labels to Your Chart Working with Grids

Adding a Chart Title


Titles are used to identify the chart for the reader. If you did not assign a chart title in the Chart Wizard, you can add the title at any time. NOTE: These instructions assume a chart is already created. For information on how to create a chart, refer to Creating a Basic Chart. 1. Click your chart to select it 2. From the Chart menu, The Chart Options dialog box appears. select Chart Options...

96

3. Select

the

Titles

tab

4. In the Chart title text box, type the desired title 5. Click OK The title is now added to your chart.

Working with Legends


Legends are used to identify the type of data in the chart. For example, the chart may contain enrollment information from the various colleges at UW-Eau Claire. The legend would identify what colors/patterns represent each college. The legend can be placed anywhere within the chart area, but it is commonly located at the bottom or to the right of the chart. Legend descriptions should be brief but descriptive. In Excel, a legend will be placed in your chart automatically. With the Format Legend dialog box, you can change the placement of the legend within your chart; however, you cannot change the labels that are used to identify the data types in your chart without changing the row labels on your worksheet. NOTE: Legends should not be used for pie charts. For pie charts, use labels rather than a legend.

Placing the Legend


1. Double click the legend to select it The Format Legend dialog box appears. 2. Select the Placement tab 3. Windows: Under Placement, select the desired legend placement

97

Macintosh:

Under

Type,

select

the

desired

legend

placement

4. Click OK

Working with Axes


Axis labels are used to identify the information being charted. The scale for both the Xaxis and Y-axis labels can be manually adjusted (i.e., you decide the minimum, maximum, and increment values). NOTE: You cannot adjust the axes for pie charts.

Scaling an Axis
1. Double click the axis The Format Axis dialog box appears. 2. Select the you Scale want to tab adjust

3. Make adjustments as desired 4. Click OK 98

Creating Charts with a Percent Scale


While pie charts are appropriate for reflecting percentages of a whole, they are not always appropriate for the information you are charting. To reflect the percentages, you may need to convert the values to be charted into percentages (they should add up to 100%) or you can follow the instructions listed here. Excel offers two ways of creating charts with a percent scale: the menu option and the mouse option.

Creating Charts with a Percent Scale: Menu Option


NOTES: To use this option, you This option changes all data series. must select a 100% stacked chart.

1. Click your chart to select it 2. From the Chart menu, The Chart Options dialog box appears. 3. Select the Data Labels tab 4. Select the desired data label option 5. Click OK

select

Chart

Options...

Creating Charts with a Percent Scale: Mouse Option


1. Double click the chart series you want to adjust The Format Data Series dialog box appears. NOTE: Make sure the chart pieces are selected, and not the entire chart. Otherwise, this option will not work. 2. Windows: Select the Data Labels tab Macintosh: Select the Labels tab 3. Select the desired data label option 4. Click OK

Adding Data Labels to Your Chart


Data labels can enhance your chart by adding useful information. This can be useful if you have a wide or tall chart. However, on some charts the data labels may look cluttered. Test data labels on your chart, and with other chart types, before using them on your final chart. Data labels can be added to a chart in two ways. The first way is to add them within the chart itself. The second alternative is to add values by drawing a text box. For more information, refer to Formatting Your Chart. The option that you select will depend on the amount of data in the chart and the number of values you want to emphasize using the text box tool. To add data labels to your chart, use the following steps: Windows: 99

1. Click your chart to select it 2. From the Chart menu, The Chart Options dialog box appears. 3. Select the Data

select

Chart Labels

Options... tab

4. To display the value for a series, select To display the label for a series in the chart, select Series name 5. Click OK Macintosh: 1. Click your chart to select it 2. From the Chart menu, The Chart Options dialog box appears. 3. Select the Data select Chart Labels

Value

Options... tab

4. To display the value for a series, select To display the label for a series in the chart, select Show label 5. Click OK

Show

value

Working with Grids


Grids are used to increase the readability of the chart by helping direct the eye from axis value to the value being charted. This is especially useful if you have a wide or tall chart. You can establish both major and minor grids. Generally, major grids are sufficient.

Inserting Gridlines
1. Click your chart to select it 100

2. From the Chart menu, select Chart Options... The Chart Options dialog box appears. 3. Select the Gridlines tab NOTE: This tab will not exist with some charts (e.g., pie charts) that do not use gridlines. 4. Make adjustments as desired 5. Click OK

Creating Exploding Pie Charts


Exploding a pie slice can be used to draw attention to a specific portion of the pie. In Excel, you can drag the pie slices outward to explode all of the slices away from each other. For more information about creating charts, refer to Creating a Basic Chart.

Creating an Exploding Pie Chart Exploding an Existing Pie Chart

Creating an Exploding Pie Chart


If you have not yet created your pie chart, use these instructions to create an exploding pie chart. NOTE: For more information about creating charts, refer to Creating a Basic Chart. 1. Select the data to be charted 2. On the Standard toolbar, click CHART WIZARD The Chart Wizard - Step 1 of 4 - Chart Type dialog box appears. 3. From the Chart type scroll box, select Pie 4. Under Chart sub-type, select one of the exploded pie charts 5. Click NEXT 6. Complete your NOTE: For more information, refer to Using the Chart Wizard.

chart

Exploding an Existing Pie Chart


If you have already created a pie chart, you can make it an exploding pie chart by changing the chart type or by manually exploding the pie slices. You can also explode only a single pie slice. 101

Changing the Chart Type


1. Click your pie chart to select it 2. From the Chart menu, select Chart The Chart Type dialog box appears. 3. From the Chart type scroll box, select Pie 4. Under Chart sub-type, select one of the exploded pie charts 5. Click OK The chart type is changed. Type...

Exploding All Pie Slices


1. Click your pie chart to select it 2. Click any pie slice The pie slices appear exploded. and drag it outward

Exploding a Single Pie Slice


1. Click your pie chart to select it 2. To select a pie slice, click it once 3. Click and drag The selected

the slice

selected slice appears

outward exploded.

Charting Extras
Extra charting features offered by Excel can be very useful during the different stages of your project. Some of these options include printing charts and data and copying charts into Word. 102

Printing Chart and Worksheet Data Copying Charts to Word

Printing Chart and Worksheet Data


Within Excel, you can print entire worksheets, selected data, or the chart alone. For more information about printing in Excel, refer to Printing Basics.

Printing the Data and Chart


You can position the chart next to or below the data, so that both fit on one page. You can use Page Break Preview to see what will be printed on one page. For more information, refer to Using Printing Options: Using Page Break Preview. Once you are satisfied with what will be printed, use the following instructions: 1. Place the insertion point within the worksheet to be printed except within the chart 2. From the File menu, select Print... The Print dialog box appears. 3. In the Print what section, verify that Active sheet(s) is selected 4. Windows: Click OK Macintosh: Click PRINT The selected worksheet is printed

Printing Only the Chart


This option allows you to print only the chart, rather than the data table or the entire worksheet. 1. Click to select the desired chart 2. From the File menu, select Print... The Print dialog box appears. 3. Windows: In the Print what section, verify that Selected Chart is selected Macintosh: In the Print what section, verify that Active Chart is selected 4. Windows: Click OK Macintosh: Click PRINT The selected chart is printed.

Copying Charts to Word


Adding charts to Word is a feature available due to the integration between Microsoft Office programs. When you copy a chart to Word, you can create a link so that if the worksheet is updated, the Word chart will also be updated. 1. Select the chart to be copied to Word 2. From the Edit menu, OR select Copy 103

3. 4. 5. 6.

7.

On the Standard toolbar, click COPY The chart is copied. Open the Word document to which the chart will be copied Place the insertion point where the chart should be pasted In Word, from the Edit menu, select Paste Special... The Paste Special dialog box appears. To add the chart as a link, select Paste Link To add the chart without a link, select Paste NOTES: To paste with linking means that when changes are made to the original source chart, the pasted chart will be updated. To paste without linking means when changes are made to the original source chart, the pasted chart will not be updated. Click OK The chart is pasted to Word.

Functions: Rank
The Rank function returns the rank of a value within a list. This function is useful when you need to maintain a sort based on another column and/or when you want to determine the rank of items in more than one column. This document will use the example of a gradebook, sorted alphabetically by student last name. In the example, we want to find the rank of the Quiz 1 score of 47 for Chris Student. Scores on Quiz 1 ranged from 60 to 23.

1. Open the desired worksheet 2. Select the cell where you would like the result of the function to appear 3. From the Insert menu, select Function... OR Windows: The On the Insert Formula Bar, Function click INSERT FUNCTION dialog box appears. 104

Macintosh: On the Standard toolbar, click PASTE FUNCTION The Paste Function dialog box appears. 4. Windows: From the Or select a category pull-down list, select All or Statistical Macintosh: From the Function category scroll box, select All or Statistical 5. Windows: From the Select a function scroll box, select RANK Macintosh: From the Function name scroll box, select RANK 6. Click OK The Function Arguments dialog box appears.

7. In the Number text box, type the value of which you want to know the rank EXAMPLE: Type 47 8. In the Ref text box, type the cell range to be included EXAMPLE: Type C2:C6 OR a. Click COLLAPSE DIALOG or b. Select the cells to be included c. Click RESTORE DIALOG or 2. To obtain the rank of a value where the list of values is sorted in descending order, in the Order text box, type 0 or leave the text box blank To obtain the rank of a value where the list of values is sorted in ascending order, in the Order text box, type any nonzero value NOTE: This action does not sort the information in your worksheet; it is used only as a reference from which to perform the ranking. EXAMPLE: To find the rank of 47 when the Quiz 1 scores are sorted from high to low, type 0 3. Click OK The rank appears in the selected cell and the formula appears in the Formula Bar. EXAMPLE: Chris Student's score ranks 4th when the scores are sorted high to low (60, 54, 50, 47, 23).

105

Functions: Countif and Sumif


Countif and Sumif are two functions which are helpful and very easy to use. Countif counts the number of items that meet a certain criteria. Sumif adds all items that meet a certain criteria.

Countif Sumif

Countif
The Countif function counts the number of items that meet a certain criteria. This criteria can be a number range or a word. This is useful when determining the number of entries within a certain range, such as test scores or the number of entries that equal a certain value, like the class rank of "junior" or "senior." 1. Open the desired worksheet 2. Select the cell where you want the result of the function to appear 3. From the Insert menu, select OR Windows: The On the Insert Formula Bar, Function

Function...

click INSERT FUNCTION dialog box appears.

Macintosh: On the Standard toolbar, click PASTE FUNCTION The Paste Function dialog box appears. 4. Windows: From the Or select a category pull-down list, select All or Statistical Macintosh: From the Function category scroll box, select All or Statistical 5. Windows: From the Select a function scroll box, select COUNTIF Macintosh: From the Function name scroll box, select COUNTIF 6. Click OK The Function Arguments dialog box appears.

106

7. In OR

the

Range

text

box,

type

the

range

of

cells

a. Click COLLAPSE DIALOG or b. Within your worksheet, select the range of cells to analyze NOTE: These are the cells which will be analyzed to see if they meet the criteria you select. c. Click RESTORE DIALOG or 2. In the Criteria text box, type the appropriate criteria, such as the numerical range, text value, or expression (e.g., >2) EXAMPLE: To count the number of students with a class rank of "senior," type senior 3. Click OK The appropriate number appears in the cell you selected and the formula appears in the Formula Bar. EXAMPLE: The formula should look something like =COUNTIF(C2:C11,"senior") with C2:C11 being the range, and "senior" the criteria.

Sumif
The Sumif function adds all items that meet a certain criteria. For example, you could add all the scores of students with a class rank of "senior." 1. Open the desired worksheet 2. Select the cell where you want the result of the function to appear 3. From the Insert menu, select OR Windows: The On the Insert Formula Bar, Function

Function...

click INSERT FUNCTION dialog box appears.

Macintosh: On the Standard toolbar, click PASTE FUNCTION The Paste Function dialog box appears. 4. Windows: From the Or select a category pull-down list, select All or Math & Trig Macintosh: From the Function category scroll box, select All or Math & Trig 5. Windows: From the Select a function scroll box, select SUMIF Macintosh: From the Function name scroll box, select SUMIF

107

6. Click The

OK Function Arguments dialog box appears.

7. In OR

the

Range

text

box,

type

the

range

of

cells

a. Click COLLAPSE DIALOG or b. Within your worksheet, select the range of cells to analyze NOTE: These are the cells which will be analyzed to see if they meet the criteria you select. c. Click RESTORE DIALOG or 2. In the Criteria text box, type the appropriate criteria (such as the numerical range or text value) EXAMPLE: If you would like to add the test scores of the students with a class rank of "senior," type senior OR a. Click COLLAPSE DIALOG or b. Within your worksheet, select the appropriate criteria c. Click RESTORE DIALOG or 3. In the Sum_range text box, type the range of cells EXAMPLE: If you would like to add the text scores of seniors, select the cell range that contains the test scores OR a. Click COLLAPSE DIALOG or b. Within your worksheet, select the range of cells to analyze NOTE: These are the cells which will be summed of the criteria has been met. c. Click RESTORE DIALOG or 4. Click OK The sum appears in the selected cell and the formula appears in the Formula Bar. EXAMPLE: The formula should look something like =SUMIF(C2:C11,"senior") with C2:C11 being the range and "senior" being the criteria. 108

Functions: Concatenate
The Concatenate function creates a text string by pulling data from specified fields. This function can join information such as first and last names, or names and scores, which are in separate fields. Up to 30 fields may be added together in this fashion. To create multiple text strings using identical sets of fields, you can select a range of cells in the Text text boxes, as long as the cell you selected for the results of the function is a row which includes the selected cells. The function will show only the text string for that row, but you can create text strings for the rest of the selected fields by copying the formula and pasting it into the Formula bar for cells in the corresponding rows for the rest of the information. 1. Open the desired Excel worksheet 2. Select the cell where you would like the result of the function to appear This should be in the same row as the information you will use to create a text string from. 3. From the Insert menu, select Function... OR Windows: The From the Insert Formula bar, Function click INSERT FUNCTION dialog box appears.

Macintosh: From the Standard toolbar, click PASTE FUNCTION The Paste Function dialog box appears. 4. Windows: From the Or select a category pull-down list, select All or Text Macintosh: From the Function category scroll box, select All or Text 5. Windows: From the Select a function scroll box, select CONCATENATE Macintosh: From the Function name scroll box, select CONCATENATE

109

6. Click The

OK Function Arguments dialog box appears.

7. In OR

the

Text

text

box,

type

the

range

of

cells

a. Click COLLAPSE DIALOG or b. On your worksheet, select the cells to include c. Click RESTORE DIALOG or 2. To add supplementary text between fields, in a separate text box, type the text in quotation marks. To add a space between fields, in a separate text box, type " ". 3. Repeat steps 7 and 8 for as many of the Text text boxes as necessary NOTES: When you click in the last text box available, another will appear, up to a maximum of 30. If you are using more text boxes than can be displayed, use the scroll bar on the right to view them. 4. Click OK The text string appears in the selected cell and the formula appears in the Formula bar. EXAMPLE: The formula should look something like =CONCATENATE(B2," ",A2) with B2 being Text 1, a space being Text 2, and A2 being Text 3.

Functions: Subtotal
110

The Subtotal function sections off a part of the worksheet so that calculations can be performed upon it. There are 11 different calculations which you can have performed on the subset of the worksheet, as shown in the Function Numbers table. You must select one of these calculations to be initially performed on the subset. You may, however, change the selection at any time by modifying the existing function if you need to perform other calculations on the data.

Function Numbers Using the Subtotal Function Filtering Modifying the Subtotal Function

Function Numbers
# 1 2 3 4 5 6 7 8 9 1 0 1 1 Calculation Description AVERAGE adds all entries and then divides by the number of entries COUNT COUNTA MAX MIN STDEV STDEVP SUM VAR VARP counts the number of entries containing numbers counts the number of entries that are not blank (includes text entries) reports the highest number of all the entries reports the lowest number of all the entries computes the standard deviation, assuming the selection is a sample of the entire population computes the standard deviation, assuming the selection is the entire population adds all entries together computes the variance, assuming the selection is a sample of the entire population computes the variance, assuming the selection is the entire population

PRODUCT multiplies all the entries together

Using the Subtotal Function


The Subtotal function will ignore any hidden rows within your worksheet. This becomes a factor if you filter your worksheet. Filtering your worksheet after performing the Subtotal function will provide you with subtotals on only the visible filtered rows. This is a handy way to obtain subtotal calculations of subsets within your data. For more information on filtering, refer to Filtering Your Database. 111

1. Open the desired worksheet 2. Select the cell where you want the result of the function to appear NOTE: If filtering your worksheet, make sure that the selected field is below your data, allowing you to see the results. 3. From the Insert menu, select Function... OR Windows: The On the Insert Formula Bar, Function click INSERT FUNCTION dialog box appears.

Macintosh: On the Standard toolbar, click PASTE FUNCTION The Paste Function dialog box appears. 4. Windows: From the Or select a category pull-down list, select All or Math & Trig Macintosh: From the Function category scroll box, select All or Math & Trig 5. Windows: From the Select a function scroll box, select SUBTOTAL Macintosh: From the Function name scroll box, select SUBTOTAL 6. Click OK The Function Arguments dialog box appears.

7. In the Function_num text box, type the number of the function you would like to perform NOTE: For more information, refer to Function Numbers. 8. In the Ref1 text box, type the range of cells OR a. Click COLLAPSE DIALOG or b. Select the range of cells to include c. Click RESTORE DIALOG or 2. Repeat step 8 for as many of the Ref text boxes as necessary NOTE:You may select up to 29 different fields to include in the subtotal. 3. Click OK The subtotal appears in the selected cell and the formula appears in the Formula Bar. HINT: The formula should look similar to =SUBTOTAL(1,D2:D11) with 1 (average) being the Function_num, and D2:D11 being Ref1. 112

Filtering
After you have your subtotal on a field in your worksheet, you can easily get the same information on subsets of that same field. You can do this by filtering the field. For more information on filtering, refer to Filtering Your Database. 1. Select the row of column headings, such as name, class, or age 2. From the Data menu, select Filter AutoFilter Pull-down lists appear in each of the selected cells.

3. From the desired pull-down list, select the desired option EXAMPLE: If you wanted to find the average age of "Sophomores," from the class cell pull-down list, select Sophomore The worksheet hides all other cells except those meeting the selected AutoFilter criteria. The new average is shown in the same cell where the first subtotal appeared. 4. To return to the unfiltered view, from the Data menu, select Filter AutoFilter

Modifying the Subtotal Function


Once you perform one of the Subtotal calculations on your data, you can change the calculation at any time by modifying the existing function. This allows you to perform additional calculations on the same data. 1. Select the cell where the Subtotal function is being performed The function appears in the Formula Bar. 2. On the Formula Bar, change the Function_num HINT: Choose from the list of possible calculations. 3. Press [Enter] or [return]

113

Inserting Dates and Times


Excel offers a variety of ways to include dates and times into your worksheets. Static and dynamic are two types of dates and times. Static dates and times will not change but dynamic dates and times will change as time progresses. Nevertheless, both static and dynamic dates and times are useful.

Inserting Dynamic Dates and Times Inserting Static Dates and Times

Inserting Dynamic Dates and Times


Dynamic dates and times are updated every time Excel recalculates, which is, by default, every time [Enter] or [return] is pressed. This is useful if you would like the current date and/or time to be displayed every time the worksheet is viewed or printed.

Inserting a Dynamic Date Only


1. Select the cell in which you want the date to appear 2. In the cell, type =today() 3. Windows: Press [Enter] Macintosh: [return] The current date appears in the cell and will be updated every time Excel recalculates. NOTE: For information on changing the format of the date, refer to Formatting Your Worksheets.

Inserting a Dynamic Date and Time


1. Select the cell in which you want the date and time to appear 2. In the cell, type =now() 3. Windows: Press [Enter] Macintosh: [return] The current date and time appear in the cell and will be updated every time Excel recalculates. NOTE: For information on changing the format of the date and time, refer to Formatting Your Worksheets.

Inserting Static Dates and Times


Static dates and times are not updated. The date or time that is inserted into the cell is the date or time immediately after the command is entered into the cell. This can be used to enter the date or time when the worksheet has been created.

Inserting a Static Date


114

1. Select the cell in which you want the date to appear 2. Windows: Press [Ctrl] + [;] Macintosh: Press [control] + [;] The current date appears in the cell and will not be updated. NOTE: For information on changing the format of the date, refer to Formatting Your Worksheets.

Inserting a Static Time


1. Select the cell in which you want the time to appear 2. Windows: Press [Ctrl] + [Shift] + [:] Macintosh: Press [Ctrl] + [Shift] + [:] The current time appears in the cell and will not be updated. NOTE: For information on changing the format of the time, refer to Formatting Your Worksheets.

115

Functions in Excel
A function is a small assignment that is performed to produce a result that can be reliably used without caring as to how the function works or how it was created. It is like when you pick up a TV remote control and press a button to change the channel. You dont care how the remote control works and you dont spend any time finding out why the channel changed. As in real world where we use various functions on cars, radio stations, food eating, etc, in the computer world, various functions are made available so you can simply use them to do your job. As a spreadsheet application, Microsoft Excel is equipped with various functions that can solve different types of calculations. In order to use a function more effectively, you should first know whether it is available and what you need to do to make it work. A function involves four main issues: The name of the function: Obviously, in order to use a function, you must know its name. Although the functions are not case-sensitive, it is a good idea to always write them in uppercase. The purpose of the function: what the function used for. Different functions are meant for different purposes. For example, when you press the power button on a TV remote control, the TV gets turned ON or OFF depending on whether it was already ON or OFF. Therefore, the purpose of the power button (that is, its function) is to turn the TV ON or OFF and vice versa What the function needs in order to carry its assignment: this need is called argument (or arguments). A function can use more than one argument. For example, you use one key to turn on the car. Another function may need more than one argument. The arguments can be the same kind. For example, some remote controls use two similar batteries. On a function that takes one argument, the argument may be required. In this case, you must provide it. If you don't, the function will not work (the result would be an error). In other circumstances, an argument may not be required. In this case, if you dont provide the argument, the function would use its own value, called a default argument. If a function takes more than one argument, all arguments may be required. In this case, if you fail to provide all of them, the function would not work. Another function that takes more than one argument may not require all of them. There are even cases when a function takes many arguments but none of them is required. When an argument is not required, you dont have to supply it. The person who creates a function also decides on the number of its arguments, if the argument(s) is/are required and, if the function takes more than one argument, which ones are required, whether all of them are required or none of them is required.

116

The result of the function: after using a function, you need its result so you can use it for its intended purpose. Various functions produce various results but each function is intended for a specific purpose.

117

The Absolute Value


The decimal numeric system counts from minus infinity (-) to infinity (+). This means that a number can be usually negative or positive, depending on its position from 0, which is considered as neutral. In some operations, the number considered will need to be only positive even if it is provided in a negative format. The absolute value of a number x is x if the number is (already) positive. If the number is negative, then its absolute value is its positive equivalent. For example, the absolute value of 12 is 12, while the absolute value of 12 is 12. To get the absolute value of a number, you can use one of the ABS() function. Its syntax is: ABS(number)

The Ceiling of a Number


Consider a floating number such as 12.155. As you can see, this number is between integer 12 and integer 13

On the other hand, consider a number such as 24.06. As this number is negative, it is between 24 and 25, with 24 being greater. In arithmetic, the ceiling of a number is the closest integer that is greater or higher than the number considered. In the first case, the ceiling of 12.155 is 13 because 13 is the closest number greater than or equal to 12.155. The ceiling of 24.06 is 24. To find the ceiling of a number, you can use the CEILING function used to obtain the ceiling of a number uses the following syntax: CEILING(number, significance) The function takes two arguments. The number argument is the one that will be considered. The significance argument is the nearest multiple significance

The Floor of a Number


118

Consider two floating numbers such as 128.44 and -36.72. The number 128.44 is between 128 and 129 with 128 being the lower. The number 36.72 is between 37 and 36 with 37 being the lower. The lowest but closest integer value of a number is referred to as its floor. For example, the floor of 128.44 is 128. The floor of 36.72 is 37.

119

To get the floor of a number, you can use the FLOOR function. Its syntax is: FLOOR(number, significance) The FLOOR() function takes two arguments. The first argument argument is the number to be considered. The second argument is the nearest multiple of significance.

The Power of a Number


We saw in Lesson8 that, to raise a number to another, you could use the ^ operator. Microsoft Excel provides a function to perform the same operation. The POWER() function is used to calculate the value of one number or expression raised to the power of another number. It uses the formula xy. The syntax of the POWER function is: POWER(number, power) This function takes two required arguments. The first argument, number, is used as the base number to be evaluated. The second argument, power, also called the exponent, will raise number to this value.

The Exponential
Microsoft Excel provides the EXP function used to calculate the exponential value of a number. Its syntax is: EXP(number) The argument, number, a double-precision value, represents the number to be evaluated. If the value of number is less than -708.395996093 (approximately), the result is reset to 0 and qualifies as underflow. If the value of the argument x is greater than 709.78222656 (approximately), the result is infinity and qualified as overflow.

The Log10
The LOG10 function calculates the base 10 logarithm of a number. The syntax of this function is: LOG10(number)

120

The number to be evaluated is passed as the argument number. The function returns the logarithm on base 10 using the formula: y = LOG10x which is equivalent to x = 10y

The Square Root


There are two forms of calculating the square root of a (real positive) number. The SQRT function is used to calculate the square root of a double-precision number. Its syntax is: SQRT(number) This function takes one argument as a positive floating number. After the calculation, the function returns the square root of x: = SQRT(E12)

Financial Functions
Microsoft Excel provides a series of functions destined to perform various types of financially related operations. These functions use common factors depending on the value that is being calculated. Many of these functions deal with investments or loan financing. The Present Value is the current value of an investment or a loan. For a savings account, a customer could pledge to make a set amount of deposit on a bank account every month. The initial value that the customer deposits or has in the account is the Present Value. The sign of the variable, when passed to a function, depends on the position of the customer. If the customer is making deposits, this value must be negative. If the customer is receiving money (lottery installment, family inheritance, etc), this value should be positive. The Future Value is the value the loan or investment will have when the loan is paid off or when the investment is over. For a car loan, a musical instrument loan, a financed refrigerator, a boat, etc, this is usually 0 because the company that is lending the money will not take that item back (they didn't give it to the customer in the first place, they only lend him or her some money to buy the item). This means that at the end of the loan, the item (such as a car, boat, guitar, etc) belongs to the customer and it is most likely still worth something. As described above and in reality, the Future Value is the amount the item would be worth at the end. In most, if not all, loans, it would be 0. On the other hand, if a customer is borrowing money to buy something like a car, a boat, a piano, etc, the salesperson would ask if the customer wants to put a "down payment", which is an advance of money. Then, the salesperson or loan officer can either use that down 121

payment as the Future Value parameter or simply subtract it from the Present Value and then apply the calculation to the difference. Therefore, you can apply some type of down payment to your functions as the Future Value. The Number Of Periods is the number of payments that make up a full cycle of a loan or an investment. The Interest Rate is a fixed percent value applied during the life of the loan or the investment. The rate does not change during the length of the Periods. It is very important to understand how these two arguments are passed to a function. The period could be the number of months of a year, which is 12; but it could be another length. Suppose a customer is getting a car loan that would be financed in 5 years. This is equivalent to 5 * 12 = 60 months. In the same way, a cash loan can stretch from 0 to 18 months, a carpenter truck loan can have a life financing of 40 months, and a condominium can be financed for 15 years of 12 months plus an additional 8 months; this is equivalent to (15 * 12) + 8 = 188 months. Here is the tricky part, especially as far as Microsoft Excel deals with its finance functions. If you pass the number of Periods in terms of years, such as 5 for a car loan that stretches over 5 years, then you can pass the Rate as a percentage value, such as 8.75%. If you pass the number of Periods in terms of months, for example you can pass it as 44 for a car that is financed in 3 years and 8 months, then you must communicate this to the Rate argument by dividing the Rate by 12. In other words, a Rate of 8.75% would be passed as 8.75%/12. If the Rate was typed in a cell named B2 that displays 8.75%, you can pass it as B2/12. For deposits made in a savings account, because their payments are made monthly, the rate is divided by the number of Periods of a year, which is 12. If an investment has an interest rate set at 14.50%, the Rate would be 14.50/12 = 1.208. Because the Rate is a percentage value, its actual value must be divided by 100 before passing it to the function. For a loan of 14.50% interest rate, this would be 14.50/12 = 1.208/100 = 0.012. The Payment is the amount the customer will be paying. For a savings account where a customer has pledged to pay a certain amount in order to save a set (goal) amount, this would be the amount the customer would pay every month. If the customer is making payments (car loan, mortgage, deposits to a savings account, etc), this value must be negative. If the customer is receiving money (lottery installment or annuity, family inheritance, etc), this value must be positive. The Payment Type specifies whether the payment is made at the beginning or the end of the period. For a monthly payment of an item financed like a car, a boat, a guitar, or a house this could be the end of every month.

122

The Future Value of an Investment


To calculate the future value of an investment, you can use the FV() function. The syntax of this function is: FV(Rate, Periods, Payment, PresentValue, PaymentType) Calculating the Future Value 1. Start a new workbook and fill up Sheet1 as follows:

2. Save it as Business 3. Double-click Sheet1 to put its label into edit mode. Type Future Value and press Enter 4. Click cell C8 and, on the main menu, click Insert -> Function... 5. In the Paste Function dialog box, in the Function Category list, click Financial. In the Function Name list, double-click FV and move the FV window so you can see the values on the worksheet 6. Click the box to the right of Rate and, on the worksheet, click cell C5 and type /12 7. In the FV window, click the box to the right of Nper and, on the worksheet, click cell C7 8. In the FV window, click the box to the right of Pmt and type 9. On the worksheet, click cell C6 10. In the FV window, click the box to the right of Pv and type 11. On the worksheet, click cell C4 12. Since this is a loan, the payments are expected at the end of the month. Therefore, in the FV window, click the box to the right of Type and type 0

123

13. Click OK

The Number of Periods of an Investment


To calculate the number of periods of an investment or a loan, you can use the NPER() function. Its syntax is: NPER(Rate, Payment, PresentValue, FutureValue, PaymentType);

Investment or Loan Payment


124

The PMT() function is used to calculate the regular payment of loan or an investment. Its syntax is: PMT(Rate, NPeriods, PresentValue, FutureValue, PaymentType) In the following example, a customer is applying for a car loan. The cost of the car will be entered in cell C4. It will be financed at a rate entered in cell C6 for a period set in cell C7. The dealer estimates that the car will have a value of $0.00 when it is paid off. 1. Double-click Sheet3 to put it in edit mode. Type Payments Amount and press Enter 2. Complete the worksheet as follows

3. Click cell C8 and type =PMT( 4. Click cell C6 and type /12, 5. Click cell C7 and type ,6. Click cell C4 and type , 7. Click cell C5 8. Type ,0) and, on the Formula Bar, click the Enter button

125

9. Suppose that, during the evaluation, a customer decides that she doesn't need a brand new car anymore. Also, she thinks that a 5-year car loan is too long. Furthermore, she wants to make a $4500.00 down payment to reduce the monthly payments. On the other side of the desk, the salesperson who wants to make a juicy commission on this loan has decided to increase the interest rate. Change the new values of the worksheet as follows and see the result

10. Save

the

workbook

The Amount Paid As Interest During a Period


When a customer is applying for a loan, an investment company must be very interested to know how much money it would collect as interest. This allows the company to know whether the loan is worth giving. Because the interest earned is related to the interest rate, a company can play with the rate (and also the length) of the loan to get a fair (?) amount. The IPMT() function is used to calculate the amount paid as interest on a loan during a period of the lifetime of a loan or an investment. It is important to understand what this 126

function calculates. Suppose a customer is applying for a car loan and the salesperson decides (or agrees with the customer) that the loan will be spread over 5 years (5 years * 12 months each = 60 months). The salesperson then applies a certain interest rate. The IPMT() function can help you calculate the amount of interest that the lending institution would earn during a certain period. In essence, you can use it to know how much money the company would earn in the 3rd year, or in the 4th year, or in the 1st year. Based on this, this function has an argument called Period, which specifies the year you want to find out the interest earned in. The syntax of the IPMT() function is: IPMT(Rate, Period, NPeriods, PresentValue, FutureValue, PaymentType) The Rate argument is a fixed percent value applied during the life of the loan. The PresentValue is the current value of the loan or investment. It could be the marked value of the car, the current mortgage value of a house, or the cash amount that a bank is lending. The FutureValue is the value the loan or investment will have when the loan is paid off. The NPeriods is the number of periods that occur during the lifetime of the loan. For example, if a car is financed in 5 years, this value would be (5 years * 12 months each =) 60 months. When passing this argument, you must remember to pass the right amount. The Period argument represents the payment period. For example, it could be 3 to represent the 3rd year of a 5 year loan. In this case, the IPMT() function would calculate the interest earned in the 3rd year only. The PaymentType specifies whether the periodic (such as monthly) payment of the loan is made at the beginning (1) or at the end (1) of the period. The FutureValue and the PaymentType arguments are not required.

1. To add a new worksheet, on the main menu, click Insert -> Worksheet 2. Double-click the new Sheet1 tab to put it in edit mode. Type Periodic Interest Earned and press Enter 3. Move the new worksheet to be the most right 4. Complete the worksheet as follows

127

5. Click cell C9 and type =IPMT( 6. Click cell C5 and type /12, 7. Click cell C6 and type , 8. Click cell C7 and type ,9. Click cell C4 and type , 10. Click cell C8 and type , 11. Type ,0) and, on the Formula Bar, click the Enter button

12. Save the workbook While the IPMT() function calculates the amount paid as interest for a period of a loan or an investment, the PPMT() function calculates the actual amount that applies to the balance of the loan. This is referred to as the principal. Its syntax is: 128

PPMT(Rate, Period, NPeriods, PresentValue, FutureValue, PaymentType) The arguments are the same as described in the previous sections.

1. Change

the

Periodic

Interest

Earned

worksheet

as

follows

2. Click cell C10 and type =PPMT( 3. Click cell C5 and type /12, 4. Click cell C6 and type , 5. Click cell C7 and type ,6. Click cell C4 and type , 7. Click cell C8 and type , 8. Type ,0) and, on the Formula Bar, click the Enter button

129

9. Save the workbook

The Present Value of a Loan or an Investment


The PV() function calculates the total amount that a future investment is worth currently. Its syntax is: PV(Rate, NPeriods, Payment, FutureValue, PaymentType) The arguments are the same as described earlier.

The Interest Rate


Suppose a customer comes to a car dealer and wants to buy a car. The salesperson would first present the available cars to the customer so the customer can decide what car he likes. After this process and during the evaluation, the sales person may tell the customer that the monthly payments would be $384.48. The customer may then say, "Wooooh, I can't afford that, man". Then the salesperson would ask, "What type of monthly payment suits you". From now on, both would continue the discussion. Since the salesperson still wants to make some money but without losing the customer because of a high monthly payment, the salesperson would need to find a reasonable rate that can accommodate an affordable monthly payment for the customer. The RATE() function is used to calculate the interest applied on a loan or an investment. Its syntax is: RATE(NPeriods, Payment, PresentValue, FutureValue, PaymentType, Guess) 130

All of the arguments are the same as described for the other functions, except for the Guess. This argument allows you to give some type of guess for a rate. This argument is not required. If you omit it, its value is assumed to be 10. 1. To add a new worksheet, on the main menu, click Insert -> Worksheet 2. Double-click the new Sheet1 tab to put it in edit mode. Type Interest Rate and press Enter 3. Move the new worksheet to be the most right 4. Change the Interest Rate worksheet as follows

5. Click cell C8 and type =-RATE( 6. Click cell C7 and type , 7. Click cell C6 and type ,8. Click cell C4 and type , 9. Click cell C5 and type ,0)*12 and, on the Formula Bar, click the Enter button

131

10. To use the ABS() function, change the function in cell C14 to =ABS(RATE(C7,C6,-C4, C5, 0)*12) and press Enter 11. Save the workbook

The Internal Rate of Return


The IRR() function is used to calculate an internal rate of return based on a series of investments. Its syntax is: IRR(Values, Guess) The Values argument is a series (also called an array or a collection) of cash amounts that a customer has made on an investment. For example, a customer could make monthly deposits in a savings or credit union account. Another customer could be running a business and receiving different amounts of money as the business is flowing (or losing money). The cash flows don't have to be the same at different intervals but they should (or must) occur at regular intervals such as weekly (amount cut from a paycheck), biweekly (401k directly cut from paycheck), monthly (regular investment), or yearly (income). The Values argument must be passed as a collection of values, such as a range of selected cells, and not an amount. Otherwise you would receive an error. The Guess parameter is an estimate interest rate of return of the investment. 1. To add a new worksheet, on the main menu, click Insert -> Worksheet 2. Double-click the new Sheet1 tab to put it in edit mode. Type Internal Rate of Return and press Enter 3. Move the new worksheet to be the most right 132

4. Change

the

worksheet

as

follows

5. Click cell D12 and type =IRR( 6. Select cells D4:D10 and, on the Formula Bar, click the Enter button

133

7. In cell D11, type 12 and click cell D12 8. In the Formula Bar, change the function to =IRR(D4:D10, D11) and press Enter (you shouldn't need any significant difference unless you change the range of cells such as D4:D8) 9. Save the workbook

The Net Present Value


The NPV() function uses a series of cash flows to calculate the present value of an investment. Its syntax is: NPV(Rate, Value1, Value2, ...) The Rate parameter is the rate of discount during one period of the investment. As the NPV() function doesn't take a fixed number of arguments, you can add a series of values as Value1, Value2, etc. These are regularly made payments for each period involved. Because this function uses a series of payments, any payment made in the past should have a positive value (because it was made already). Any future payment should have a negative value (because it has not been made yet). 1. To add a new worksheet, on the main menu, click Insert -> Worksheet 2. Double-click the new Sheet1 tab to put it in edit mode. Type Net Present Value and press Enter 3. Move the new worksheet to be the most right 4. Change the worksheet as follows

134

5. Click cell C14 and type =-NPV( 6. Click cell C13 and type , 7. Select cells C4:C12 and, on the Formula Bar, click the Enter button

135

8. To use the ABS() function, change =ABS(NPV(C13,C4:C12)) and press Enter 9. Save the workbook

the

function

in

cell

C14

to

136

Logical Function
A logical function is one that evaluates an expression and returns a Boolean result. For example, imagine you have a series of cells that represent employees last name. If you are interested to know what cell doesn't have a value (a last name), you can use a function. On the other hand, imagine you have a cell that is supposed to indicate whether an item must receive a discount, you can use a conditional function to check it. Most, if not all, logical functions check a condition and render a result. The condition is also called a criterion. A criterion can be something like "Check if the cell contains Male", or "Check if the salary is less than $12.35".

IF
To check whether a criterion is true or false before taking a subsequent action, you can use the IF() function. Its syntax is: IF(ConditionToTest, WhatToDoIfConditionIsTrue, WhatToDoIfConditionIsFalse) When it is called, the IF() function checks the truthfulness or negativity of the ConditionToTest argument. If the result is true, then it will execute the first expression, WhatToDoIfConditionIsTrue in our syntax. If the result is false, it will consider the second option, the WhatToDoIfConditionIsFalse parameter in our syntax.

Nested IF
The IF() function we have introduced above is used to check one condition and then take one or the other action. In some cases, you will need to check more than one condition. In other words, you may want to check a first condition. If that condition is false, you may want to yet check another condition. The pseudo-code used for such a scenario is: e.g =IF(B14>16.5,"A",IF(B14>14.5,"B",IF(B14>12.5,"C",IF(B14>12,"D","F"))))

VLOOKUP
Searches for a value in the first column of a table array and returns a value in the same row from another column in the table array. The V in VLOOKUP stands for vertical. Use VLOOKUP instead of HLOOKUP when your comparison values are located in a column to the left of the data that you want to find. =VLOOKUP(lookup_value,table_array,col_index_num,range_lookup) Lookup_value The value to search in the first column of the table array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.). Lookup_value 137

can be a value or a reference. If lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A error value. Two or more columns of data. Use a reference to a range or a range name. The values in the first column of table_array are the values searched by lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text are equivalent.
Table_array

The column number in table_array from which the matching value must be returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in the second column in table_array, and so on. If col_index_num is: Less than 1, VLOOKUP returns the #VALUE! error value.
Col_index_num Greater than the number of columns in table_array, VLOOKUP returns the #REF! error value.

A logical value that specifies whether you want VLOOKUP to find an exact match or an approximate match: If TRUE or omitted, an exact or approximate match is returned. If an exact match is not found, the next largest value that is less than lookup_value is returned. The values in the first column of table_array must be placed in ascending sort order; otherwise, VLOOKUP may not give the correct value. You can put the values in ascending order by choosing the Sort command from the Data menu and selecting Ascending. For more information, see Default sort orders. If FALSE, VLOOKUP will only find an exact match. In this case, the values in the first column of table_array do not need to be sorted. If there are two or more values in the first column of table_array that match the lookup_value, the first value found is used. If an exact match is not found, the error value #N/A is returned.
Range_lookup

Remarks When searching text values in the first column of table_array, ensure that the data in the first column of table_array does not have leading spaces, trailing spaces, inconsistent use of straight ( ' or " ) and curly ( or ) quotation marks, or nonprinting characters. In these cases, VLOOKUP may give an incorrect or unexpected value. For more information on functions that you can use to clean text data, see Text and Data functions When searching number or date values, ensure that the data in the first column of table_array is not stored as text values. In this case, VLOOKUP may give an incorrect or unexpected value. For more information, see Convert numbers stored as text to numbers. If range_lookup is FALSE and lookup_value is text, then you can use the wildcard characters, question mark (?) and asterisk (*), in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding the character.

138

A 1 2 3 4 5 6 7 8 9 10 Density 0.457 0.525 0.616 0.675 0.746 0.835 0.946 1.09 1.29 Formula =VLOOKUP(1,A2:C10,2)

B Viscosity 3.55 3.25 2.93 2.75 2.57 2.38 2.17 1.95 1.71 Description (result) Using an approximate match, searches for the value 1 in column A, finds the largest value less than or equal to 1 in column A which is 0.946, and then returns the value from column B in the same row. (2.17) Using an approximate match, searches for the value 1 in column A, finds the largest value less than or equal to 1 in column A, which is 0.946, and then returns the value from column C in the same row. (100) Using an exact match, searches for the value .7 in column A. Because there is no exact match in column A, an error is returned. (#N/A) Using an approximate match, searches for the value 0.1 in column A. Because 0.1 is less than the smallest value in column A, an error is returned. (#N/A) Using an approximate match, searches for the value 2 in column A, finds the largest value less than or equal to 2 in column A, which is 1.29, and then returns the value from column B in the same row. (1.71)

C Temperature 500 400 300 250 200 150 100 50 0

=VLOOKUP(1,A2:C10,3,TRUE )

=VLOOKUP(.7,A2:C10,3,FAL SE)

=VLOOKUP(0.1,A2:C10,2,TR UE)

=VLOOKUP(2,A2:C10,2,TRUE )

139

HLOOKUP
Searches for a value in the top row of a table or an array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.) of values, and then returns a value in the same column from a row you specify in the table or array. Use HLOOKUP when your comparison values are located in a row across the top of a table of data, and you want to look down a specified number of rows. Use VLOOKUP when your comparison values are located in a column to the left of the data you want to find. =HLOOKUP(lookup_value,table_array,row_index_num,range_lookup) Lookup_value is the value to be found in the first row of the table. Lookup_value can be a value, a reference, or a text string. Table_array is a table of information in which data is looked up. Use a reference to a range or a range name. The values in the first row of table_array can be text, numbers, or logical values. If range_lookup is TRUE, the values in the first row of table_array must be placed in ascending order: ...-2, -1, 0, 1, 2,... , A-Z, FALSE, TRUE; otherwise, HLOOKUP may not give the correct value. If range_lookup is FALSE, table_array does not need to be sorted. Uppercase and lowercase text are equivalent. You can put values in ascending order, left to right, by selecting the values and then clicking Sort on the Data menu. Click Options, click Sort left to right, and then click OK. Under Sort by, click the row in the list, and then click Ascending. Row_index_num is the row number in table_array from which the matching value will be returned. A row_index_num of 1 returns the first row value in table_array, a row_index_num of 2 returns the second row value in table_array, and so on. If row_index_num is less than 1, HLOOKUP returns the #VALUE! error value; if row_index_num is greater than the number of rows on table_array, HLOOKUP returns the #REF! error value. Range_lookup is a logical value that specifies whether you want HLOOKUP to find an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. In other words, if an exact match is not found, the next largest value that is less than lookup_value is returned. If FALSE, HLOOKUP will find an exact match. If one is not found, the error value #N/A is returned. 140

Remarks
1. 2. 3.

If HLOOKUP can't find lookup_value, and range_lookup is TRUE, it uses the largest value that is less than lookup_value. If lookup_value is smaller than the smallest value in the first row of table_array, HLOOKUP returns the #N/A error value. If range_lookup is FALSE and lookup_value is text, you can use the wildcard characters, question mark (?) and asterisk (*), in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
A 1 2 3 4 Axles 4 5 6 Formula =HLOOKUP("Axles",A1:C4,2,TRUE) B Bearings 4 7 8 Description (Result) Looks up Axles in row 1, and returns the value from row 2 that's in the same column. (4) Looks up Bearings in row 1, and returns the value from row 3 that's in the same column. (7) Looks up B in row 1, and returns the value from row 3 that's in the same column. Because B is not an exact match, the next largest value that is less than B is used: Axles. (5) Looks up Bolts in row 1, and returns the value from row 4 that's in the same column. (11) Looks up 3 in the first row of the array constant, and returns the value from row 2 in same column. (c) C Bolts 9 10 11

=HLOOKUP("Bearings",A1:C4,3,FALSE)

=HLOOKUP("B",A1:C4,3,TRUE)

=HLOOKUP("Bolts",A1:C4,4)

=HLOOKUP(3, {1,2,3;"a","b","c";"d","e","f"},2,TRUE)

141

Index
Returns a value or the reference to a value from within a table or range. There are two forms of the INDEX function: the array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.) form and the reference form. Array form Returns the value of an element in a table or an array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.), selected by the row and column number indexes. =INDEX(array,row_num,column_num) is a range of cells or an array constant. If array contains only one row or column, the corresponding row_num or column_num argument is optional. If array has more than one row and more than one column, and only row_num or column_num is used, INDEX returns an array of the entire row or column in array.
Array

selects the row in array from which to return a value. If row_num is omitted, column_num is required.
Row_num

selects the column in array from which to return a value. If column_num is omitted, row_num is required.
Column_num

Remarks If both the row_num and column_num arguments are used, INDEX returns the value in the cell at the intersection of row_num and column_num. If you set row_num or column_num to 0 (zero), INDEX returns the array of values for the entire column or row, respectively. To use values returned as an array, enter the INDEX function as an array formula (array formula: A formula that performs multiple calculations on one or more sets of values, and then returns either a single result or multiple results. Array formulas are enclosed between braces { } and are entered by pressing CTRL+SHIFT+ENTER.) in a horizontal range of cells for a row, and in a vertical range of cells for a column. To enter an array formula, press CTRL+SHIFT+ENTER. Row_num and column_num must point to a cell within array; otherwise, INDEX returns the #REF! error value.

142

1.

Auditing Mode.
A B Data Lemons Pears Description (Result) Value at the intersection of the second row and second column in the range (Pears) Value at the intersection of the second row and first column in the range (Bananas)

1 2 3

Data Apples Bananas Formula =INDEX(A2:B3,2, 2) =INDEX(A2:B3,2, 1)

Example 2

1.

Auditing Mode.
A B Description (Result) Value in the first row, second column in the array constant (2) Value in the second row, second column in the array constant (4)

1 2 3

Formula =INDEX({1,2;3,4},0, 2)

Reference form Returns the reference of the cell at the intersection of a particular row and column. If the reference is made up of nonadjacent selections, you can pick the selection to look in. =INDEX(reference,row_num,column_num,area_num) is a reference to one or more cell ranges.If you are entering a nonadjacent range for the reference, enclose reference in parentheses. If each area in reference contains only one row or column, the row_num or column_num argument, respectively, is optional. For example, for a single row reference, use INDEX(reference,,column_num).
Reference Row_num

is the number of the row in reference from which to return a reference. is the number of the column in reference from which to return a reference. 143

Column_num

selects a range in reference from which to return the intersection of row_num and column_num. The first area selected or entered is numbered 1, the second is 2, and so on. If area_num is omitted, INDEX uses area 1.
Area_num

144

Remarks After reference and area_num have selected a particular range, row_num and column_num select a particular cell: row_num 1 is the first row in the range, column_num 1 is the first column, and so on. The reference returned by INDEX is the intersection of row_num and column_num. If you set row_num or column_num to 0 (zero), INDEX returns the reference for the entire column or row, respectively. Row_num, column_num, and area_num must point to a cell within reference; otherwise, INDEX returns the #REF! error value. If row_num and column_num are omitted, INDEX returns the area in reference specified by area_num. The result of the INDEX function is a reference and is interpreted as such by other formulas. Depending on the formula, the return value of INDEX may be used as a reference or as a value. For example, the formula CELL("width",INDEX(A1:B2,1,2)) is equivalent to CELL("width",B1). The CELL function uses the return value of INDEX as a cell reference. On the other hand, a formula such as 2*INDEX(A1:B2,1,2) translates the return value of INDEX into the number in cell B1.
Auditing Mode.
A 1 2 3 4 5 6 7 8 9 10 11 Almonds Cashews Peanuts Walnuts Formula =INDEX(A2:C6,2,3) 2.80 3.55 1.25 1.75 Description (Result) The intersection of the second row and third column in the range A2:C6, which is the content of cell C3. (38) The intersection of the second row and second column in the second area of A8:C11, which is the 10 16 20 12 Fruit Apples Bananas Lemons Oranges Pears B Price 0.69 0.34 0.55 0.25 0.59 C Count 40 38 15 25 40

=INDEX((A1:C6,A8:C11),2,2 ,2)

145

content of cell B9. (3.55) =SUM(INDEX(A1:C11,0,3,1) ) =SUM(B2:INDEX(A2:C6,5,2) ) The sum of the third column in the first area of the range A1:C11, which is the sum of C1:C6. (216) The sum of the range starting at B2, and ending at the intersection of the fifth row and the second column of the range A2:A6, which is the sum of B2:B6. (2.42)

Match
Returns the relative position of an item in an array (array: Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument.) that matches a specified value in a specified order. Use MATCH instead of one of the LOOKUP functions when you need the position of an item in a range instead of the item itself. =MATCH(lookup_value,lookup_array,match_type)
Lookup_value

is the value you use to find the value you want in a table.

Lookup_value is the value you want to match in lookup_array. For example, when you look up someone's number in a telephone book, you are using the person's name as the lookup value, but the telephone number is the value you want. Lookup_value can be a value (number, text, or logical value) or a cell reference to a number, text, or logical value. is a contiguous range of cells containing possible lookup values. Lookup_array must be an array or an array reference.
Lookup_array

is the number -1, 0, or 1. Match_type specifies how Microsoft Excel matches lookup_value with values in lookup_array.
Match_type

If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., AZ, FALSE, TRUE. If match_type is 0, MATCH finds the first value that is exactly equal to lookup_value. Lookup_array can be in any order. If match_type is -1, MATCH finds the smallest value that is greater than or equal to lookup_value. Lookup_array must be placed in descending order: TRUE, FALSE, Z-A, ...2, 1, 0, -1, -2, ..., and so on. If match_type is omitted, it is assumed to be 1.

146

Remarks MATCH returns the position of the matched value within lookup_array, not the value itself. For example, MATCH("b",{"a","b","c"},0) returns 2, the relative position of "b" within the array {"a","b","c"}. MATCH does not distinguish between uppercase and lowercase letters when matching text values. If MATCH is unsuccessful in finding a match, it returns the #N/A error value. If match_type is 0 and lookup_value is text, you can use the wildcard characters, question mark (?) and asterisk (*), in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
A 1 2 3 4 5 Product Bananas Oranges Apples Pears Formula =MATCH(39,B2:B5, 1) =MATCH(41,B2:B5, 0) =MATCH(40,B2:B5,1) B Count 25 38 40 41 Description (Result) Because there is not an exact match, the position of the next lowest value (38) in the range B2:B5 is returned. (2) The position of 41 in the range B2:B5. (4)

Returns an error because the range B2:B5 is not in descending order. (#N/A)

147

Creating a Pivot Table


In Microsoft Excel, you can easily use a list as a database. A list is a labeled series of rows that contain similar data. For example, a list can be a listing of clients and their phone numbers, or a list of ledger or payroll entries. You can think of a list as a simple database, where rows are records and columns are fields. When you perform database tasks, such as sorting, subtotaling or filtering data, Microsoft Excel automatically recognizes the list as a database and uses the following list elements to organize the data. The columns in the list are the fields in the database. The column labels in the list are the field names in the database. Each row in the list is a record in the database.

Using Excel as a database makes it a far more powerful tool than just using it as a spreadsheet. In order to benefit from Excels neat database capabilities, you need to properly set up the information on your spreadsheet as a database, as described above. If you dont, you will not be able to perform database tasks. For example, make sure the column labels of your database are consecutive and you dont skip any columns and end up with columns with no column labels within your database. Similarly make sure you dont have totally blank rows within your database. If you do, this would break up your database and the database tasks you perform will only apply to a part of your database, resulting in erroneous reports. It is OK to have some blank cells in a row but it is not OK to have a row that has no information in any of its cells. When you work with large amounts of data, scrolling up, down, right and left will only create frustration for you and will never give you any useful information. By using Excel database functions, literally, in a matter of seconds you can turn a large quantity of raw data into a meaningful, good looking, useful report. It is easier than you might imagine. You can always start with a list and add fields to it. All it takes is to type in a column label in a column adjacent to your database (without skipping any columns) and enter your additional information in that column. Or you may insert a column in your database and use it as the additional field by typing a column heading. The main Excel database tasks are sorting, subtotaling, filtering and the most powerful of all is pivot tables. All these features are covered in this manual.

What is a Pivot Table


A pivot table is an interactive worksheet table that quickly summarizes large amounts of data using calculation methods you choose. It is called a pivot table because you can rotate its row and column headings around the core data area to give you different views of the source data. As the source data changes, you can update a pivot table. If you change data in the source list or table, by adding new rows (records) or columns (fields), there are ways to update (or refresh) the pivot table. However, the safest way 148

seems to be deleting the sheet which contains your pivot table and start over by creating a new pivot table, which usually takes only a few seconds. Note: There is no limit, other than available memory, to the number of pivot tables that can be defined in the same workbook-or even on the same worksheet. The following table is a sample report which shows summarized expense for three fiscal years by type of expense. In a matter of seconds hundreds of rows of detail data get summarized as shown below using the power of pivot tables.

You can even make the report look nice as follows, using Autoformat which is also explained in this manual on page 34:

149

Make sure you pick one cell in the body of your database, meaning any cell below the column labels where there is data. Excel will recognize the boundaries of your database.

PivotTable Wizard Step 1 of 3 On the menu bar click on Data, then click on Pivot Table and PivotChart Report, select the first option which is Microsoft Excel list or Database and click on Next. PivotTable Wizard Step 2 of 3 Since your cell pointer was in the body of the database, Excel automatically knows the range of your database. Here, just click Next. PivotTable Wizard Step 3 of 3 Click on Layout which is button to the left. Here is the heart of the pivot table where you get to design your report. Every field of your database appears as a button to the right. Simply drag the field(s) that you want your data summarized by to the Row and/or Column areas. Hit OK and then hit Finish. Keep in mind that the following are just examples. You can just as easily summarize your reports by other fields that are of more interest to you. Also, Excel automatically includes grand totals and subtotals in the pivot table, so remove any subtotals from your list by choosing Data from the menu bar, then Subtotals and click on Remove All. Otherwise, pivot table will not allow you to proceed through the final step and you will get an error message. Setting up the Layout Area 150

Drag the field Sub Code (on the right side of screen) to the ROW area (left side of screen). Then drag the Fiscal Year field to the COLUMN area. Then drag the numeric field Expense from the right side of the screen to the DATA area.

Double-click here

Remember that the DATA area contains the fields you want summarized. If instead of Sum it defaults to Count, double click on Count of Expense and choose Sum as shown below and click OK.

151

When done, click OK. Here is the result of your pivot table. The pivot table is created on a new sheet in the workbook.

Double-click here to rename the sheet.

You can rename the sheet that contains the pivot table by double clicking on the sheet tab name and typing your new meaningful sheet name. When you create a pivot table, the Pivot Table toolbar will appear on your screen and it looks like this:

If you dont see this toolbar then you can choose the Toolbar command from the View menu and choose PivotTable. The best way to learn about pivot tables is through experimenting. Try positioning each field which is represented by buttons as a row category, column category, and page the pivot table will reveal different information about the underlying data with each layout.

152

Graphing Your Report


You can easily define a graph from your report. Lets say we want to graph total travel expenses for a department over three fiscal years. After extracting the data and creating the pivot table, take the following steps. First, you need to select the cells for the graph. Select cells A3 to B5. Dont include the totals in the chart. Also, dont start from A2 or you wont be able to select the cells. After you select the cells for the graph, look for the Chart Wizard button on the pivot

table toolbar. Click once on this button.

. You will see the following.

153

Editing your Graph


If you wish to edit your graph, first single click on the graph to get into the graph edit mode. If you want to change the color of the bar, double-click on the bar you want to change. If you want to change the color of the background, double-click on the background and you can change the color. After you make your changes, click once outside the graph to exit graph edit. If you want to change the graph type to a pie or a line graph, first single click to get into the graph edit mode then while your cursor is on a blank section of the chart, single click the right mouse button (shortcut) and click on Chart Type, select your desired chart type and click OK or use the chart toolbar to make changes.

154

CUSTOMIZING A PIVOT TABLE


Creating a pivot table is only the first step in making it work for you. You can choose how a pivot table is organized, formatted and calculated. You can also easily customize the portion of the source data it displays.

Redesigning the Pivot Table Report


To add detail to existing data in a pivot table, add a row or column field. To display smaller subsets of data, use page fields. To redesign the report i.e., add a row, column, or page field, select a cell in the pivot table, and then click on the first button on the left of this toolbar , then click on the Layout button to the left of the pop up screen to go back to the drawing board or layout screen. Try this with the first example that you tried out earlier. Drag the Sub and Fiscal Year fields off of the layout screen and set up the new screen to look like this

This will sum the expenses by Sub-Object Title for each Project When done, click on OK. You will get this report.

155

Including an Additional Data Field


You can summarize more than one data field from the source list or table in a pivot table. For example, if your source list has two numeric fields, such as gross salaries and employee benefits, you can display summary data for both of them. Lay out the pivot table design with both numeric fields in the Data area as follows and click OK,

156

Using the Page Option


The Page option in the layout screen lets you look at one item at a time. You can really use this feature as a filter. Unlike items in row and column fields, the items and associated data for a page field are displayed one at a time on the worksheet. Once again, go back to the layout screen as shown above and set up this pivot table. This again will sum the expenses by Sub-Object Summary for all projects. We will use the Page option to look at one project at a time. To do this, drag the Project field from the right side to the Page button on the left side as shown below. When done, click on the OK button.

Notice cell B1 on your finished report where the word All is. This means you are looking at All the projects. Click on the down arrow next to all and you will see a list of the different projects to pick from and hit OK.

157

The figure below shows just the project2 expenses. Notice how the numbers have changed from the previous report. Select some other projects, again click on cell B1 to choose another project and watch the numbers change.

Keep in mind you can have more than one field in the Page area. The more page fields you have, the more filtered the data is on a page. For example, a pivot table with the single page field Project shows total expenses for only one project at a time. Adding the page field Sub-Object Title filters the data even more by displaying total expense data only for the selected sub-object title for the selected project.

Displaying Pages on Separate Worksheets


Now, suppose you want to print separate reports for different projects or save them as separate reports. First, use the page button arrow to switch back to All. Then follow these steps: 1. Select a cell anywhere inside the pivot table. 2. Click the Show Pages tool on the Pivot Toolbar.

158

Depending on your layout, there can be more than one page field. The Show Pages dialog box is displayed, letting you select which field will determine the page breaks.

3. Select Project from the list, and click OK. The following figure shows the result.

Notice that three new worksheets have been inserted into the workbook one for each project.

Grouping Your Data


Grouping is another feature in pivot tables that you might find useful at times. The grouping feature is not addressed in this manual.

3 new worksheets

159

Representing Your Dollar Amounts as Percentages of a Column or a Row


Each cell in the following example is shown as a percentage of the column.

The following steps will show you how to create such a report. Lets say you are working with detail payroll data for 3 months. Issue the Pivot Table command from the Data menu to get to the ayout screen as shown below.

160

Double-click on the Sum of Time to create a custom calculation. Once you see the top section of the screen below, click on Options. Then click on the arrow next to the Show data as box and set that option as % of column.

Click OK, then OK and you will get the report that we just saw with percentages in all columns. However, at first it will be for the whole department. Click on the arrow next to Cell B1 to pick one employee at a time. Custom calculations for PivotTable data fields The following functions are available for custom calculations in data fields. If you want to create a formula to work with PivotTable data, you can create a calculated field or a calculated item. Function Difference From Result

Displays all the data in the data area as the difference from the value for the specified Base field and Base item. The base field and base item provide the data used in the custom calculation. % Of Displays all the data in the data area as a percentage of the value for the specified Base field and Base item. The base field and base item provide the data used in the custom calculation. 161

% Difference From

Running Total In % of row row. % of column

Displays all the data in the data area as the difference from the value for the specified Base field and Base item, but displays the difference as a percentage of the base data. The base field and base item provide the data used in the custom calculation. Displays the data for successive items as a running total. You must select the field for which you want to show the items in a running total. Displays the data in each row as a percentage of the total for each

Displays all the data in each column as a percentage of the total for each column. % of total Displays the data in the data area as a percentage of the grand total of all the data in the PivotTable. Index Displays the data by using the following calculation:((value in cell) x (Grand Total of Grand Totals)) / ((Grand Row Total) x (Grand Column Total))

Displaying The Detail Data Behind A Summarized Amount


When viewing summary data in a pivot table, you may observe a number that requires explanation. You can easily display the source rows or records used to calculate the value of a cell in the data area. Simply double-click the cell that requires explanation. Excel will show you the rows from the database used in the calculation. Also notice that Excel creates a new sheet in the workbook. You may delete this sheet after you look up the detail information, if you dont need it any more.

Sorting a Pivot Table Report


You can sort a Pivot Table as shown below. To try this out, in the earlier example of expenses by Project, pick one cell in the Expense column of the pivot table that shows expenses of project 1 and click the Descending Sort button and you will see subobject title with the highest amount of expense listed on the first line.

162

If for some reason you need to sort in reverse alphabetical order of type of expense, pick a cell in the Sub-Object Title column and click on the icon.

Collapsing and Expanding a Pivot Table


Sometimes, within a pivot table, you may want to view more or less detail. When there are more than one row or column categories, the level of detail can be easily expanded and collapsed. Consider the following pivot table. You have the Project and SubObject Title fields in the Row section and Sum of Expense in the Data area. If you dont want to see the detail sub-object amounts that make up the total of project 1, double-click on the label project 1 , cell A5, to collapse the pivot table. The following figure shows the pivot table after cell A5 has been double-clicked .

163

Hiding a Row or Column Item


To remove data from a single row or column in a pivot table, hide the associated item. For example, lets say you have pulled down payroll data for your department and you create a pivot table report showing gross earnings by fund for each person as shown below. You realize you dont want funds 19900 and 182XX to be included in your report. Click on the arrow next to the heading of the Fund field in your pivot table report. Uncheck the funds you dont want included and hit OK.

164

Your new report will not include funds 182XX and 19900. To include them again, click on the arrow next to fund heading again and check funds 182XX and 19900. Caution: if you redesign your report and dont include the Fund field in your report, even though you have indicated to hide 2 funds, the instruction to hide will be ignored and they will be included in your total amounts.

Suppressing Subtotals
Sometimes you may want your summarized report to have two descriptive fields for a particular numeric field. For example, you may want to summarize your payroll data by person and see employee name, as well as employee number and total gross salary. If you layout your pivot table as follows:

165

Double-click here to suppress totals

Your report will look like this:

166

The reason we dont like this report, is that it gives subtotals by Employee Name as well as by Employee ID and we only need one. We dont want the lines that say Total next to the employee name. In other words, we want to suppress subtotals by Employee Name. To accomplish this, double click on the button that says Name. Once you see the following screen,

click on None for Subtotals. Click OK and you will get the following report:

Copy Paste Special Value a Pivot Table Report Since a pivot table maintains a link to the source data, you cannot directly edit the data area of a pivot table. To convert a pivot table to a worksheet range that you can edit, copy the pivot table using the Copy command on the Edit menu (or the shortcut right 167

mouse button). Then paste it into a new location using the Paste Special command on the Edit menu (or the shortcut right mouse button). Select the Values option button in the Paste Special dialog box and click OK. You can use this feature to use a large amount of raw data, build a pivot table, perform copy-paste special-value on it and basically create a new simpler database with summarized data and now use this database as source for a further summarized and rolled up pivot table report. An example to help illustrate this concept is as follows: We have pulled down payroll report for our entire department for 3 months. We simply need to know the average benefit rate for each employee for this time period. To calculate that, we need to divide total benefit amount by total gross earnings by employee to get the average benefit rate. First run a pivot report by employee for gross earnings only. Click on A1 to select the entire pivot table report. On the menu bar click on Edit, then Copy.

Go to a new sheet, select A1. On the menu bar click on Edit, then select Paste Special. In the Paste Special Dialog Box, click on Values, then click OK.

168

You will simply get a list of employees and their total gross salary, without it being a pivot table any more. Now go back to redesign your pivot table report. Remove Sum of Gross Earnings and drag Total Benefits to the Data area. Perform the same copypaste special-value as just described. However, instead of pasting in cell A1, paste special in cell C1. After formatting the numbers, this is what it will look like:

Adjust the headings to say Total Salary and Total Benefits. After verifying that the names are properly lined up, delete column C because you already have the names in column A. (Delete the last line of your data which indicates the Grand Total). Now you can add a formula in the last column, dividing total benefits by total gross. REMEMBER to give this new column a heading, i.e. Benefit rate, so that it becomes an integral part of your newly created database. Format this last column to percentages. You now have a new database showing average of actual benefit rates of all your employees based on three months of payroll data!

169

Changing Field Button Labels


The text that is used on the field buttons is determined by the field names in your database. These names may not be very friendly, so you may want to change them without changing the source database. Pick a cell in the column for which you want to rename the heading. Click the Pivot Table Field button on the Pivot Table Toolbar Table field dialog box. . Change the name in the Pivot

Or click the field button in your pivot table report the button text displays on the formula bar. Use the formula bar to edit the text, just as you would edit the contents of a cell. (Or, double-click the field button in your pivot table, and change the Name in the Pivot Table Field dialog box). Using Form to facilitate Viewing and Editing Excel Database

170

Automating Excel with Macros


The purpose of this document is to introduce you to macros, another Excel feature for automating your work. A macro is a shortcut for performing a series of actions and is useful for automating complex or repetitive tasks. Macros are helpful if the work is being shared with someone else, because it is easier to explain one step-activate (run) the macro-than it is to explain several steps. For a macro to be worthwhile, the series of actions you wish to accomplish must be consistent. When creating a macro, planning can be very helpful. Knowing specifically what you want the macro to accomplish, and in what order, can save a lot of time, editing, and frustration. When the macro is saved, the information is stored as a part of the current template and will be available for all documents based on that template. You can also copy macros to documents based on other templates. Once a macro is created, you can activate (run) it by using the Macro dialog box. Or, if you choose to assign a shortcut to the macro, you can activate it by pressing a keyboard combination, selecting a menu choice, or making a choice from a toolbar.

Macro Tips Accessing the Record New Macro Command Creating & Recording a New Macro Running a Macro Suspending a Macro Deleting a Macro Advanced Macros

Macro Tips
As you are creating a macro, you will be requested to assign a name to the macro and to indicate where the macro will be stored. The following guidelines and tips can help you make the best decision.

Naming a Macro
Macro names must:

begin with a letter contain no spaces contain no special characters (e.g., @, %, &, ^) have the appropriate name from the following list to run automatically:

171

AutoExec the macro runs when Excel is opened AutoExit AutoOpe n AutoNew the macro runs when you exit Excel the macro runs when you open a worksheet the macro runs when you create a new worksheet

AutoClose the macro runs when you close the current worksheet

Saving a Macro
A macro is saved as part of a template. If the use of the macro is limited to specific types of worksheets and you have a template for that type of worksheet, it should be stored in that template.

Assigning Macros
While it is not required to assign a macro to a second location, doing so can make the macro easier to use and save more time. Depending on your personal style of working with Excel, you may want to assign the macro to a keystroke combination, a menu, or a toolbar. You can assign the macro to all three if you want.

Recording Notes
Macros can be created by recording keystrokes (not mouse actions like selecting text) or by writing the macro using the Visual Basic programming language. This document focuses on macros that can be created through the recording method. WARNING: If you are working with a multi-layer dialog box (one with tabs at the top), only the changes on the current tab are recorded when you click OK. If you want to record changes on more than one layer, you will need to access the dialog box once for each layer, clicking OK as you complete the changes on that layer.

Accessing the Record New Macro Command


You can access the Record New Macro command through a menu or from a toolbar.

Accessing the Record New Macro Command: Menu Option


1. From the Tools menu, select Macro The Record Macro dialog box appears. Record New Macro

Accessing the Record New Macro Command: Toolbar Option


172

If you would prefer to have the Record New Macro command available on a toolbar, follow the instructions: Windows: 1. From The the View menu, Customize select dialog Toolbars box Customize... appears.

2. Select the Commands tab 3. From the Categories scroll box, select Tools 4. From the Commands scroll box, click and drag MACROS... and RECORD NEW MACRO... to the Standard toolbar NOTE: You may only click and drag one command to the toolbar at a time. 5. Click CLOSE 6. On the Standard toolbar, click RECORD MACRO... The Record Macro dialog appears. Macintosh:

173

1. From the View menu, select Toolbars Customize Toolbars/Menus... The Customize Toolbars/Menus dialog box appears.

2. Select the Commands tab 3. From the Categories scroll box, select Tools 4. From the Commands scroll box, click and drag MACROS... and RECORD NEW MACRO... to the Standard toolbar NOTE: You may only click and drag one command to the toolbar at a time. 5. Click OK 6. On the Standard toolbar, The Record Macro dialog appears. click RECORD MACRO...

Creating & Recording a New Macro


The Record New Macro command of Excel creates macros using the Record Macro dialog box pictured below. Using this dialog box, you will name, describe, and assign the storage and access locations of the macro(s) you create. 1. Access The the Record Record Macro Macro dialog dialog box box appears.

174

2. In the Macro name text box, type the name for the new macro NOTE: For information on naming conventions, refer to Naming a Macro. 3. OPTIONAL: In the Shortcut key text box, type a letter that can be used to activate the macro 4. OPTIONAL: In the Description text box, type a short narrative description for the macro 5. From the Store macro in pull-down list, select the appropriate option NOTE: For more information, refer to Saving a Macro. 6. Click OK The Macro Record toolbar appears in the window with your document.

7. Perform the activity that you want the macro to accomplish 8. When done, on the Macro Record toolbar, click STOP RECORDING OR From the Tools menu, select Macro Stop Recording The macro is saved as part of the template you chose. 9. Continue with Running a Macro

Running a Macro
We recommend that you save your file before running the macro. Then, if the results are undesirable you can close the file without saving it and reopen the version that was saved just prior to running the macro.

Running a Macro: Dialog Box Option


1. If the insertion point is critical, set the insertion point in the appropriate location 2. From the Tools menu, select Macro Macros OR On the Standard toolbar, click RUN MACRO The Macro dialog box appears. HINT: If the Run Macro button does not appear on the Standard toolbar, follow steps 1-5 in Accessing the Record New Record: Toolbar. 3. From the Macro name scroll box, select the macro you want to run HINT: The Description text box contains the description of the macro which you provided while creating it. 5. Click RUN

Running a Macro: Keyboard Option


1. If the insertion point is critical, set the insertion point in the appropriate location 2. Press the appropriate keyboard combination 175

Suspending a Macro
If you are running a macro and need to stop it, you may do so. 1. Press [Esc] 2. In the Microsoft Visual Basic dialog box, click END

Deleting a Macro
WARNING: If you delete a macro, it will be removed from the template and will not be available to any workbook. 1. From the Tools menu, select Macro Macros OR On the Standard toolbar, click RUN MACRO The Macro dialog box appears. HINT: If the Run Macro button does not appear on the Standard toolbar, follow steps 1-5 in Accessing the Record New Record: Toolbar. 2. From the Macro name scroll box, select the macro you want to delete 3. Click DELETE A confirmation dialog box appears. 4. Click YES NOTE: Deleting a macro does not remove the effects of the macro once it has been run; it makes the macro unavailable for future use. 5. Repeat steps 2-4 until all the unwanted macros are deleted

Advanced Macros
Interactive Macros Some macros allow you to ask the user for input. In order to do this, you need to work with the Visual Basic programming language. Editing a Macro The editing of macros requires some programming knowledge. Simple macros are often easier to recreate than edit.

176

You might also like