Computers, Software
Excel macros - saving your time
In Excel, Word and Power Point applications, you can create your own commands, called macros. They automate the execution of routine work, when you have to constantly apply to text or cells the same design, enter similar sets of formulas, etc. In fact, macros are small programs, since they are written in Visual Basic scripts. However, even a user who is far from programming can easily create and edit them.
Excel macros are most often used. With their help, you can even create calculator documents, for example, to calculate the company's monthly budget.
Recording a macro
You can create a macro in two ways. The first is to write the VB script from scratch. This is how programmers act. The second method is simpler: you need to enable recording of all actions in a special recorder and just once again perform those procedures that you want to automate.
Let's take a look at how to write macros in Excel 2007 using a macro recorder (second way).
To make new Excel macros, you need the following:
- Open Developer> Code> Record Macro.
- Write down the name from which it will be clear what the macro does.
- Select the appropriate key combination for a quick macro call (it should not duplicate your frequently used Windows hot keys, for example, CTRL + C / CTRL + V).
- The "Save to ..." list is responsible for the scope of the macro. In order for your Excel macros to work in all documents opened on this computer, select the "Personal Book" item.
- Fill in the description (list all recorded actions).
- Click "OK" to start recording. A special icon will appear in the corner of the screen.
- Do the necessary actions with the cells.
- Click "Stop recording" in the "Developer"> "Code" tab.
Note: Excel macros can store relative or absolute cell references. If you did not select the appropriate option, at the time of recording, the macro will remember that the action should be applied to the cell that you selected. If you have to work with different cells, choose the option about the relative link.
Operation with the program menu (switching tabs) and switching to other windows in the recorder is not recorded.
Security Settings
Despite assurances that the application can independently monitor macros for malicious code, it is not recommended to take them from unverified sources. For example, download ready from the Internet. You can trust the opinion of antiviruses, and macros used on several computers in the office are recommended to be digitally signed.
By default, the use of macros in documents is usually disabled. You can enable Excel macros if you go to the Developer tab and then go to Code> Macro Security> Macro Options> Enable All> OK. The changes take effect the next time the file is opened.
Similar articles
Trending Now