Enable the Developer tab in Excel
Open the workbook where you want to use macros
Click Developer
Click Record Macro
Enter a macro name
Choose where to store the macro
Optionally assign a shortcut key
Click OK
Perform the actions you want to automate
Click Stop Recording
Save the workbook as a macro-enabled workbook
Open the Visual Basic for Applications editor with Alt + F11
Insert or edit a macro in a module
Write or paste VBA code
Save the macro-enabled workbook
Run a macro from the Developer tab
Run a macro using a shortcut key
Run a macro from the Macros dialog box
Enable macros when prompted after opening the file
Use trusted locations for macro-enabled files
Edit macros only from trusted sources
Delete or disable macros you no longer need
