Choose your language

English Português

Excel VBA Tutorial

Learn VBA and make your Excel productivity stand out...

Learn!
Tutorial VBA

Tutorial VBA

Learn how to create macros in VBA, automate tasks in Excel, and be more productive at work.

First steps

  1. Excel VBA: Advantages and uses of Excel VBA
  2. VBA Settings: Environment settings to run Excel VBA
  3. VBA VBE: VBE, the VBA development IDE in Excel
  4. VBA Macro Recorder: Instructions for using the Excel macro recorder
  5. VBA First Macro: Excel VBA Hello World
  6. VBA Comments: How to make comments in Excel VBA
  7. VBA Buttons With Macro: Adding macros to buttons and shapes

Fundamentals

  1. VBA Variables: Using and associating variables in Excel VBA
  2. VBA Operators: Arithmetic operators, text operators, and VBA comparison operators
  3. VBA If... Then: VBA If Then conditional statements
  4. VBA Select Case: Select Case statements for Excel VBA
  5. VBA For Next: Loop For Next for Excel VBA
  6. VBA Do Loop: Do Loop statements of Excel VBA
  7. VBA Subroutine and Function: Subroutine and functions for Excel VBA
  8. VBA Strings: Main text Functions in VBA
  9. VBA Events: Understanding VBA Events
  10. VBA Array: Using arrays in VBA
  11. VBA For Each: Using For Each loop in VBA

Range

  1. VBA Range: Range statement in VBA
  2. VBA Named Range: Named Range in VBA
  3. VBA Select, Row, Column: Using Select, Row, and Column in VBA
  4. VBA Last row: Finding the last filled row in VBA
  5. VBA Resize: Resizing Ranges using VBA
  6. VBA Excel Formulas: Using Excel Formulas in VBA

Userform

  1. VBA UserForm: Using Excel Userform
  2. VBA UserForm Layout: Creating and adjusting the layout of the Excel UserForm
  3. VBA UserForm Event: Understanding UserForm Events
  4. VBA Worksheet Interface: Interfacing the UserForm with the Worksheet

Deepening

  1. VBA Error Handling: Handling VBA Errors
  2. VBA Libraries: Adding and Working with Libraries in VBA
  3. VBA Text Files: Working with text files (TXT and CSV)
  4. VBA Pivot Table: Using PivotTables with VBA
  5. VBA Email: Sending an email with VBA
  6. VBA Scheduled Execution: Scheduled automation with VBA
Exercises VBA

Exercises VBA

Put your acquired knowledge into practice by solving exercises with Excel VBA.

Basic

  1. VBA Text Formatting: Simple VBA exercise that teaches you how to use the macro recorder and create useful codes
  2. VBA Color Selected: Simple VBA exercise that teaches you how to change the background color of selected cells
  3. VBA Metric Converter: VBA exercise to convert inches to centimeters
  4. VBA Do Loop Sum: VBA exercise that uses the Do Loop until a criterion is met
  5. VBA Sum of Powers: Simple VBA exercise that teaches you to create a function that determines the limit of a series
  6. VBA Sort Array: Simple VBA exercise that teaches you how to create a BubbleSort Algorithm
  7. VBA Simple Loop: Simple VBA exercise that teaches you how to use concatenation in a loop
  8. VBA Harmonic Mean: Simple VBA exercise that teaches you to do a function to calculate the harmonic mean
  9. VBA Alternate Color: Simple VBA exercise that teaches you to use two interlocking loops and fill with color the cells
  10. VBA Even or Odd: Simple VBA exercise that teaches you to sort data as even or odd
  11. VBA First Capital Letter: VBA exercise that teaches you to make the first capital letter of all the elements of a column
  12. VBA Intersection: Simple VBA exercise that teaches you to use named Ranges and the Intersect function
  13. VBA Ascending Order: VBA exercise that teaches you to change the order of a sequence to ascending
  14. VBA Concatenate: Simple VBA exercise that teaches you to join data from different worksheets
  15. VBA Select Case: VBA exercise that teaches you to use the Select Case statements
  16. VBA Columns to Lines: VBA exercise that teaches you how to transform data that was in columns to rows
  17. VBA Making an Addition: Simple VBA exercise that teaches you to use a loop to add data to a list with missing values
  18. VBA Offset Resize: Simple VBA exercise that teaches you to use the Offset and Resize properties of a Range object
  19. VBA Search and Color: VBA exercise that teaches you to use loop along with the conditional If to fill cells
  20. VBA Current Region: Simple VBA exercise that teaches you to use the Current Region and formula R1C1
  21. VBA Simple Email: VBA exercise teaching you to send an automatic email

Intermediate

  1. VBA Message Box: VBA exercise that teaches you how to use MsgBox and InputBox in an advanced way
  2. VBA Final Score: VBA exercise that teaches you to create a function to determine a mean with weights
  3. VBA Factorial Function: Simple VBA exercise that teaches you to create a function that calculates the factorial value of a number
  4. VBA Infinite Series: Simple VBA exercise that teaches you to use the loop until a criterion is met
  5. VBA Count dollar bills: VBA exercise that teaches you to fractionate a financial value to as few bills as possible
  6. VBA Prime Number: VBA exercise that teaches you to create a function to count the number of times a prime number appears
  7. VBA If Then Insert Cell: VBA exercise that teaches you to use loop along with a conditional to insert cells
  8. VBA Text to Columns: VBA exercise that teaches you how to transform imported text data into columns
  9. VBA Even and Odd: Simple VBA exercise that teaches you to organize data when even or odd
  10. VBA Ballot Box: VBA exercise that teaches you how to use UserForm and create a voting booth for a company

Advanced

  1. VBA Recursive Factorial: VBA exercise that teaches you how to create a recursive factorial function
  2. VBA Hangman Game: VBA exercise that teaches you how to create a Hangman game
  3. VBA HTML Email: VBA exercise that teaches to send an automatic email by exporting spreadsheet data in the form of an HTML table