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. ...


Moving Objects with a Chart

Excel allows you to add all sorts of objects to your worksheets. Among the objects you can add are text boxes, shapes, and ...

Discover More

Accepting All Formatting Changes

Tired of wading through a bunch of formatting changes when you have Track Changes turned on? Here's how to accept all those ...

Discover More

Merging Many Workbooks

If you need to combine the contents of a bunch of workbooks into a single workbook, the process can get tedious. Here's a ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Recovering Macros from Corrupted Workbooks

Workbooks get corrupted from time to time; that's a fact of life in an Excel world. If those corrupted workbooks contain ...

Discover More

Finding the Path to the Desktop

Figuring out where Windows places certain items (such as the user's desktop) can be a bit frustrating. Fortunately, there are ...

Discover More

Finding Workbooks Containing Macros

Workbooks can contain macros, or not. It is entirely up to you whether they do or not, but at some future time you might want ...

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 eight more than 2?

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.