Datasheet
4
1
2
3
The Excel Options dialog
box appears.
3 Click Customize Ribbon.
1 Click the File tab.
A menu appears.
2 Click Options.
Introducing Macros
Y
ou can use macros to automate many of the tasks
you perform in Excel. For example, if you
frequently format your data in a particular way,
you can use Excel’s macro recorder to record the steps
you use to format your data. You can then play back the
recorded steps whenever you want to apply your format.
Most of the commands you can execute in Excel, you can
also record and play back.
The commands you use to create and execute macros are
located on the Developer tab. By default, the Developer
tab does not display in Excel. To display it, you must
select Developer in the Customize the Ribbon pane in the
Excel Options dialog box.
You begin recording macros by clicking Record Macro on
the Developer tab or by clicking the Record Macro button
on the status bar. Both options open the Record Macro
dialog box. For detailed instructions on how to use the
Record Macro dialog box, see the section “Record a Macro.”
When you record a macro, you can record it using an
absolute reference or a relative reference. If you record
using an absolute reference, when Excel plays back your
macro, it plays back the exact cells you clicked when you
recorded the macro. If you record using a relative
reference, Excel plays back the relative location of the
cells you used when you recorded your macro. Click Use
Relative References on the Developer tab to record using
a relative reference. To learn more about absolute and
relative references, see the section “Record a Macro.”
When you save a workbook that has macros, you must
save it as a macro-enabled workbook. Excel gives macro-
enabled workbooks an .xlsm extension.
Introducing
Macros
03_591598-ch01.indd 403_591598-ch01.indd 4 6/11/10 1:41 PM6/11/10 1:41 PM