Power Query in Excel lets you connect to data sources, clean and transform data, and load the result into a worksheet or the Data Model — all without writing formulas or macros. It is built into Excel for Microsoft 365, Excel 2021, and Excel 2019 (as a separate add-in in some older versions). To start, open Excel and look for the Data tab; the Get & Transform Data group is where Power Query lives. If you do not see it, your Excel version may not include it, or the add-in may need enabling via File > Options > Add-ins. Menu labels can differ slightly by version, device, and region, but the core workflow is the same.

What You'll Need

  • Excel for Microsoft 365, Excel 2021, or Excel 2019 (Power Query is built in). In Excel 2016 and earlier it may be a separate add-in called Get & Transform.
  • A data source: a table in the same workbook, a CSV file, a folder of files, a database, or a web page.
  • Basic familiarity with rows, columns, and headers.

Step-by-Step

  1. Open the Power Query Editor. Go to the Data tab and click Get Data. Choose your source (for example, From File > From Text/CSV or From Table/Range). If you are starting from a table in the sheet, first select a cell inside it, then choose From Table/Range. The Power Query Editor opens in a separate window.
  2. Check the data type and headers. In the editor, use the Home tab. If the first row should be headers, click Use First Row as Headers. Set each column's type by clicking the icon in the column header (for example, Text, Whole Number, Date). Correct types prevent later errors.
  3. Remove unwanted rows and columns. Select columns you do not need and right-click > Remove. To drop blank rows, use Remove Rows > Remove Blank Rows. To keep only the top rows, use Keep Rows > Keep Top Rows.
  4. Clean text values. Right-click a column > Transform to trim spaces, change case, or replace values. Use Replace Values to fix inconsistent entries (for example, "NY" to "New York").
  5. Split or merge columns. Select a column and use Split Column (by delimiter or number of characters) on the Home tab. To combine columns, select them and choose Merge Columns, then pick a separator.
  6. Filter rows. Use the dropdown arrow on a column header to filter values. Filters are applied as steps and can be changed later.
  7. Add a calculated column (optional). On the Add Column tab, use Custom Column to write a simple expression (for example, [Price] * [Quantity]). Power Query uses its own formula language, M, but the dialog helps with common operations.
  8. Review the Applied Steps. The Applied Steps pane on the right lists every transformation. Click any step to see the data at that point. You can rename, reorder, or delete steps. This is the audit trail of your cleanup.
  9. Load the result. Click Close & Load (or Close & Load To…) on the Home tab. Choose to load to a new worksheet, an existing worksheet, or the Data Model. Loading to the Data Model is useful if you plan to build PivotTables or relationships.
  10. Refresh when source data changes. On the Data tab, click Refresh All. Power Query re-runs all steps against the source. If the source is a file, keep the file path unchanged or update it via Data > Queries & Connections > Properties.

Common Mistakes

  • Not setting data types. Leaving a date column as Text causes sorting and filtering errors. Set types early.
  • Editing the loaded table directly. Changes made to the output table in the worksheet are overwritten on refresh. Always edit in the Power Query Editor.
  • Renaming source columns after loading. If the source header changes, the query may break. Use Replace Values or rename steps to be resilient.
  • Loading to the worksheet when the Data Model is needed. For PivotTables across multiple tables, load to the Data Model instead.
  • Ignoring the Applied Steps order. Deleting a step in the middle can break later steps that depend on it.

Tips

  • Name your queries meaningfully in the Queries pane (right-click > Rename) so you can find them later.
  • Use Reference (right-click a query) to create a new query that starts from the output of another, keeping the original intact.
  • For folders of CSV files, use Get Data > From File > From Folder and then Combine Files to append them automatically.
  • Keep a copy of the original source file; Power Query does not modify it.
  • Document steps by renaming them in the Applied Steps pane (double-click a step name).

Troubleshooting

  • Query fails to refresh: Check the source path or credentials. Go to Data > Queries & Connections, right-click the query, and choose Edit to see which step errors. The error message often names the column or step.
  • Data type errors: A column may contain mixed types. Use Change Type with Using Locale if dates are in a different format.
  • Headers wrong: Re-open the query and toggle Use First Row as Headers.
  • Refresh is slow: Reduce columns and rows early in the steps; filter before other transformations.
  • Cannot find Power Query: In older Excel, enable it via File > Options > Add-ins > Manage Excel Add-ins > Go, then check the box. In Microsoft 365 it is built in.

Frequently Asked Questions

Is Power Query free?

It is included with Excel for Microsoft 365, Excel 2021, and Excel 2019. No separate purchase is required for those versions.

Does Power Query work on Mac?

Yes, Power Query is available in Excel for Mac, though some data connectors and features may differ from Windows. Check the Data tab for Get Data.

Can I undo a step in Power Query?

Yes. In the Applied Steps pane, click the X next to a step to delete it, or use Undo (Ctrl+Z) in the editor. Deleting a step may break later steps that depend on it.

What is the difference between Power Query and Power Pivot?

Power Query is for extracting, transforming, and loading data. Power Pivot is for data modeling and building relationships. They are often used together.

Can Power Query connect to a web page?

Yes, use Data > Get Data > From Other Sources > From Web and enter the URL. Some pages may require authentication or may not be structured for easy import.

Why does my query refresh change my column order?

The output order follows the steps in the query. If you reorder columns in the worksheet, a refresh will reset them. Reorder in the Power Query Editor instead.