Excel Tip: How to Create Simple Macros
Ever find yourself working with an Excel® spreadsheet, continually repeating the same set of keystrokes over and over again? For instance, you might be analyzing a few hundred rows of client data and deleting rows that, for whatever reason, you don’t need.
Repeatedly you use the drop down menu to plod through the sequence: “Edit > Delete > Entire Row > OK”
There are different workarounds for this; one is to create a simple “macro.” A macro is a memorized combination of keystrokes that can be fired off using a single mapped combination.
Old-school online gamers might remember the maddening experience of trying to quickly execute an action that required multiple keystrokes:
To equip your armor and draw your weapon, press CTRL + “a”, then “e”, then “SHIFT” + ”d”, then “s”.
It wasn’t pretty. Anyone back then who could write a macro was able to do all of those things by pressing a single button, resulting in a swift and merciless defeat. Back then, the macro was a valuable little trick available primarily to true computer nerds.
Now, it’s easy. To accomplish the row deletion example above, instead of repeatedly going through the sequence ““Edit > Delete > Entire Row > OK” every single time you want to delete a row, just do the following to “record” your macro:
- Click “Tools” > “Macro” > “Record New Macro”
- Name your macro (e.g. “RowDelete”) and pick a key to map it to. (Note: It must be a key that doesn’t have any other shortcuts mapped to it. Add a description if you’d like.)
- Execute the series of commands you’re assembling. In this case, go through the sequence as you normall would: Edit > Delete > Entire Row > OK
- Click “Tools” > “Macro” > “Stop Recording”
The next time you need to delete a row, just hit “Option + CMD + [the key you mapped it to]” and the row deletes with a single combination keystroke.
Top 5 Reasons To Automate Legal Document Creation
5 Bad Habits Of Business Lawyers
How To Make Your Emails More Effective