MENU
Donate

Free ebook

Free ebook: VBA & Macros Quick Start

Record, edit, and write simple VBA macros to automate repetitive Excel work — no programming background needed.

Get the ebook

Course path

Turn this into a course path

VBA & Macros strings lessons like this one into a structured, advanced-friendly path.

View course path

Free tools

There's a free tool for this

Formula builder, formula explainer, CSV cleaner, and 8 more browser tools — no upload, no sign-up.

Browse free tools

Templates & data

Want to practice this yourself?

Free .xlsx templates and practice datasets — direct download, no sign-up.

Browse templates & datasets

Tip

Looking for something specific?

Search finds functions, articles, courses, and directory entries from one box — the icon lives in the header.

Try search
=ARTICLES

Record your first macro in Excel (no coding required)

=YOUTUBE

Watch alongside this article

Public YouTube resources matched to this article's topic, functions, and practice goal.

video / Beginner

Automate Excel Without Becoming a Programmer | Macros & VBA 101

MyOnlineTrainingHub

Open on YouTube (opens in a new tab)
MyOnlineTrainingHub

Loading preview…

A macro is a recorded sequence of actions you can replay with one click. You don’t need to write any code — Excel writes it for you while you work.

Step 1: Turn on the Developer tab

It’s hidden by default. Go to File → Options → Customize Ribbon, check Developer in the right-hand list, and click OK. A new Developer tab appears in the ribbon.

Step 2: Record a macro

Click Developer → Record Macro, give it a name (no spaces), optionally assign a keyboard shortcut, and click OK. Excel is now recording. Perform the steps exactly as you want them repeated — formatting cells, entering a formula, deleting a column, whatever the repetitive task is — then click Developer → Stop Recording.

Step 3: Run it again

Developer → Macros, select the macro, click Run — or just use the keyboard shortcut you assigned. Every action you recorded happens again, instantly.

Save it correctly

Regular .xlsx files can’t store macros — saving as one silently strips them out with only a small warning easy to miss. Choose Excel Macro-Enabled Workbook (.xlsm) from the Save As dialog instead.

Relative vs. absolute references

By default, a recorded macro repeats actions on the exact same cells every time, regardless of where your selection started. If you want it to work relative to wherever you begin — like “bold whatever cell is currently selected” rather than “always bold C4” — turn on Use Relative References (next to Record Macro) before you start recording.

Peeking at the code

Alt+F11 opens the VBA editor, where the recorded macro shows up as plain-English-ish VBA code. You don’t need to understand it to use macros, but it’s a reasonable way to start learning VBA — record something simple, then read what Excel generated.

A word of caution

Macros can carry malicious code, which is why Excel warns you before running them and disables macros in files from unknown sources by default. Only enable macros in workbooks you trust.

=PRACTICE

Go deeper with this skill

Automate repeated workbook actions while keeping the macro understandable, testable, and safe to rerun. For this article, the goal is to practice: How to turn on the Developer tab, record a macro of repetitive steps, and run it again with one click — no VBA knowledge needed.

Practice workbook setup

Use a copy of a workbook with a repeated task such as formatting, exporting, filtering, or preparing a report.

Practice workflow

  1. Write down the manual steps before recording or coding the macro.
  2. Record a simple version first, then inspect the generated VBA and remove unnecessary selections.
  3. Test the macro on a copy of the workbook and confirm it handles different row counts.
  4. Add a short comment or button label that explains when the macro should be used.

Quality checks

  • The macro does not depend on a single active cell unless that is intentional.
  • It can be rerun without duplicating outputs or damaging source data.
  • The workbook has a backup before automation changes many cells.

Common mistakes

  • Recording every click and leaving fragile Select or Activate steps everywhere.
  • Testing only on the perfect sample workbook.
  • Automating a messy process before clarifying the intended output.

Next actions

  • Replace one recorded selection-heavy step with a direct range reference.
  • Create a small test workbook with fewer rows and more rows to check reliability.

Formula focus: even if this workflow is not formula-heavy, add one check cell that confirms the final output still matches the source data.