- •About the Author
- •About the Technical Editor
- •Credits
- •Is This Book for You?
- •Software Versions
- •Conventions This Book Uses
- •What the Icons Mean
- •How This Book Is Organized
- •How to Use This Book
- •What’s on the Companion CD
- •What Is Excel Good For?
- •What’s New in Excel 2010?
- •Moving around a Worksheet
- •Introducing the Ribbon
- •Using Shortcut Menus
- •Customizing Your Quick Access Toolbar
- •Working with Dialog Boxes
- •Using the Task Pane
- •Creating Your First Excel Worksheet
- •Entering Text and Values into Your Worksheets
- •Entering Dates and Times into Your Worksheets
- •Modifying Cell Contents
- •Applying Number Formatting
- •Controlling the Worksheet View
- •Working with Rows and Columns
- •Understanding Cells and Ranges
- •Copying or Moving Ranges
- •Using Names to Work with Ranges
- •Adding Comments to Cells
- •What Is a Table?
- •Creating a Table
- •Changing the Look of a Table
- •Working with Tables
- •Getting to Know the Formatting Tools
- •Changing Text Alignment
- •Using Colors and Shading
- •Adding Borders and Lines
- •Adding a Background Image to a Worksheet
- •Using Named Styles for Easier Formatting
- •Understanding Document Themes
- •Creating a New Workbook
- •Opening an Existing Workbook
- •Saving a Workbook
- •Using AutoRecover
- •Specifying a Password
- •Organizing Your Files
- •Other Workbook Info Options
- •Closing Workbooks
- •Safeguarding Your Work
- •Excel File Compatibility
- •Exploring Excel Templates
- •Understanding Custom Excel Templates
- •Printing with One Click
- •Changing Your Page View
- •Adjusting Common Page Setup Settings
- •Adding a Header or Footer to Your Reports
- •Copying Page Setup Settings across Sheets
- •Preventing Certain Cells from Being Printed
- •Preventing Objects from Being Printed
- •Creating Custom Views of Your Worksheet
- •Understanding Formula Basics
- •Entering Formulas into Your Worksheets
- •Editing Formulas
- •Using Cell References in Formulas
- •Using Formulas in Tables
- •Correcting Common Formula Errors
- •Using Advanced Naming Techniques
- •Tips for Working with Formulas
- •A Few Words about Text
- •Text Functions
- •Advanced Text Formulas
- •Date-Related Worksheet Functions
- •Time-Related Functions
- •Basic Counting Formulas
- •Advanced Counting Formulas
- •Summing Formulas
- •Conditional Sums Using a Single Criterion
- •Conditional Sums Using Multiple Criteria
- •Introducing Lookup Formulas
- •Functions Relevant to Lookups
- •Basic Lookup Formulas
- •Specialized Lookup Formulas
- •The Time Value of Money
- •Loan Calculations
- •Investment Calculations
- •Depreciation Calculations
- •Understanding Array Formulas
- •Understanding the Dimensions of an Array
- •Naming Array Constants
- •Working with Array Formulas
- •Using Multicell Array Formulas
- •Using Single-Cell Array Formulas
- •Working with Multicell Array Formulas
- •What Is a Chart?
- •Understanding How Excel Handles Charts
- •Creating a Chart
- •Working with Charts
- •Understanding Chart Types
- •Learning More
- •Selecting Chart Elements
- •User Interface Choices for Modifying Chart Elements
- •Modifying the Chart Area
- •Modifying the Plot Area
- •Working with Chart Titles
- •Working with a Legend
- •Working with Gridlines
- •Modifying the Axes
- •Working with Data Series
- •Creating Chart Templates
- •Learning Some Chart-Making Tricks
- •About Conditional Formatting
- •Specifying Conditional Formatting
- •Conditional Formats That Use Graphics
- •Creating Formula-Based Rules
- •Working with Conditional Formats
- •Sparkline Types
- •Creating Sparklines
- •Customizing Sparklines
- •Specifying a Date Axis
- •Auto-Updating Sparklines
- •Displaying a Sparkline for a Dynamic Range
- •Using Shapes
- •Using SmartArt
- •Using WordArt
- •Working with Other Graphic Types
- •Using the Equation Editor
- •Customizing the Ribbon
- •About Number Formatting
- •Creating a Custom Number Format
- •Custom Number Format Examples
- •About Data Validation
- •Specifying Validation Criteria
- •Types of Validation Criteria You Can Apply
- •Creating a Drop-Down List
- •Using Formulas for Data Validation Rules
- •Understanding Cell References
- •Data Validation Formula Examples
- •Introducing Worksheet Outlines
- •Creating an Outline
- •Working with Outlines
- •Linking Workbooks
- •Creating External Reference Formulas
- •Working with External Reference Formulas
- •Consolidating Worksheets
- •Understanding the Different Web Formats
- •Opening an HTML File
- •Working with Hyperlinks
- •Using Web Queries
- •Other Internet-Related Features
- •Copying and Pasting
- •Copying from Excel to Word
- •Embedding Objects in a Worksheet
- •Using Excel on a Network
- •Understanding File Reservations
- •Sharing Workbooks
- •Tracking Workbook Changes
- •Types of Protection
- •Protecting a Worksheet
- •Protecting a Workbook
- •VB Project Protection
- •Related Topics
- •Using Excel Auditing Tools
- •Searching and Replacing
- •Spell Checking Your Worksheets
- •Using AutoCorrect
- •Understanding External Database Files
- •Importing Access Tables
- •Retrieving Data with Query: An Example
- •Working with Data Returned by Query
- •Using Query without the Wizard
- •Learning More about Query
- •About Pivot Tables
- •Creating a Pivot Table
- •More Pivot Table Examples
- •Learning More
- •Working with Non-Numeric Data
- •Grouping Pivot Table Items
- •Creating a Frequency Distribution
- •Filtering Pivot Tables with Slicers
- •Referencing Cells within a Pivot Table
- •Creating Pivot Charts
- •Another Pivot Table Example
- •Producing a Report with a Pivot Table
- •A What-If Example
- •Types of What-If Analyses
- •Manual What-If Analysis
- •Creating Data Tables
- •Using Scenario Manager
- •What-If Analysis, in Reverse
- •Single-Cell Goal Seeking
- •Introducing Solver
- •Solver Examples
- •Installing the Analysis ToolPak Add-in
- •Using the Analysis Tools
- •Introducing the Analysis ToolPak Tools
- •Introducing VBA Macros
- •Displaying the Developer Tab
- •About Macro Security
- •Saving Workbooks That Contain Macros
- •Two Types of VBA Macros
- •Creating VBA Macros
- •Learning More
- •Overview of VBA Functions
- •An Introductory Example
- •About Function Procedures
- •Executing Function Procedures
- •Function Procedure Arguments
- •Debugging Custom Functions
- •Inserting Custom Functions
- •Learning More
- •Why Create UserForms?
- •UserForm Alternatives
- •Creating UserForms: An Overview
- •A UserForm Example
- •Another UserForm Example
- •More on Creating UserForms
- •Learning More
- •Why Use Controls on a Worksheet?
- •Using Controls
- •Reviewing the Available ActiveX Controls
- •Understanding Events
- •Entering Event-Handler VBA Code
- •Using Workbook-Level Events
- •Working with Worksheet Events
- •Using Non-Object Events
- •Working with Ranges
- •Working with Workbooks
- •Working with Charts
- •VBA Speed Tips
- •What Is an Add-In?
- •Working with Add-Ins
- •Why Create Add-Ins?
- •Creating Add-Ins
- •An Add-In Example
- •System Requirements
- •Using the CD
- •What’s on the CD
- •Troubleshooting
- •The Excel Help System
- •Microsoft Technical Support
- •Internet Newsgroups
- •Internet Web sites
- •End-User License Agreement
Chapter 18: Getting Started Making Charts
Figure 18.9 shows a few different chart type options using the customer satisfaction data.
FIGURE 18.9
The customer satisfaction chart, using four different chart types.
Working with Charts
This section covers some common chart modifications:
•Resizing and moving charts
•Copying a chart
•Deleting a chart
•Adding chart elements
•Moving and deleting chart elements
•Formatting chart elements
•Printing charts
Note
Before you can modify a chart, the chart must be activated. To activate an embedded chart, click it. Doing so activates the chart and also selects the element that you click. To activate a chart on a chart sheet, just click its sheet tab. n
413
Part III: Creating Charts and Graphics
Resizing a chart
If your chart is an embedded chart, you can freely resize it with you mouse. Click the chart’s border. Handles (gray dots) appear on the chart’s corners and edges. When the mouse pointer turns into a double arrow, click and drag to resize the chart.
When a chart is selected, choose Chart Tools Format Size to adjust the height and width of the chart. Use the spinners, or type the dimensions directly into the Height and Width controls.
Moving a chart
To move a chart to a different location on a worksheet, click the chart and drag one of its borders. You can use standard cut and paste techniques to move an embedded chart. In fact, this is the only way to move a chart from one worksheet to another. Select the chart and choose Home Clipboard Cut (or press Ctrl+X). Then activate a cell near the desired location and choose Home Clipboard Paste (or press Ctrl+V). The new location can be in a different worksheet or even in a different workbook. If you paste the chart to a different workbook, it will be linked to the data in the original workbook.
To move an embedded chart to a chart sheet (or vice versa), select the chart and choose Chart Tools Design Location Move Chart to display the Move Chart dialog box. Choose New Sheet and provide a name for the chart sheet (or use the Excel proposed name).
Copying a chart
To make an exact copy of an embedded chart on the same worksheet, activate the chart, press and hold the Ctrl key, and drag. Release the mouse button, and a new copy of the chart is created.
To make a copy of a chart sheet, use the same procedure, but drag the chart sheet’s tab.
You also can use standard copy and paste techniques to copy a chart. Select the chart (an embedded chart or a chart sheet) and choose Home Clipboard Copy (or press Ctrl+C). Then activate a cell near the desired location and choose Home Clipboard Paste (or press Ctrl+V).
The new location can be in a different worksheet or even in a different workbook. If you paste the chart to a different workbook, it will be linked to the data in the original workbook.
Deleting a chart
To delete an embedded chart, press Ctrl and click the chart (to select the chart as an object). Then press Delete. When the Ctrl key is pressed, you can select multiple charts, and then delete them all with a single press of the Delete key.
To delete a chart sheet, right-click its sheet tab and choose Delete from the shortcut menu. To delete multiple chart sheets, select them by pressing Ctrl while you click the sheet tabs.
414
Chapter 18: Getting Started Making Charts
Adding chart elements
To add new elements to a chart (such as a title, legend, data labels, or gridlines), use the controls on the Chart Tools Layout tab. These controls are arranged into logical groups, and they all display a drop-down list of options.
Moving and deleting chart elements
Some elements within a chart can be moved: titles, legend, and data labels. To move a chart element, simply click it to select it. Then drag its border.
The easiest way to delete a chart element is to select it and then press Delete. You can also use the controls on the Chart Tools Layout tab to turn off the display of a particular chart element. For example, to delete data labels, choose Chart Tools Layout Labels Data Labels None.
Note
A few chart elements consist of multiple objects. For example, the data labels element consists of one label for each data point. To move or delete one data label, click once to select the entire element and then click a second time to select the specific data label. You can then move or delete the single data label. n
Formatting chart elements
Many users are content to stick with the predefined chart layouts and chart styles. For more precise customizations, Excel allows you to work with individual chart elements and apply additional formatting. You can use the Ribbon commands for some modifications, but the easiest way to format chart elements is to right-click the element and choose Format from the shortcut menu. The exact command depends on the element you select. For example, if you right-click the chart’s title, the shortcut menu command is Format Chart Title.
The Format command displays a stay-on-top tabbed dialog box with options for the selected element. Changes that you make are displayed immediately, but in some cases you need to deactivate the control by pressing tab to move to the next control. You can keep this dialog box displayed while you work on the chart. When you select a new chart element, the dialog box changes to display the properties for the newly selected element.
New Feature
In Excel 2007, the designers removed the ability to double-click a chart element to display the corresponding Format dialog box. In response to user complaints, double-clicking a chart element has been reinstated in Excel 2010. n
Figure 18.10 shows the Format Axis dialog box, which is displayed by right-clicking the vertical axis and selecting Format Axis from the shortcut menu — or by simply double-clicking the vertical axis.
415
Part III: Creating Charts and Graphics
Tip
If you apply formatting to a chart element and decide that it wasn’t such a good idea, you can revert to the original formatting for the particular chart style. Right-click the chart element and choose Reset to Match Style from the shortcut menu. To reset the entire chart, select the chart area when you issue the command. n
FIGURE 18.10
Each chart element has a formatting dialog box. This one is used to format a chart axis.
Cross-Reference
See Chapter 19 for more information about customizing and formatting charts. n
Printing charts
Printing embedded charts is nothing special; you print them the same way that you print a worksheet. As long as you include the embedded chart in the range that you want to print, Excel prints the chart as it appears onscreen. When printing a sheet that contains embedded charts, it’s a good idea to preview first (or use Page Layout view) to ensure that your charts do not span multiple pages. If you created the chart on a chart sheet, Excel always prints the chart on a page by itself.
Tip
If you select an embedded chart and choose File Print, Excel prints the chart on a page by itself and does not print the worksheet. n
416