How to Copy & Paste Macro for Excel

Written by stephanie ellen
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Copy & Paste Macro for Excel
Macros can replace tedious functions in spreadsheets. (number background image by kuhar from

Microsoft Excel macros can replace tedious functions in Excel spreadsheets. For example, instead of typing the same information over and over again, you can create a macro to do the work for you. Macros are workbook specific, which means that if you want the macro in one workbook to work in another workbook, you have to copy the macros over. Copying a macro can be done through the Visual Basic Editor (VBE), which is built into Excel.

Skill level:

Other People Are Reading

Things you need

  • Excel 2007 or Excel 2010

Show MoreHide


  1. 1

    Open the workbook that has the macro you want to copy.

  2. 2

    Press the "Alt" and "F11" keys together to access the VBE.

  3. 3

    Click on the name of the macro you want to copy in the left-hand column. This opens up a window with the Visual Basic for Applications (VBA) code.

  4. 4

    Click on the "Edit" tab and then click on "Select All."

  5. 5

    Click on "Ctrl" and "C" to copy the macro to the Office Clipboard.

  6. 6

    Open the workbook where you want to copy the macro to.

  7. 7

    Press the "Alt" and "F11" keys together to open the VBE.

  8. 8

    Click on "Insert" and then click on "Module" to open a blank window.

  9. 9

    Click inside the blank window, then press the "Ctrl" and "V" keys to paste the code into the open window. Your macro is now copied and ready for use.

  10. 10

    Press the "Alt" and "F11" keys together to exit the VBE and return to your workbook.

Tips and warnings

  • When you save your workbook, the macro is automatically saved along with the workbook contents.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.