Pinterest Pixel

Use First Row as Headers Using Power Query or Get & Transform

Bryan
Working with data in Excel often means dealing with messy or inconsistent formatting.
Sometimes, when you import data from an external source like a database, a CSV file, or even another Excel sheet, the column headers are not in the right place.

Instead of seeing meaningful headers like Full Name, Country, and Rank, you might see generic placeholders like Column1, Column2, Column3.

Working with data in Excel often means dealing with messy or inconsistent formatting. Sometimes, when you import data from an external source like a database, a CSV file, or even another Excel sheet, the column headers are not in the right place. Instead of seeing meaningful headers like Full Name, Country, and Rank, you might see generic placeholders like Column1, Column2, Column3.

That’s where Power Query (called Get & Transform in Excel 2016) comes to the rescue. Power Query is one of the most powerful tools inside Excel for cleaning, shaping, and transforming your data before analyzing it. In this article, we’ll take a deep dive into how to use the first row as headers in Power Query/

Key Takeaways:

  • Power Query (Get & Transform) is a powerful Excel tool for importing, cleaning, and transforming data.
  • It allows you to replace generic column names with meaningful headers from the first row.
  • Transformations in Power Query are repeatable; you can refresh data without redoing steps.
  • Proper headers improve sorting, filtering, formulas, and PivotTable functionality.
  • Power Query supports additional data cleaning tasks, like removing columns, splitting data, and filling blanks.

 


Download excel workbookUse-First-Row-as-Headers.xlsx

Understanding Power Query and the Importance

What is Power Query (Get & Transform) in Excel?

Power Query is a data connection and transformation tool available in Excel 2010 and later versions.

  • In Excel 2010 and 2013, it’s available as an add-in that you install separately.
  • In Excel 2016 and later, it’s built directly into Excel under the Data tab as Get & Transform.

Power Query allows you to import, transform, and load data. “Transform” is the magic word here—it means you can clean and reshape data in countless ways:

  • Remove unnecessary columns.
  • Split or merge columns.
  • Filter rows based on conditions.
  • Replace values.
  • Change data types.
  • And importantly, use the first row as headers.

The best part? Power Query records each step you take as a repeatable transformation script. If your source data changes tomorrow, you don’t need to redo everything—just refresh, and the steps will apply automatically.

Why Use First Row as Headers?

Before we get into the steps, let’s understand why this feature is useful.

When you import data from external sources such as databases, CSV files, or web queries, Excel often assigns generic column names like Column1, Column2, Column3. In reality, the meaningful labels you need are usually sitting in the first row of the dataset.

Without proper headers:

  • Sorting and filtering become confusing.
  • Formulas like =VLOOKUP(…) don’t work smoothly because the column references aren’t clear.
  • PivotTables display unhelpful or messy column names.

By using Power Query’s “Use First Row as Headers” step, you can instantly replace the generic labels with meaningful headers, making your dataset structured, readable, and ready for analysis.

 

Step-by-Step Guide to Using the First Row as Headers

STEP 1: Select your data and turn it into an Excel Table by pressing the shortcut Ctrl + T or by going to Insert > Table

Use First Row as Headers Using Power Query or Get & Transform

STEP 2: Go to Data > Get & Transform > From Table (Excel 2016) or Power Query > Excel Data > From Table (Excel 2013 & 2010)

Excel 2016:

 Fill Down Values Using Power Query

Excel 2013 & 2010:

from table

STEP 3: This will open up the Power Query Editor.

We want to change the Table headers with the first row.  Go to Home > Use First Row As Headers

Use First Row as Headers Using Power Query or Get & Transform

STEP 4: Click Close & Load from the Home tab, and this will open up a brand new worksheet in your Excel workbook with the cleaned table.

Use First Row as Headers Using Power Query or Get & Transform

You now have your new table with the brand new table header!

Use First Row as Headers Using Power Query or Get & Transform

 

Pro Tips for Working with Headers in Power Query

Here are some extra tricks you might find useful when dealing with headers:

  • Promote Headers Automatically – Power Query often automatically suggests using the first row as headers when it detects generic names like Column1, Column2. You’ll see a small gear icon next to the step in the Applied Steps pane. You can tweak it if needed.
  • Rename Headers Manually – If the first row isn’t perfect, you can still right-click on column headers and rename them.
  • Fill Down Before Promoting Headers – Sometimes, the first row might contain nulls or blanks. Use the Fill Down option before promoting headers to ensure consistency.
  • Undo a Step – If you made a mistake, look at the Applied Steps pane (on the right side of the Power Query Editor). Simply delete or adjust the “Promoted Headers” step.
  • Multiple Header Rows? – If your dataset has two header rows (common in financial reports), you can first promote one row as headers, then combine or clean them with other transformations.

 

FAQs

Q1: What versions of Excel support Power Query?

Power Query is available as a built-in feature in Excel 2016 and later under Get & Transform. For Excel 2010 and 2013, it’s available as a separate add-in you need to install. It allows consistent data transformation across multiple Excel versions. Once installed, it can import, clean, and transform data efficiently. This makes it a versatile tool for both older and newer Excel users.

Q2: Why should I use the first row as headers?

Using the first row as headers replaces generic names like Column1, Column2 with meaningful labels. This makes your data easier to read and analyze. Sorting and filtering become intuitive, and formulas referencing column names work properly. PivotTables also display the correct column titles. Overall, it improves dataset usability and reduces errors in analysis.

Q3: Can I undo using the first row as headers in Power Query?

Yes, Power Query records each step in the Applied Steps pane. If you promoted the first row by mistake, you can simply delete or modify that step. This flexibility ensures you can experiment without losing data. Power Query transformations are non-destructive. Your original data remains unchanged in the Excel workbook.

Q4: What if my first row has blanks or null values?

Before promoting headers, you can use the Fill Down feature to populate blank cells. This ensures that headers remain meaningful and consistent. Alternatively, you can manually rename headers after promoting them. Handling blanks beforehand prevents errors in formulas and PivotTables. Power Query allows multiple steps to clean headers efficiently.

Q5: Can Power Query handle multiple header rows?

Power Query works best with a single header row. If your dataset has multiple header rows, you can first promote one row as headers and then combine or clean the remaining rows. Additional transformations may include merging or renaming columns. This approach helps standardize complex datasets. Properly structured headers ensure downstream analysis remains accurate and easy to maintain.

If you like this Excel tip, please share it




Bryan

Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).

He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.

See also  Import Data from CSV Using Power Query or Get & Transform

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...