This post starts a series about an introduction to macros and VBA code.
What is a macro? In most cases it’s a synonym for VBA code that we run. It’s almost the same thing. Sometimes we differentiate it and we call macros the VBA code that was recorded by Excel — Record Marco command. If we want to use this command, we should turn on the Developer tab. In order to do that, we have to right-click on our ribbon and go the Customize the Ribbon command (Fig. 1)

In the Excel Options window that has appeared, we have to find the Developer tab on the right side, press it and press OK (Fig. 2)

Now, we can see that in the Developer tab we have the Record Marco command (Fig. 3)

This command allows us to record actions we are doing on a worksheet, such as cell formatting, putting values in a cell, size modification, etc. It’s a good place to start learning about the VBA code.
Macros are good for two main reasons.
First, they are good for repeating tasks. If we want to make reports on a daily basis, we can just record all actions we are doing in a worksheet and then we are able to use it again, probably with tiny modifications. We will have a report format by running macro.
Second, the VBA code allows us to do the things that are not possible or very hard when using Excel functions. Those things will be much simpler using the VBA code. It may even happen that somebody has already written a proper code to this task.
If we want to save macro, we have to use the ‘xlsm’ extension, where ‘m’ stands for macros. We can run macros on ‘xlsx’, which is a standard extension for Excel, however Excel won’t save macros in those files. Remember, only ‘xlsm’ works for macros.