Introduction |
|
1 | (6) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
4 | (3) |
|
PART 1 HOLY MACRO BATMAN! |
|
|
7 | (50) |
|
Chapter 1 Macro Fundamentals |
|
|
9 | (20) |
|
|
9 | (1) |
|
|
10 | (2) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
Comparing Absolute and Relative Macro Recording |
|
|
14 | (1) |
|
Recording macros with absolute references |
|
|
14 | (3) |
|
Recording macros with relative references |
|
|
17 | (2) |
|
Understanding Macro Security |
|
|
19 | (1) |
|
Macro-enabled file extensions |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
20 | (1) |
|
Storing and Running Macros |
|
|
21 | (1) |
|
Storing macros in your Personal Macro Workbook |
|
|
22 | (1) |
|
Assigning a macro to a button and other form controls |
|
|
22 | (2) |
|
Placing a macro on the Quick Access Toolbar |
|
|
24 | (1) |
|
|
25 | (1) |
|
Building navigation buttons |
|
|
25 | (1) |
|
Dynamically rearranging PivotTable data |
|
|
26 | (1) |
|
Offering one-touch reporting options |
|
|
27 | (2) |
|
Chapter 2 Getting Cozy with the Visual Basic Editor |
|
|
29 | (14) |
|
Working in the Visual Basic Editor |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
31 | (1) |
|
Working with the Project Explorer |
|
|
32 | (1) |
|
|
32 | (2) |
|
|
34 | (1) |
|
|
34 | (1) |
|
Minimizing and maximizing windows |
|
|
34 | (1) |
|
Getting VBA code into a module |
|
|
35 | (3) |
|
|
38 | (1) |
|
|
38 | (2) |
|
|
40 | (1) |
|
|
41 | (1) |
|
|
42 | (1) |
|
Chapter 3 The Anatomy of Macros |
|
|
43 | (14) |
|
A Brief Overview of the Excel Object Model |
|
|
43 | (1) |
|
|
44 | (1) |
|
Understanding collections |
|
|
45 | (1) |
|
|
45 | (1) |
|
|
46 | (1) |
|
A Brief Look at Variables |
|
|
46 | (1) |
|
The common variable types |
|
|
47 | (2) |
|
Understanding Event Procedures |
|
|
49 | (1) |
|
|
49 | (2) |
|
|
51 | (1) |
|
Error Handlingln a Nutshell |
|
|
52 | (1) |
|
|
53 | (1) |
|
|
54 | (1) |
|
|
55 | (2) |
|
PART 2 MAKING SHORT WORK OF WORKBOOK TASKS |
|
|
57 | (50) |
|
Chapter 4 Working with Workbooks |
|
|
59 | (22) |
|
|
60 | (1) |
|
|
60 | (1) |
|
|
60 | (1) |
|
|
61 | (1) |
|
Creating a New Workbook from Scratch |
|
|
61 | (2) |
|
Saving a Workbook when a Particular Cell Is Changed |
|
|
63 | (2) |
|
Saving a Workbook before Closing |
|
|
65 | (2) |
|
Protecting a Worksheet on Workbook Close |
|
|
67 | (1) |
|
|
68 | (1) |
|
Opening a Workbook to a Specific Tab |
|
|
69 | (1) |
|
Opening a Specific Workbook Defined by the User |
|
|
70 | (2) |
|
Determining Whether a Workbook Is Already Open |
|
|
72 | (2) |
|
Determining Whether a Workbook Exists in a Directory |
|
|
74 | (2) |
|
Closing All Workbooks at Once |
|
|
76 | (1) |
|
Printing All Workbooks in a Directory |
|
|
77 | (1) |
|
Preventing the Workbook from Closing Until a Cell Is Populated |
|
|
78 | (2) |
|
Creating a Backup of the Current Workbook with Today's Date |
|
|
80 | (1) |
|
Chapter 5 Working with Worksheets |
|
|
81 | (26) |
|
|
81 | (1) |
|
|
82 | (1) |
|
|
82 | (1) |
|
|
83 | (1) |
|
Adding and Naming a New Worksheet |
|
|
83 | (1) |
|
Deleting All but the Active Worksheet |
|
|
84 | (2) |
|
Hiding All but the Active Worksheet |
|
|
86 | (1) |
|
Unhiding All Worksheets in a Workbook |
|
|
87 | (1) |
|
|
88 | (2) |
|
Sorting Worksheets by Name |
|
|
90 | (2) |
|
Grouping Worksheets by Color |
|
|
92 | (2) |
|
Copying a Worksheet to a New Workbook |
|
|
94 | (1) |
|
Creating a New Workbook for Each Worksheet |
|
|
94 | (2) |
|
Printing Specified Worksheets |
|
|
96 | (1) |
|
Protecting All Worksheets |
|
|
97 | (1) |
|
Unprotecting All Worksheets |
|
|
98 | (2) |
|
Creating a Table of Contents for Your Worksheets |
|
|
100 | (3) |
|
Zooming In and Out of a Worksheet with Double-Click |
|
|
103 | (1) |
|
Highlighting the Active Row and Column |
|
|
104 | (3) |
|
PART 3 ONE-TOUCH DATA MANIPULATION |
|
|
107 | (56) |
|
Chapter 6 Feeling at Home on the Range |
|
|
109 | (20) |
|
|
110 | (1) |
|
|
110 | (1) |
|
|
110 | (1) |
|
|
111 | (1) |
|
Selecting and Formatting a Range |
|
|
111 | (2) |
|
Creating and Selecting Named Ranges |
|
|
113 | (3) |
|
Looping Through a Range of Cells |
|
|
116 | (1) |
|
Inserting Blank Rows in a Range |
|
|
117 | (2) |
|
Unhiding All Rows and Columns |
|
|
119 | (1) |
|
|
119 | (2) |
|
|
121 | (1) |
|
Limiting Range Movement to a Particular Area |
|
|
122 | (1) |
|
Selecting and Formatting All Formulas in a Workbook |
|
|
123 | (3) |
|
Finding and Selecting the First Blank Row or Column |
|
|
126 | (3) |
|
Chapter 7 Manipulating Data with Macros |
|
|
129 | (34) |
|
|
130 | (1) |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
131 | (1) |
|
Copying and Pasting a Range |
|
|
131 | (1) |
|
Converting All Formulas in a Range to Values |
|
|
132 | (2) |
|
Text to Columns on All Columns |
|
|
134 | (3) |
|
Converting Trailing Minus Signs |
|
|
137 | (2) |
|
Trimming Spaces from All Cells in a Range |
|
|
139 | (2) |
|
Truncating Zip Codes to the Left Five |
|
|
141 | (2) |
|
|
143 | (2) |
|
Replacing Blanks Cells with a Value |
|
|
145 | (2) |
|
Appending Text to the Left or Right of Your Cells |
|
|
147 | (2) |
|
Cleaning Up Non-Printing Characters |
|
|
149 | (2) |
|
Highlighting Duplicates in a Range of Data |
|
|
151 | (1) |
|
Hiding All but Rows Containing Duplicate Data |
|
|
152 | (3) |
|
Selectively Hiding AutoFilter Drop-down Arrows |
|
|
155 | (2) |
|
Copying Filtered Rows to a New Workbook |
|
|
157 | (1) |
|
Showing Filtered Columns in the Status Bar |
|
|
158 | (5) |
|
PART 4 MACRO-CHARGING REPORTS AND EMAILS |
|
|
163 | (72) |
|
Chapter 8 Automating Common Reporting Tasks |
|
|
165 | (34) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
166 | (1) |
|
|
167 | (1) |
|
Refreshing All PivotTables in a Workbook |
|
|
167 | (2) |
|
Creating a List of PivotTables |
|
|
169 | (3) |
|
Adjusting All Pivot Data Field Titles |
|
|
172 | (1) |
|
Setting All Data Items to Sum |
|
|
173 | (2) |
|
Applying Number Formatting for All Data Items |
|
|
175 | (3) |
|
Sorting All Fields in Alphabetical Order |
|
|
178 | (1) |
|
Applying a Custom Sort to Data Items |
|
|
179 | (1) |
|
Applying PivotTable Restrictions |
|
|
180 | (2) |
|
Applying Pivot Field Restrictions |
|
|
182 | (2) |
|
Automatically Deleting PivotTable Drill-Down Sheets |
|
|
184 | (3) |
|
Printing a PivotTable for Each Report Filter Item |
|
|
187 | (2) |
|
Creating a New Workbook for Each Report Filter Item |
|
|
189 | (3) |
|
Resizing All Charts on a Worksheet |
|
|
192 | (1) |
|
Aligning a Chart to a Specific Range |
|
|
193 | (2) |
|
Creating a Set of Disconnected Charts |
|
|
195 | (1) |
|
Printing All Charts on a Worksheet |
|
|
196 | (3) |
|
Chapter 9 Sending Emails from Excel |
|
|
199 | (18) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
Mailing the Active Workbook as an Attachment |
|
|
201 | (2) |
|
Mailing a Specific Range as an Attachment |
|
|
203 | (2) |
|
Mailing a Single Sheet as an Attachment |
|
|
205 | (2) |
|
Sending Mail with a Link to Your Workbook |
|
|
207 | (2) |
|
Mailing All Email Addresses in Your Contact List |
|
|
209 | (2) |
|
Saving All Attachments to a Folder |
|
|
211 | (2) |
|
Saving Certain Attachments to a Folder |
|
|
213 | (4) |
|
Chapter 10 Wrangling External Data with Macros |
|
|
217 | (18) |
|
Working with External Data Connections |
|
|
217 | (1) |
|
Manually creating a connection |
|
|
218 | (3) |
|
Manually editing data connections |
|
|
221 | (1) |
|
Using Macros to Create Dynamic Connections |
|
|
222 | (2) |
|
Iterating through All Connections in a Workbook |
|
|
224 | (2) |
|
Using ADO and VBA to Pull External Data |
|
|
226 | (1) |
|
|
226 | (2) |
|
|
228 | (3) |
|
|
231 | (1) |
|
|
231 | (1) |
|
Reading the opened text file |
|
|
232 | (1) |
|
A practical example: Logging workbook usage in a text file |
|
|
232 | (1) |
|
A practical example: Importing a text file to a range |
|
|
233 | (2) |
|
|
235 | (28) |
|
Chapter 11 Ten Handy Visual Basic Editor Tips |
|
|
237 | (10) |
|
|
238 | (1) |
|
Copying Multiple Lines of Code at Once |
|
|
239 | (1) |
|
Jumping between Modules and Procedures |
|
|
240 | (1) |
|
Teleporting to Your Functions |
|
|
240 | (1) |
|
Staying in the Right Procedure |
|
|
241 | (1) |
|
Stepping through Your Code |
|
|
241 | (1) |
|
Stepping to a Specific Line in Your Code |
|
|
242 | (1) |
|
Stopping Your Code at a Predefined Point |
|
|
243 | (1) |
|
Seeing the Beginning and End of Variable Values |
|
|
244 | (1) |
|
Turning Off Auto Syntax Check |
|
|
245 | (2) |
|
Chapter 12 Ten Places to Turn for Macro Help |
|
|
247 | (6) |
|
Let Excel Write the Macro for You |
|
|
248 | (1) |
|
|
248 | (1) |
|
Pilfer Code from the Internet |
|
|
248 | (1) |
|
|
249 | (1) |
|
|
250 | (1) |
|
Mine YouTube for Video Training |
|
|
251 | (1) |
|
Attend Live and Online Training Classes |
|
|
251 | (1) |
|
Learn from the Microsoft Office Dev Center |
|
|
251 | (1) |
|
Dissect the Other Excel Files in your Organization |
|
|
252 | (1) |
|
Ask Your Local Excel Genius |
|
|
252 | (1) |
|
Chapter 13 Ten Ways to Speed Up Your Macros |
|
|
253 | (10) |
|
|
253 | (1) |
|
|
254 | (1) |
|
Turn Off Status Bar Updates |
|
|
255 | (1) |
|
Tell Excel to Ignore Events |
|
|
256 | (1) |
|
|
257 | (1) |
|
Suspend PivotTable Updates |
|
|
257 | (1) |
|
Steer Clear of Copy and Paste |
|
|
258 | (1) |
|
|
259 | (1) |
|
Don't Explicitly Select Objects |
|
|
260 | (1) |
|
Avoid Excessive Trips to the Worksheet |
|
|
261 | (2) |
Index |
|
263 | |