Excel Macro Recorder Key: Start, Stop and Assign Shortcuts

VBA & macros · Updated November 10, 2026

Excel Macro Recorder Key: Start, Stop and Assign Shortcuts

In Excel for Microsoft 365 on Windows, there is no default keyboard shortcut that starts the macro recorder. To record, choose Developer > Code > Record Macro; to give the macro a key for running it later, enter a letter in the Shortcut key box when recording begins. Pressing Alt+F8 opens the Macro dialog, but it does not start recording.

What “macro recorder key” can mean

The phrase can refer to two different things: a way to start recording actions, or a shortcut for replaying a macro that has already been recorded. Excel treats these as separate tasks. You start the recorder from the ribbon or the status bar, then optionally assign a shortcut in the Record Macro dialog.

That distinction matters because a shortcut assigned to a macro runs the macro; it does not turn recording on. If you want to capture a fresh sequence of actions, use the Record Macro command. If you want to execute an existing macro, use its assigned shortcut or open the macro list with Alt+F8.

Start recording in Excel for Windows

In Microsoft 365 for Windows, the usual ribbon route is Developer > Code > Record Macro. If the Developer tab is missing, enable it from File > Options > Customize Ribbon: under Main Tabs, select Developer and choose OK. The command is also available from the Record Macro control on the Excel status bar when that control is shown.

When the dialog opens, provide a name, optionally enter a shortcut letter and description, and choose where to store the macro. Select OK, perform the worksheet actions you want Excel to capture, and then stop recording. The recorder begins capturing actions after you confirm the dialog, so avoid unrelated clicks or edits during the recording.

  • This Workbook: stores the macro in the current file, so it generally travels with that file.
  • Personal Macro Workbook: stores it in a hidden workbook that Excel opens for your user account, making it available across workbooks on that computer.
  • New Workbook: puts the macro in a separate workbook created for the recording.

If you choose Personal Macro Workbook and Excel asks whether to save changes when you exit, save them if you want the macro to remain available next time. A macro stored in a regular workbook is usually saved in a macro-enabled Excel file, such as .xlsm; a standard .xlsx file cannot store VBA macros.

Assign a shortcut for running a macro

In the Record Macro dialog on Windows, put a letter in the Shortcut key field. A lowercase letter creates a Ctrl+letter shortcut; an uppercase letter creates a Ctrl+Shift+letter shortcut. For example, entering lowercase “j” assigns Ctrl+J, while entering uppercase “J” assigns Ctrl+Shift+J. This key runs the macro after recording has stopped.

Choose a combination carefully. Excel already uses many Ctrl shortcuts for everyday tasks, and assigning a macro to one can override the corresponding Excel shortcut while that macro is available. Avoid familiar combinations such as Ctrl+C, Ctrl+V, Ctrl+Z, and Ctrl+S. A less-used letter, usually with Shift, is less likely to disrupt normal work. Write down the assignment if other people will use the workbook.

The shortcut is associated with the macro’s stored location. If the macro is saved in a particular workbook, that workbook generally needs to be open for its shortcut to be available. A macro saved in the Personal Macro Workbook can be used across workbooks in that Excel installation, subject to macro security settings. You can inspect or change a macro’s shortcut through the Macros dialog: press Alt+F8, select the macro, choose Options, and edit the shortcut field.

Stop recording and run the macro

When the sequence is complete, choose Developer > Code > Stop Recording, or click the Stop Recording control on the status bar if it is visible. Excel does not require a special keyboard shortcut to stop the recorder. Stopping promptly helps keep accidental selections, extra formatting, or unrelated edits out of the recorded procedure.

To run a saved macro, use its assigned shortcut, or press Alt+F8, select the macro, and choose Run. The Macro dialog is also useful when you have forgotten a macro’s name or want to choose among several procedures. If the macro does not appear, check that the workbook containing it is open, that you selected the right location in the dialog, and that Excel has allowed macros to run.

What the recorder captures

The recorder translates supported Excel actions into Visual Basic for Applications (VBA) instructions. It is useful for repeating predictable work such as applying number formats, setting column widths, entering a formula in a known place, or applying a consistent sort. You do not have to write the initial VBA yourself: after recording, you can inspect the generated procedure in the Visual Basic Editor.

A recording is not a video of your mouse or a general-purpose record of everything on the computer. Excel records supported commands and references to workbook objects, not the timing of your actions. It also does not automatically make a procedure intelligent: if you record a command that acts on a particular range, the resulting macro may keep acting on that same range when you wanted it to adapt to new data.

Some tasks are not recorded in the way a user might expect, and the generated instructions may be more elaborate than a hand-written solution. For instance, recording a sequence that selects cells can produce selection-dependent code. That can work reliably for a fixed template but fail when a table grows or moves. Test the macro on a copy and inspect the result before relying on it for important work.

Relative references and fixed cells

By default, recorded actions often refer to specific cells or ranges. If a recording formats B2:B20, replaying it may target that same range rather than a range positioned relative to the active cell. When the task should repeat relative to wherever you start, turn on Developer > Code > Use Relative References before recording. Turn it off when you want fixed references again.

For example, a fixed-reference macro might always put a heading in A1. A relative recording might instead move one cell right from the active cell and apply bold formatting there. The choice depends on the job: fixed references suit a standard form with known locations; relative references can help repeat the same small action across different rows or columns. Neither setting automatically identifies the last row of a changing data set, so a recording made for a fixed range may need VBA changes to handle variable-size data.

Save safely and consider macro security

Macros can change data, overwrite cells, or perform actions across a workbook. Save a separate copy before testing a macro on valuable information. VBA macros cannot be undone with Ctrl+Z, so an accidental run may require closing without saving or restoring a backup. For recurring work, test with sample data and confirm the macro’s target sheet and range before running it on the real file.

Excel may block macros from files it considers untrusted, and organization policies can restrict them further. Do not enable macros simply because a file asks you to: only run code from a source you trust and understand. If you receive an .xlsm workbook, consider whether you expected it and whether its contents are appropriate before enabling its code. Saving as .xlsx removes VBA macros, so choose a macro-enabled format when the procedure needs to be retained.

Common problems and quick checks

  • Developer is missing: turn it on through File > Options > Customize Ribbon and select Developer.
  • The shortcut does nothing: confirm the workbook containing the macro is open, check the shortcut in Alt+F8 > Options, and check whether Excel has disabled the macro.
  • The wrong cells change: review whether the macro used fixed or relative references and whether the active sheet is the intended one.
  • The macro is gone after closing: check whether it was saved in Personal Macro Workbook and whether you saved that workbook when prompted, or whether the file was saved as .xlsx.
  • Recording seems stuck: look for Stop Recording on the Developer tab or status bar. The recorder may still be active, so stop it before editing or recording another procedure.

A useful habit is to record a short test, stop, and run it on disposable data before making a longer recording. If a failure is repeatable, inspect the generated VBA rather than recording the entire process repeatedly; a small correction to a range reference may be more reliable than a new recording.

Excel for Mac and Excel for the web

Excel for Mac also has a macro recorder and a Record Macro command, though the ribbon layout and shortcut conventions differ from Windows. The Developer tab may need to be enabled in Excel’s Ribbon & Toolbar settings. On Mac, macro shortcuts use Option+Command+letter rather than Windows’ Ctrl+letter convention; check the dialog’s displayed shortcut before relying on it, since keyboard layouts and system shortcuts can affect available combinations.

Excel for the web does not create or run VBA macros. A workbook containing VBA can be opened in the browser, but use the desktop Excel app to record, edit, or run that VBA. For browser-based automation, Office Scripts may be an option where the Microsoft 365 account and organization provide the Automate tools. Office Scripts are a different automation feature, not a keyboard shortcut for the VBA macro recorder.

Frequently Asked Questions

Is there a keyboard shortcut to start recording a macro in Excel?
No universal default shortcut starts the recorder in Excel for Windows. Use Developer > Code > Record Macro or the status-bar control. You can assign a shortcut to run the resulting macro in the recording dialog.

Does Alt+F8 start the macro recorder?
No. Alt+F8 opens the Macro dialog, where you can select and run an existing macro or access its options. Start a new recording with Record Macro on the Developer tab.

Can I change a macro’s shortcut after recording?
Yes. Press Alt+F8, select the macro, choose Options, and change the shortcut key. The workbook or Personal Macro Workbook that contains the macro must be available for the shortcut to work.

Will my macro shortcut work in every workbook?
Not necessarily. A macro saved in a normal workbook is tied to that workbook being available. A macro in Personal Macro Workbook is designed for use across workbooks in that Excel installation, but it still depends on Excel loading it and permitting macros.

Can I undo a macro with Ctrl+Z?
Usually not. Running VBA clears or bypasses Excel’s normal undo history, so Ctrl+Z cannot reverse the macro’s changes. Save a copy first and test the procedure on data you can afford to lose.

Related

Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.

More in VBA & macros

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.