- •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
Part IV: Using Advanced Excel Features
FIGURE 29.5
Use Word’s Links dialog box to modify or break links.
Embedding Objects in a Worksheet
Using Object Linking and Embedding (OLE), you can also embed an object to share information between Windows applications. This technique enables you to insert an object from another program and use that program’s editing tools to manipulate it. The OLE objects can be such items as
•Text documents from other products, such as word processors
•Drawings or pictures from other products
•Information from special OLE server applications, such as Microsoft Equation
•Sound files
•Video or animation files
Many (but certainly not all) Windows applications support OLE. Embedding is often used for a document that you will distribute to others. It can eliminate the need to send multiple document files and help avoid broken link problems.
To embed an object into an Excel workbook, choose Insert Text Object, which displays the Object dialog box. This dialog box has two tabs: one for creating a new object and one for creating an object from an existing file.
622
Chapter 29: Sharing Data with Other Office Applications
Embedding Word documents
To embed an empty Word document into an Excel worksheet, choose Insert Text Object in Excel. In the Object dialog box, click the Create New tab and then select Microsoft Office Word Document from the Object type list.
The result is a blank Word document, activated and ready for you to enter text. Notice that Word’s Ribbon replaces Excel’s Ribbon, giving you access to all of Word’s features.
To embed a copy of an existing Word file, click the Create from File tab in the Object dialog box and then locate the file on your hard drive. The Word document is inserted into your Excel worksheet. Double-click the document to display the Word Ribbon.
Embedding other types of documents
You can embed many other types of objects, including audio clips, video clips, MIDI sequences, and even an entire Microsoft PowerPoint presentation.
Figure 29.6 shows an MP3 audio file embedded in a worksheet. Clicking the object plays the song on the default MP3 player.
FIGURE 29.6
An MP3 file embedded in a worksheet.
Tip
Some of the object types listed in the Object dialog box can result in quite useful and interesting items when inserted into an Excel worksheet. If you’re not sure what an object type is, try adding the object to a blank Excel workbook to see what is available. Keep in mind that not all the objects listed in this dialog box actually work with Excel. Attempting to use some of them may even crash Excel. n
623
Part IV: Using Advanced Excel Features
Embedding an Excel Workbook
in a Word Document
You can embed an Excel workbook in a Word document in three ways:
•Copy a range and use Word’s Paste Special dialog box.
•Open an existing Excel file using Word’s Object dialog box.
•Create a new Excel workbook using Word’s Object dialog box.
The following sections cover these methods.
Embedding a workbook in Word by copying
The example in this section describes how to embed an Excel workbook (shown in Figure 29.7) in a Word document.
FIGURE 29.7
This workbook will be embedded in a Word document.
To start, select A3:C15 and copy the range to the Clipboard. Then activate (or start) Word, open the document in which you want to embed the range, and move the insertion point to the location in the document where you want the table to appear. Choose Word’s Home Clipboard
Paste Paste Special command. Select the Paste option (not the Paste Link option) and then choose the Microsoft Excel Worksheet Object format. Click OK, and the range appears in the Word document. Although it appears that only the range is embedded, the entire Excel workbook is actually embedded.
624
Chapter 29: Sharing Data with Other Office Applications
If you double-click the embedded object, you notice that Word’s Ribbon is replaced by the Excel Ribbon. In addition, the embedded object appears with Excel’s familiar row and column borders. In other words, you can edit this object in place by using Excel’s commands. Figure 29.8 shows the Word document after double-clicking the embedded Excel workbook. To return to Word, just click anywhere in the Word document.
FIGURE 29.8
Double-clicking the embedded Excel object enables you to edit it in place. Note that Word now displays Excel’s Ribbon.
Caution
Remember that no link is involved here. If you make changes to the embedded object in Word, these changes don’t appear in the original Excel worksheet. Because the embedded object is a copy of the original workbook, it is completely independent from the original source. n
625
Part IV: Using Advanced Excel Features
You may have noticed that Microsoft Excel Worksheet Object also appears in the Paste Special dialog box when you select the Paste Link option. If you paste the range using this option, the workbook isn’t embedded in the Word document. When you double-click the object, Excel is activated so that you can edit the workbook.
Embedding a saved workbook in Word
Another way to embed an Excel workbook in a Word document is to choose Insert Text Object in Word, which displays the Object dialog box. Select the Create from File tab, click Browse and locate the Excel document. When you click OK, a copy of the workbook is embedded in the document. No link is created.
Note
If you select the Link to File check box in the Object dialog box, you create a link to the workbook. In such a case, double-clicking the object in Word activates Excel so that you can edit the workbook. n
Creating a new Excel object in Word
The preceding examples embed an existing workbook into a Word document. This section demonstrates how to create a new (empty) Excel object in Word, which is useful if you’re creating a report and need to insert a table of values. If those values aren’t available in an existing Excel workbook, you can embed a new Excel object and type them.
Tip
You could insert a normal Word table, but you can take advantage of Excel’s formulas and functions in an embedded Excel worksheet. n
To create a new Excel object in a Word document, choose Insert Text Object in Word. Word responds with the Object dialog box. Click the Create New tab, and you see a list of the types of objects that you can create. Select Microsoft Office Excel Worksheet from the list and then click OK.
Word inserts an empty Excel worksheet object into the document and activates it for you. Again, you have full access to the Excel Ribbon, so you can enter whatever you want into the worksheet object. After you finish, click anywhere in the Word document. You can double-click this object at any time to make changes or additions.
You can change the size of the object while it’s activated by dragging any of the sizing handles (the little black squares and rectangles) that appear on the borders of the object.
626