To change the macro name and assign a keyboard shortcut, enable the Developer tab in Excel, click on the Developer tab, select Record Macro, and provide a new name for the macro. You can also assign a keyboard shortcut in the same dialog box.