How to Copy & Paste Macro for Excel

By Stephanie Ellen

Macros can replace tedious functions in spreadsheets.
i number background image by kuhar from Fotolia.com

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.

Step 1

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

Step 2

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

Step 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.

Step 4

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

Step 5

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

Step 6

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

Step 7

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

Step 8

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

Step 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.

Step 10

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

×