• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

What's the purpose of Macros and VBA

leeks23

New Member
I am taking an Excel course, and one of the sections has us learning how to use Macros and VBA, but I'm having a hard time seeing these tools being used in real life.
 
Plenty of real-life situations here (where people are asking for help with VBA and macros):

 
Macros will automate any number of actions you perform daily in Excel. What would require numerous keyboard inputs, copy/paste and other actions can be placed into a macro to automate the process and complete all those actions you would manually accomplish over several minutes .. in a split second.

So ... saving time and allowing you to put your energy into something else is key with macros.

Macros will allow the users of your projects to easily utilize those projects when they have no knowledge of Excel. Macros will also prevent
the users from making errors when using your projects. Lets say you (or whoever you create an Excel project for) need a large group of people
to provide substantial information about their activities at work. How many units they built today ... were there errors that occurred and what
were the result/remedies of those errors ... how much material did they use in building those units ... etc. etc. Using macros you can create
a user form that holds various entry fields for the employee to fill in with all that information ... then the information is automatically entered
into a database that can later be reviewed / analyzed / highlighted the problems and solutions can be implemented. All this was made
easier for the employee because they only had to enter information into various entry fields instead of spending an hour filling in a paper
report.

There are a ton more reasons to use macros and you will learn their value as you spend more time with Excel / VBA.
 
I am taking an Excel course, and one of the sections has us learning how to use Macros and VBA, but I'm having a hard time seeing these tools being used in real life.
but i use those on hourly basis each working day, i wouldn't even have a job without those. they are essentials.
including even power query tools.
 
@shili12 I think you need to clarify to make your answer helpful - how do you use them and in what way are they essential?
 
they are essential as formulas are restricted to analyse and perform certain complex tasks, and automating tasks too
you just need to look at this VBA section and see what @Marc L and @vletm @BobBridges are capable of doing. and even in the other forum.
Without Macros , excel simply isnt excel. I dont have a job, if i dont use macros on hourly basis.
@leeks23 this is not simply true,
but I'm having a hard time seeing these tools being used in real life.
 
You can use use vba to enhance the security of an application you create. For example, I created a very large application in Excel to run every aspect of our production business in back the the early 2000s; back when it was easy to create custom Toolbars too.

I had a work specific Toolbar that allowed me to log daily production, resources, sales, contractor work, links to Quickbooks, and UPS, and so much more.

If I was not doing the recording, my boss would bastardize the formulas and break the application. As well as the normal things that were all handled in vba, I would choose a function such as production, and the Workbook would be unlocked for editing so that I could enter data. Upon finishing my entries, it would automatically lock the Workbook again.

vba will allow you to created custom User Forms for data entry, and so much more.

Learn it, and once you become reasonably good at coding, you will find it to be exceedingly powerful and to your benefit. Rule: Comment your work! 40% of my code was comments...

Looking for a job? You not only know Excel, you know how to code in vba for Excel!
 
I can't agree that "Excel isn't Excel without VBA"; Excel by itself is an exceptionally useful tool. But it's true I use VBA programming quite a bit, both professionally and at home, to automate repeated tasks. In some cases the ability to program, in VBA or some other language that can interact with MS Office, enables a client to collect information and generate hundreds of workbooks with data individualized to a department or manager. On other cases it's just a matter of a customized worksheet function, or summing up data in a particular way that I can't figure out how to do with the built-in functions.

Of course, I'm a programmer at heart; I've loved coding ever since I was exposed to it in college. Most people are perfectly content getting along without it. If you're one of those people, don't let us enthusiasts talk you into feeling guilty about being the other sort. But it sure is useful.
 
Excel is a phenomenal tool without vba, and I've used it alone and with everything in vba. Why solely vba? Because I've created an application where the user(s) interact with Excel via custom User Forms, and they never see, nor edit formulas. In some cases, I've made them initiate editing actions through key combinations which fist, unprotect the worksheet, and when finished, it protects it again. I had a boss once upon a time that would edit, and break formulas if he had access to them. Locking the worksheet down saved me many hours of rework or updates.

I've also written applications that deliberately do not use vba because of the other computers and Office products they may run on. Who other than us knows what an xltm file is? Few, and many don't know what to do with it, question it, and end up not using it.

My days of coding in vba are long past, but I thoroughly enjoyed it, and elevated the capabilities of Excel and myself.
 
Back
Top