How to Use Macro in Excel With Examples

Save

Excel macro recording replaces repetitive tasks with a couple of mouse clicks or a keyboard combination. For example, if you frequently format expense sheets, you can get a macro to do the formatting for you (you only have to format the document once, while Excel records your keystrokes and mouse clicks), or you can get Excel to open a particular file that you frequently use without having to click through a series of sub menus.

  • Start Excel. A new workbook is automatically opened for you.

  • Open the macro recording window. In Excel 2003, click on "Tools > Macro > Record New Macro" and in Excel 2007 click "View > Macros > Record Macro."

  • Type in a meaningful name in the macro box according to what you want to record: for example "OpenTaxFile," or "MakeExpenseSheet."

  • Enter a shortcut key for your macro in the "Shortcut key" box. For example, enter a "O" to assign the keys "Ctrl" and "O" to your macro.

  • Click on "OK." The macro recorder is now running.

  • Perform the task that you want the macro to automate. For example, open a particular file by click on "File > Open" in Excel 2003, or "Office > Open" in Excel 2007 and then locate the file. You can also format a spreadsheet: for example, make an expense sheet by typing in any information that you want contained on the sheet, like mileage and business expenses.

  • Stop macro recording by clicking on "Macro > Stop Recording." Your macro is now ready for testing and use.

Tips & Warnings

  • You can access your macro in one of two ways: click on "Macros" and select the macro to run it, or press the key combination you assigned in Step 4.

References

  • Photo Credit number background image by kuhar from Fotolia.com
Promoted By Zergnet

Comments

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!