Excel 2013 For Dummies
Book image
Explore Book Buy On Amazon

You can assign a macro to a custom tab on the Ribbon or a custom button on the Quick Access toolbar in Excel 2013 and then run it by clicking that custom button.

To assign a macro to a custom group on a custom Ribbon tab, you follow these steps:

  1. Choose File→Options and then click the Customize Ribbon tab in the Excel Options dialog box (or press Alt+FTC).

    Excel displays the Customize Ribbon pane in the Excel Options dialog box.

  2. Click Macros in the Choose Commands From drop-down list box on the left.

    Excel lists the names of all the macros created in the current workbook in the Choose Commands From list box.

  3. Click the name of the custom group on the custom tab to which you want to add the macro in the Main Tabs list box on the right.

    If you haven’t already created a custom tab and group for the macro or need to create a new one, follow these steps:

    1. Click the New Tab button at the bottom of the Main Tabs list.

      Excel adds both a New Tab (Custom) and New Group (Custom) item to the Main Tabs list while at the same time selecting the New Group (Custom) item.

    2. Click the New Tab (Custom) item you just added to the Main Tabs.

    3. Click the Rename button at the bottom of the Main Tabs list box and then type a display name for the new custom tab before you click OK.

    4. Click the New Group (Custom) item right below the custom tab you just renamed.

    5. Click the Rename button and then type a display name for the new custom group before you click OK.

  4. In the Choose Commands From list box on the left, click the name of the macro you want to add to the custom group now selected in the Main Tabs list box on the right.

  5. Click the Add button to add the selected macro to the selected custom group on your custom tab and then click the OK button to close the Excel Options dialog box.

After you add a macro to the custom group of a custom tab, the name of the macro appears on a button sporting a generic icon (a programming diagram chart) on the custom tab of the Ribbon. Then, all you have to do to run the macro is click this command button.

To assign a macro to a custom button on the Quick Access toolbar, follow these steps:

  1. Click the Customize Quick Access Toolbar button at the end of the Quick Access toolbar and then click More Commands on its drop-down menu.

    Excel opens the Excel Options dialog box with the Quick Access Toolbar tab selected.

  2. Click Macros in the Choose Commands From drop-down list box.

    Excel lists the names of all the macros created in the current workbook in the Choose Commands From list box.

  3. Click the name of the macro to add to a custom button on the Quick Access toolbar in the Choose Commands From list box and then click the Add button.

  4. Click OK to close the Excel Options dialog box.

After you close the Excel Options dialog box, a custom button sporting a generic macro icon appears on the Quick Access toolbar. You can choose a different icon by clicking the Rename button below the Customize the Ribbon box. To see the name of the macro assigned to this custom macro button as a ScreenTip, position the mouse pointer over the button. To run the macro, click the button.

About This Article

This article is from the book:

About the book author:

Greg Harvey, PhD, is President of Mind Over Media, an online media company. He has written all editions of Excel For Dummies, Excel All-in-One For Dummies, and Excel Workbook For Dummies. Greg is an experienced educator with a wide variety of interests.

This article can be found in the category: