Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Excel Macros and VBA for Beginners
Rating: 4.2 out of 5(51 ratings)
811 students

Excel Macros and VBA for Beginners

Create Macros from scratch with VBA and Macro Recorder
Last updated 3/2026
English

What you'll learn

  • Creating Macros using macro recorder
  • Creating macro manually from scratch with VBA Scripting
  • Editing Macros
  • Debugging Macros
  • Analyzing macros
  • Distinguish between absolute and relative references.
  • How to save workbook with macros
  • Create a module
  • Create procedure
  • Executing Macros

Course content

2 sections25 lectures2h 21m total length
  • Introduction0:51
  • What are Macros1:29
  • Office 365 Setup13:18
  • Activating Office 365 Apps3:34
  • Logging into Office 3655:34
  • Activating Macros and VBA Tools2:07
  • What is VBA1:00
  • Exploring VBA Interface7:29
  • Creating basic Macro10:48
  • Saving a worksheet with a Macro1:57
  • Creating another Macro Part 16:09
  • Creating another Macro Part 24:55
  • Exploring Macros code inside VBA Editor7:33
  • Commenting and deleting lines of VBA Code6:29
  • Editing Macros in VBA Editor3:33
  • Sorting data with Macros4:12
  • Filtering Data with Macros5:41
  • Creating buttons to run Macros5:48
  • Protecting cells and sheets with Macros6:26
  • Debugging Macros Part 17:54
  • Debugging Macros Part 212:24
  • Debugging Macros Part 37:48
  • Manually creating a macro from scratch.11:48
  • Thank You0:09

Requirements

  • Microsoft Excel 2013 or above

Description

A macro is a sequence of instructions that automates some aspect of Excel so that you can work more efficiently and with fewer Errors. Macros are written in VBA, which stands for Visual Basic for Applications, is a programming language developed by Microsoft.

Sub: A sub is made up of one or more lines of code. When we “Run” the sub, VBA goes through all the lines of code and carries out the appropriate actions. A macro and a sub are essentially the same thing.

Module: A module is simply a container for our subs. A module contains subs which in turn contain lines of code. There is no limit(within reason) to the number of modules in a workbook or the number of subs in a module.

VBA Editor: This is where we write our code. Pressing Alt + F11 switches between Excel and the Visual Basic Editor. If the Visual Basic editor is not currently open then pressing Alt + F11 will automatically open it.

When we use the term Excel Macros we are referring to VBA. The term macro is essentially another name for a sub. Any time you see the terms Excel Macros or VBA just remember they are referring to the same thing.

In VBA we create lines of instructions for VBA to process. We place the lines of code in a sub. These subs are stored in modules.

We can place our subs in the module of the worksheet. However, we generally only place code for worksheet events here.

In VBA, we create new modules to hold most of our subs. So for our first activity let’s go ahead and create a new module.


What you will learn:


  • What VBA is and why it is so incredibly useful

  • What  are Macros

  • Creating Macros using macro recorder

  • Creating macro manually from scratch

  • Editing Macros

  • Debugging Macros

  • How to write VBA code and execute it in Excel

  • How to make your macros work with workbooks, worksheets and the data on them

  • How to find and eliminate errors in your programs and make your macros run

  • Automation using macros.

  • Analyse the macro from the Developer tab or the View tab.

  • Examine the VBA window and VBA components.

  • Distinguish between absolute and relative references.

  • How to save workbook with macros

  • Create a module

  • Create procedure

  • Create a sub

  • Understand the difference between a module and sub

  • Run the code in a sub




Who this course is for:

  • Beginners to VBA and Macros