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:
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.
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.
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:
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.
Click the New Tab (Custom) item you just added to the Main Tabs.
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.
Click the New Group (Custom) item right below the custom tab you just renamed.
Click the Rename button and then type a display name for the new custom group before you click OK.
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.
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:
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.
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.
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.
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.