Learning Outcomes
- Use macros to complete actions in Microsoft Excel
Macros are programs used to automate frequently used processes or tasks in Excel. A macro records operations and re-uses the sequence of mouse actions or keystrokes of anything you can do in Excel with keystrokes or a mouse. Some of those actions include; cleaning up data, formatting cells, creating tables or organizing data in an Excel spreadsheet. If you have done repetitive tasks with a spreadsheet before, you may already have discovered macros. If you have not discovered them, learn this advanced Excel tool to speed up your efficiency and save time.
First, watch the following video which gives an overall example of how to program a macro in order to change the formatting on a sales report. After the video, we’ll walk through a macro step by step and highlight a few of the commonly used actions to be program into a macro.
Practice Question
Macro Recording Locations
A macro has three main ways to be recorded. Two are from the ribbon area and one is not. Experiment and find your favorite way to record it.
How to record a macro:
- From the View tab, click the Macros button, and then the Record Macro button.
- The video demonstrates how to make the developer tab appear in the menu. Here are the steps to follow:
- Go to File, Options, Customize Ribbon, then check the Developer check box and click OK.
- Going back to the main menu, the Developer tab is now visible. Click on it, and go to the Code group, and select the Record Macro button.
- Go to File, Options, Customize Ribbon, then check the Developer check box and click OK.
- The last main recording area is for the Macros button is at bottom left of spreadsheet window. Click on the button and a Macro dialog box opens to be filled out to begin recording.
Practice Question
Macros are recorded in a program called Visual Basic. To edit a macro, the developer tab needed to access the Visual Basic program. We will not be diving into Visual Basic this time as an entire course all on its own. For now we will stay with the macro recording basics.
Contribute!
Candela Citations
- Macros. Authored by: Sherri Pendleton. Provided by: Lumen Learning. License: CC BY: Attribution
- Using Macros | Excel 2016. Provided by: Burn to Learn. Located at: https://youtu.be/W_PEdMArF0k. License: CC BY: Attribution