Cellgrids Cellgridsby LearnWithRinkesh
Home › Excel tutorials › Excel Macros and VBA for Beginners: Automate Your First Report

Excel Macros and VBA for Beginners: Automate Your First Report

By Rinkesh Shah · Business Analyst, 8 years in data · Updated 2026-11-03

A macro is a saved list of actions that Excel can repeat. If you do the same formatting, copying or cleaning every day, a macro can do it in one click.

Record your first macro

  1. Turn on the Developer tab (File → Options → Customize Ribbon).
  2. Click Record Macro, give it a name, and do your steps once.
  3. Click Stop Recording.
  4. Run it from Macros or assign it to a button.

Read the code

Press Alt + F11 to open the VBA editor. Your recorded steps are saved as code. Reading it is the best way to start learning VBA.

Core VBA ideas

Stay safe

Macro-enabled files use the .xlsm format. Only enable macros in files from people you trust, and keep a backup before running new code on real data.

When not to use VBA

If Power Query or a pivot table can do the job, use that first. Use VBA for steps that need real automation, like building and saving a report file.

Go deeper

Chapter 8 of our Advanced Excel course teaches the macro recorder, variables, loops, ranges, buttons and error handling, and ends with an automated report project.

Learn it step by step: Advanced Excel

A structured course with a live practice sheet in every lesson, exercise files, a test and a certificate you can verify online. See the full syllabus before you decide.

View the course → All courses Free practice

Frequently asked questions

Is VBA still useful?

Yes, for automation inside Excel. Many offices still use macros for daily reports.

Do macros work on Mac and online Excel?

Macros work in desktop Excel. Excel for the web has limits, so check your version.

Is it safe to enable macros?

Only for files you trust. Unknown macro files can be harmful.