5 Basic Tips For Excel Macro Creation
One of the reasons for the creation of Macros is that they are the best when it comes to freeing up a sizable fraction of your time for more productivity. Macros are designed to auto complete tasks that are repetitive so that users can devote their time to other things with a peace of mind, knowing that work is still being done without their supervision. Here are 5 tips when it comes to Excel Macro creation:
- Name
When it comes to Excel macro creation, it will benefit you to keep your macro names descriptive but short for easy identification purposes. Make sure you label your macro names well so that you will not struggle to identify it later on. Excel’s system provides a descriptive field too, which you can make use of. Macro names are limited to letters without spaces, symbols or punctuation- at least for the beginning that is. The longest Macro name you can create has a limit of 80 characters.
- Relative cell reference
Unless the macro you are creating is only limited to one specific application in your excel spreadsheet, it is advisable to stick to using relative cell references, especially when you plan to use this macro in other spreadsheets or adjust things. When doing so, make sure to choose the relative reference button after you choose to record your Excel macro. This way, you can reduce a lot of potential errors that may crop up.
- Specific
Another tip when it comes to Excel macro creation would be to keep your macros specific and as small as possible. The bigger and longer your macro, the more time it takes to run. If you combine too many tasks (formulas and functions) into one macro, it may run the risk of failing to run. And it would take virtually forever to find where exactly the mistake or failure is. If you keep your macros separate and run them separately, you will be able to review them more accurately.
- Navigate
When you need to navigate, make use of directional keys instead of your mouse cursor. This is because mouse navigation is usually more complicated when it comes to macros and suited better for only selecting/clicking options. It may take a longer time to position your cursor and make important functions like editing, changing or deleting things so make use of the directional keys instead.
- Troubleshoot
In the event that your excel macro creation results in failure, you will have to troubleshoot it. You can do so by going through one line by one line and sift through the information. Make use of the F8 key to skip through events as you check. Use Developer and choose Macro to select your macro creation from the list that appears. Click Step into and slowly press F8 through the code window to see where the macro stops- that is likely where the error is located. Repair it if you can, if you can’t then it is advisable to record a new one.