How do I create my own macro?
Record a macro with a button
- Click View > Macros > Record Macro.
- Type a name for the macro.
- To use this macro in any new documents you make, be sure the Store macro in box says All Documents (Normal.
- To run your macro when you click a button, click Button.
- Click the new macro (it’s named something like Normal.
How do I create a free macro in Excel?
To save it as a macro-enabled workbook:

- Click No.
- In the Save As box, in the Save as type list box, choose Excel Macro-Enabled Workbook (*. xlsm).
- Click Save.
How do you create Excel macros and automate your spreadsheets?
To create a macro, go to View > Macros > Record Macro. Assign the macro a name (no spaces) and click OK. Once this is done, all of your actions are recorded – every cell change, scroll action, window resize, you name it. There are a couple of places which indicate Excel is record mode.
How do I write a macro script?
To run a script by using a macro, create the macro in Visual Basic for Applications (VBA).
- Open the data file that is associated with the script that you want to run.
- Press Alt+F11.
- In the VBA Editor, under Microsoft Excel Objects, double-click the sheet that contains the data you want to run.
How do I create a Personal macro Workbook?

To create the personal workbook, you first need to create a macro and store it in the Personal Macro Workbook.
- On the Developer tab, click Record Macro.
- In the Record Macro dialog box, type a meaningful name for the macro in the Macro name box.
- In the Store macro in box, select Personal Macro Workbook.
- Click OK.
How do I code an Excel spreadsheet?
Copy Excel VBA Code to a Regular Module
- Copy the sample code that you want to use.
- Open the workbook in which you want to add the code.
- Hold the Alt key, and press the F11 key, to open the Visual Basic Editor.
- Choose Insert | Module.
- Where the cursor is flashing, choose Edit | Paste.