Open In App
Related Articles

Editing Excel Macros in Excel

Like Article
Save Article
Report issue

Excel Macro is a set of actions that can be recorded, saved, used multiple times. This feature saves us a lot of time when dealing with repetitive tasks and huge data sets. We can always make changes to an existing Macro in Excel. 

There are two ways to record and run macros: 

  1. Excel Commands 
  2. Excel Visual Basic for Applications(VBA).

1. Copying a Macro Code

We can reuse the existing macro code while creating new Macros. For example, if you have existing macros created using the record function, we can reuse the code to write new macros. 

To open the code follow the below steps:

  • Select Tools –> Macros –> Visual Basic Editor.
  • Copy code from the existing macros(use Command + C) and paste(use Command + V) in the new macro

2. Renaming a Macro

Follow the below steps to rename a Macro in Excel:

  • Select Tools –> Macros –> Visual Basic Editor.
  • Select name on the left plane.
  • Edit the name.

3. Deleting a Macro 

Follow the below steps to delete a macro in Excel:

  • Select Tools –> Macros –> Macros…
  • Select the macro to be deleted.
  • Click on the minus(-) symbol at the bottom.
  • Select yes to delete the macro.

Last Updated : 01 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads