Ever feel like you're wasting time by repeating some of the same steps over and over again? Macros let you avoid this by recording these repetitive steps. A macro is a list of instructions that the user can run automatically by calling the macro by name or by tying it to a keystroke. Macros can be created as simply as turning on the macro recorder and performing actions in the workbook. The actions will be saved so that you can easily repeat them in the future with the push of a button. MS Excel courses show students how to create both simple and complex macros.
Record actions to streamline redundant actionsThe first way that you'll learn to use macros in MS Excel courses is by using the record mode. Simply turn on the macro recorder, enter a name for the macro and, if desired, a keyboard combination to tie it to. Then perform the actions to be recorded such as moving the cursor, entering formulas, or formatting cells. Once the actions are complete, turn off the recorder and those actions are saved and ready to run automatically at your command.
Consider this example: A group of scientists are importing data files from an instrument. After the data from each file is imported, a number of formulas are entered on the worksheet followed by a series of formatting commands. Each run had hundreds of data files and meant a couple of days of grueling, monotonous work.
MS Excel courses showed them how to record actions into a macro. All the work done on each file is now accomplished with a single keystroke. Each data file is now processed in less than a second and full runs take only an hour.
Edit macros to refine their functionWhen a macro is recorded, it creates a list of instructions in a computer language called Visual Basic for Applications (VBA). This small program can be opened and the commands can be edited directly, allowing actions that can't normally be duplicated just by recording.
The scientists in the above example still had to load each file individually until they enrolled in MS Excel courses that demonstrated macro editing. With this knowledge, they expanded the functionality so that the macro would import each batch of hundreds of data files automatically. Now each instrument run became a matter of typing one key then sitting back and watching Excel do the work. What used to take two days now took about two minutes, and the scientists were freed up to do less clerical work and more research.