Create an Excel Macro to Speed Up Your Repetitive Tasks!
Macros—you’ve probably heard the word before, and you may have even heard people talk about how great they are. But what’s the hype all about?
When it comes to working with spreadsheets in Excel 2013, some processes can be repetitive (and dare I say, boring). One example is formatting a report. While editing text styles and adjusting cells may feel like a mundane task, the presentation of your data is highly important for those who will garner meaning from the report later. But here’s where macros can help you out: You can create an Excel macro to turn 10 minutes of clicking into a single click!
How to Create an Excel Macro
To get started with creating macros, you’ll first want to add the Developer tab to your ribbon. Check out our blog on How to Add and Remove Tabs from the Office 2013 Ribbon to learn how.
Once you’ve added the Developer tab, follow these steps to create an Excel macro:
- Navigate to the Developer tab and select the Record Macro button in the Code group OR click the button in the bottom left corner of your screen that looks like a spreadsheet with a red dot in the top left corner.
- Create a name for your macro. Spaces are not allowed, but you can use an underscore instead. In the graphic on this page, we’ve named our macro “Format_Report.”
- Select a shortcut key. Be sure to choose a letter not already being used as a shortcut key as it will replace the original (i.e., don’t use Ctrl+Z unless you want to lose your shortcut for Undo). By using Shift, you can expand your options (i.e., you could use Ctrl+Shift+Z instead). In our illustration, we’ve designated Ctrl+Shift+R as our shortcut key.
- Choose where to store your macro. Usually, you’ll want to store your macro in This Workbook, which is what we’ve selected in our example. If you want it to be available whenever you use Excel, select Personal Macro Workbook from the drop down menu.
- Type a brief description about what your macro will do in the Description box.
- Click OK.
The macro recording has begun, and now it’s time to perform the actions you want to record. I recommend starting with a few simple actions such as adjusting the font style or changing the color of the cell so you can get the feel for how it works.
When you’re done, press Stop Recording button in the Code group on the Developer tab OR click the blue square in the lower left corner of the Excel window.
Congratulations! You’ve just learned how to create an Excel macro!
Learn VBA to Become an Expert at Creating Excel Macros
While you may want to start with simple examples, macros can get incredibly complex. The basis of a macro is Visual Basic for Applications (VBA), which is the programming language for Office applications such as Excel. To really become an expert at macros, you should also have a firm understanding of VBA. To schedule a group class to learn VBA, please contact our Training Coordinator. This course is intended for advanced Microsoft Excel professionals that need to automate Excel spreadsheet tasks using Visual Basic for Applications (VBA).
Additional Excel Resources
This just scratches the surface on what you can learn in Microsoft Excel! We offer multiple courses in Excel 2013, from beginner introductions to Excel to advanced classes, to classes on Pivot Tables and more. Check out our Course Schedule to see what’s offered next!