What are Excel macros
Excel Macros can be define as a set of instructions programmed into the electronic spreadsheet Excel, which automate the operations performed by the office application Excel with the aim of eliminating repetitive tasks or perform complex calculations in a short time and with a zero probability of error.
VBA is the programming language used for creating Excel macros, VBA are the acronym for Visual Basic for Applications and is a language developed by Microsoft and implemented in computer softaware of the Office suite, as for example Excel, Acces and Word.
To better understand the concept of Excel macros imagine that in our work we have to write daily exchange value of 1 euro for 1 dollar, then perform a series of calculations relating to financial or accounting issues, to do this every day we have to go to the web, find the value of change, copy and paste the value in our Excel spreadsheet and perform the appropriate calculations. Using Excel macros we can do this by pressing a button, Excel application automatically perform each of the above operations for us, giving reliable results in just 1 second.
In the example above if we make this work by hand we can say that we would invest 10 minutes, which after a year would be 3300 minutes, or almost 7 working days dedicated to do this, what if you had to do this kind of work daily but with a range of 50 different currencies?, are you willing to devote a full day to fully perform this repetitive task, knowing that with a macro Excel can be done in just 1 second and with a zero probability of error?. But for do this work by Excel you need to tell how, at this time is when VBA involved, we can say that VBA is the interlocutor by which we communicate with Excel, VBA is the programming language of Excel Macros.
There are 2 ways to do Macros in Excel:
Using the Macro Recorder.
Using language to program Excel VBA
The first option is easiest because it only requires pressing the button macro recorder and perform all the operations we want to be repeated, once we keep the recorded macro with the name you want. Whenever we want to run this macro to press the macro button and select run.
The first option is the easiest to use but is the one with more limitations, given that only run once recorded and the task will not use full power of the VBA language.
The second option requires knowledge and practice of the VBA programming language, but is undoubtedly the most powerful option within application development, anything you can think can be done using VBA from a complex application to the automation repetitive tasks of our Excel spreadsheet.
Here are some examples that we can do with Excel Macros:
Development of complex applications Automation of repetitive tasks
Development of new functions or applications within Excel
Communication between VBA compatible applications like Word, Access, Outlook, Autocad ...
Creating games within the Excel software
|If you like, share it||Tweet||