How to make a macro in excel

Content
  1. Automate your repetitive tasks with simple macros
  2. Macros in Excel Online
  3. Show the Developer tab in Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel in Office 365
  4. Create a macro in Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel in Office 365
  5. Show the Developer tab in Excel 2019 for Mac, Excel 2016 for Mac, and Excel in Office 365 for Mac
  6. Create a macro in Excel 2019 for Mac, Excel 2016 for Mac, and Excel in Office 365 for Mac
  7. Run a macro in Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel in Office 365, Excel 2016 for Mac, and Excel in Office 365 for Mac
  8. Macro Tips in Excel

Automate your repetitive tasks with simple macros

One of the advantages of Excel’s spreadsheet configuration, formatting options, and formula functions is that you can easily perform repetitive tasks. You can optimize these tasks even further by using macros.

Excel macros can be advanced, but don’t let that fact put you off. Learning the basics of writing macros in Excel can help you become more efficient and improve your skills with the application.

The instructions in this article apply to Excel 2019, 2016, 2013, 2010, Excel in Office 365, Excel for Mac 2016, and Excel in Office 365 for Mac.

Macros in Excel Online

Unfortunately, you cannot create or run macros in Excel Online. You can open a workbook containing macros, make changes, and save again without affecting existing macros, but you cannot see or use the macros.

Show the Developer tab in Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel in Office 365

Before you try to add macros in Excel, make sure to display the Developer tab on the ribbon. By default, the Developer tab is not displayed.

  1. Go to the tab File and choose parameters:

  2. Select Customize ribbon on the left panel.

  3. Check box Developer In chapter Main tabs on the list Customize ribbon

  4. Click Okay to add a tab for developers on the tape.

Create a macro in Excel 2019, Excel 2016, Excel 2013, Excel 2010, and Excel in Office 365

When you’re ready to create the macro, start Excel and open the worksheet.

  1. Go to the tab Developer

  2. Click Macro shot in the code group.

  3. Enter a macro name in the field Macro name

  4. Enter the keyboard shortcut you want to use for the macro.

  5. Select This book pick list Macro shop V

  6. Click Okay

  7. Complete any formatting and commands you want to include.

  8. Click Stop recording when you’re done.

  9. Go to the tab File and choose Save as or click on F12 to open the dialog Save as.

  10. Enter a file name for the book.

  11. Select Excel workbook with macros in the File type drop-down list and click Save

Show the Developer tab in Excel 2019 for Mac, Excel 2016 for Mac, and Excel in Office 365 for Mac

Before you try to add macros in Excel 2019 or 2016 on Mac or Excel in Office 365 for Mac, make sure to view the Developer tab on the ribbon. By default, the Developer tab is not displayed.

  1. Go to excel and choose Settings

  2. Select Ribbon and Toolbar

  3. Check box Developer on the list Main tabs in category Customize ribbon

  4. Click Save

Create a macro in Excel 2019 for Mac, Excel 2016 for Mac, and Excel in Office 365 for Mac

When you’re ready to create the macro, start Excel and open the worksheet.

  1. Go to the tab Developer

  2. Click Macro shot in the code group.

  3. Enter a macro name in the field Macro name

  4. Enter a lowercase or uppercase letter that you want to use in the Shortcut key field.

  5. Select This book pick list Save macro in

  6. Click Okay

  7. Complete any formatting and commands you want to include.

  8. When you’re done, click Stop recording tab Developer

  9. Go to the tab File and choose Save as or click on s Shift Team s ) to open the Save As dialog box.

  10. Enter a file name for the book.

  11. Select Excel workbook with macros (.xlsm) pick list File format and press Save

Run a macro in Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel in Office 365, Excel 2016 for Mac, and Excel in Office 365 for Mac

While there are several ways to run a macro that you create in Excel, the two easiest methods are to use the shortcut assigned to the macro and run the macro from the Developer tab. Both are effective, so use the one that feels most natural to you.

To run a macro with a keyboard shortcut, start by opening the sheet containing the macro. Enter or select any data to which you want to apply the formatting or commands you included in the macro. Then press the key combination assigned to the macro.

To run a macro from the Developer tab, start by opening the sheet containing the macro.

  1. Enter any data to which you want to apply formatting or commands that you have included in the macro.

  2. Go to the tab Developer on the tape.

  3. Click Macros in the code group. The Macro dialog box opens.

  4. Select the name assigned to the macro and click walk

Macro Tips in Excel

You can add or change the shortcut key for a macro at any time.

  1. Go to the tab Developer

  2. Click Macros in the Code group to open the Macros dialog box.

  3. Click the macro name to which you want to assign or change a keyboard shortcut.

  4. Click parameters: to open the Macro Options dialog box

  5. Enter a lowercase or uppercase letter to use for the keyboard shortcut in the field Keyboard Shortcut and press Okay

Leave a Reply

Your email address will not be published.