Example macro vba in excel - automatic report.

The automate tasks with macros vba in Excel grants numerous advantages to us: the eradication of mistakes of human calculations, saving of working time, resolution of complex calculations, effectiveness, and efficiency.

In order to observe the numerous advantages that macros vba in excel provides , we are going to give a simple example of repetitive tasks: imagine that every Monday when arriving at work, you must make a report about the current prices and codes of products of your company, to do this we have a report with the following format:

Automatic Report with Excel Macros.

In the first row we have the name of the product, in the low row, the reference of the product, the later row shows the price and, finally, the following row is white. Like this, up to 500 products.

Data Excel Sheet.

The report presented has to group all the products in just one column, represented in the side columns the reference and the price of each product.

Final data Excel Sheet .

Analysing the process, if this work would be done manually you would have to follow these steps:

Select the reference of the product.

Cut the reference.

Stick it in the following cell

Select the price of the product

Cut the price

Stick it in the continuous cell

Select the rows that are in target.

Erase the rows

Each step supposes a click in the mouse, assuming that in each operation we invert an average of 3 seconds; we obtain the format, by each product we took 24 seconds, by the 500 products we would obtain 3 hours and 20 minutes without stopping to make these steps.

If we execute the macro in just 5 seconds we ensure this task does not have any mistake meanwhile if do it by hand it would be wrong.

If instead of having 500 products we have 5.000, 20.000 or even 50.000 we can not do it by hand, because it will take us many weeks or even months to writhe the report. Thanks to the programming with macros these kind of tasks can be realised, and they will turn into automate tasks letting us spending our time in other things.