Assigning a macro to a button in Excel

follow these simple steps. First, open the Excel workbook containing the macro and navigate to the worksheet where you want to add the button. Next, go to the “Developer” tab, which can be enabled from the Excel options if not visible. Click on the “Insert” button in the “Controls” group, and select the “Button” control. Draw a button on the worksheet where you want it to appear. In the “Assign Macro” dialog box, choose the desired macro from the list or enter the macro name manually. Click “OK” to close the dialog. The button is now associated with the selected macro, and clicking it will execute the assigned macro.