Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Recording a Macro.

Recording a Macro

by Allen Wyatt
(last updated July 24, 2017)


If you have a repetitive task that is a good candidate for a macro, you can use the macro recording capabilities of Excel to turn your actions into a macro. To record a macro, follow these steps:

  1. Display the Developer tab of the ribbon.
  2. Click the Record Macro tool. Excel displays the Record Macro dialog box. (See Figure 1.)
  3. Figure 1. The Record Macro dialog box.

  4. In the Macro Name field, provide a name you want used for your macro. You can accept the default name, if you desire, but if you plan on using the macro more than once or twice, you will want to use a more descriptive name. The name you provide must not include any spaces.
  5. In the Description box you can provide an optional comment about your macro.
  6. Use the Store Macro In drop-down list to specify where you want the macro stored.
  7. Click OK.

Excel starts recording everything you do. The actions you take become steps in the macro, and will be repeated when you later execute the macro. When you have finished the steps you want recorded in your macro, again display the Developer tab of the ribbon and click the Stop Recording tool. (This tool is only available when you are actually recording your macro.) The macro is then saved and available for use at any time.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (5683) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Recording a Macro.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...


Understanding Monospace Fonts

Information in a worksheet needs to be displayed using fonts. If you understand the two different types of fonts ...

Discover More

Determining the Day of the Month

When writing macros, you may need to know which day of the month a particular date represents. Here's how to use the Day ...

Discover More

Turning Off Error Checking for a Specific Word

While you are typing in a document, Word is typically busy checking what you type for errors. If an error is found, Word ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Separating Evens and Odds

If you have a series of values in a column, you might have a need to separate the values into even values and odd values. ...

Discover More

Documenting Changes in VBA Code

Your company may be regulated by requirements that it document any changes to the macros in an Excel worksheet. Your ...

Discover More

Removing a Macro from a Shortcut Key

When you assign a macro to a shortcut key, you make it easy to run the macro without ever removing your hands from the ...

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is five less than 8?

2017-07-26 02:21:32


If you Google "record macro using relative cell references excel" you'll get several useful links and YouTube videos.

2017-07-25 22:35:36


@ Barry
Barry regarding the offsets you mentioned. I have a macro that puts a calendar into a word template. If I make even a minor change to the template it drops the calendar way off from where it should. I can fiddle with the offsets to get it to where it should be but it is often quicker to rebuild the macro and start again. Is there any link that explains how these offsets work? I could not find anything that is helpful.

2017-07-24 04:53:26


You've stumbled upon an issue with the macro recorder in that it hasn't kept pace with additions to Excels' functionality (although generally, VBA has).
It seems that Microsoft has forgotten to keep this updated with new features that it has added in recent releases of Excel.
Unfortunately, there isn't a way around this, and you'll just have to delve in the bowels of Excel VBA I'm afraid, and/or scour the internet forums for snippets of code/assistance. I suggest starting with the Excel VBA Object model, Google "excel vba chart object model" will give some useful links.

2017-07-24 04:38:47


When recording a macro the default Excel uses is to use absolute addressing. That if you move to Cell C5 the macro record just that. However, on the Developer Tab you can change the setting to "Use Relative References" which in the example above if the cell originally selected was A1 the macro would record the offset from cell A1 to cell C5. This means when the macro is re-run and the cell selected was B2, then cell D6 will be selected.

By judicious switching between absolute referencing and relative referencing you can get a better macro based result. I would recommend starting any macro with absolute (as you will never know where the selected cell is, then switch to relative and back as appropriate thereafter.

2015-07-08 08:06:48


Hi Allen,

Naive question. I do this all time, but in 2007 all I get are Activiate lines like:

ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveSheet.ChartObjects("Chart 1").Activate

(the above formatted major gridlines and the minor Catergory gridline).

Is there a setting that will allow the parameters to be visible?


Mike Virostko

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.