MENU
Donate

Free ebook

Free ebook: Conditional Formatting Mastery

Everything you need to know about Excel's conditional formatting: highlight rules, top/bottom rules, data bars, color scales, icon sets, formula-based rules, managing and debugging rules, and real-world use cases. Hands-on examples throughout.

Get the ebook

Course path

Turn this into a course path

Power Query strings lessons like this one into a structured, intermediate-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

Power Query vs Excel formulas for data cleaning: when to use each

=YOUTUBE

Watch alongside this article

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

Both Power Query and worksheet formulas can clean data in Excel. They are not interchangeable — they work at different layers and suit different problems.

What each one does

Worksheet formulas live alongside your data. TRIM, SUBSTITUTE, LEFT, IFERROR, TEXT — you write them in cells, they update as the source cells change, and anyone can read and edit them without knowing another tool.

Power Query is a separate pipeline. You connect it to a source (a file, a table, a folder, an API), apply a sequence of steps, and it outputs a clean table. The steps are recorded — you can see and edit them, and the whole pipeline reruns with one click when the data changes.

When formulas are the right choice

Formulas work best when:

  • The dataset is small and already in the workbook
  • You need the cleaned result in the same sheet as the source
  • Other people need to understand or modify the logic
  • You need a result that updates live as cells change
  • The cleaning is simple: trim spaces, fix capitalisation, split one column
=TRIM(PROPER(A2))

That line cleans whitespace and fixes capitalisation. It is immediately readable, requires no separate tool, and works in any version of Excel.

When Power Query is the right choice

Power Query is better when:

  • The data comes from an external source (a file, a folder of files, a database)
  • The shape needs to change: unpivot columns, merge tables, group rows, split a column into multiple rows
  • You need to repeat the same cleaning every week or month
  • The dataset is large enough that formula columns would slow the workbook
  • You want to document the cleaning steps in a structured, inspectable pipeline

Power Query handles tasks that formulas cannot express cleanly:

  • Unpivoting a wide table (months as columns) into a long table (one row per month)
  • Merging two tables on a key column
  • Splitting one row into many rows based on a delimiter
  • Importing all files from a folder and stacking them into one table

The telling question

Does the data come in from outside, and does the shape need to change?

If yes: Power Query. If the data is already in the workbook and you just need to clean some cells: formulas.

Many workflows use both. Power Query imports and reshapes a source file into a clean table; formulas in an adjacent sheet add calculated columns on top of that output. The boundary is the table Power Query produces.

Version note

Power Query is available in Excel 2016 and later (Get & Transform tab). It is not available in Excel Online. If the workbook will be used in a browser or on an older version, formulas are the only option.

=PRACTICE

Go deeper with this skill

Create a repeatable cleanup and refresh process instead of doing the same manual edits every month. For this article, the goal is to practice: A practical guide to choosing between Power Query and worksheet formulas when you need to clean, reshape, or transform data in Excel.

Practice workbook setup

Use a raw export with extra columns, inconsistent text, blanks, or repeated monthly files.

Practice workflow

  1. Import the data into Power Query and rename every meaningful step.
  2. Remove columns only after confirming they are not needed downstream.
  3. Set data types deliberately for dates, numbers, IDs, and text.
  4. Load the cleaned result to a table and refresh it after changing the source.

Quality checks

  • Applied steps are named clearly enough to review later.
  • Data types are correct before loading the result.
  • Refresh works without manual cleanup in the worksheet.

Common mistakes

  • Editing the loaded table instead of the query steps.
  • Removing columns before checking whether reports depend on them.
  • Ignoring errors caused by new values or changed source headers.

Next actions

  • Create a small refresh checklist and keep it beside the report.
  • Try combining two files or appending a new month to test repeatability.

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