Pinterest Pixel

Reverse Rows Using Power Query

Bryan
Power Query lets you perform a series of steps to transform your Excel data.
 One of the steps it allows you to take is to reverse the order of rows very easily. 

Power Query lets you perform a series of steps to transform your Excel data.  One of the steps it allows you to take is to reverse the order of rows very easily.

Reverse Rows Using Power Query | MyExcelOnline
Download excel workbookReverse-Rows-2.xlsx

 

To provide a quick comparison, it’s not straightforward to reverse rows in Excel without Power Query:

We have our data that we want to reverse the row order:

Reverse Rows Using Power Query

Since Excel does not have a Reverse Row function, we need to add a Helper column manually that has the order listed out (from 1 to 10).

Reverse Rows Using Power Query

We use the Sort function and select Sort Largest to Smallest.

Reverse Rows Using Power Query

The data is now in reverse order.

Reverse Rows Using Power Query

 

Let’s go through the steps in detail on how to do it easily in Power Query:

 

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

Reverse Rows Using Power Query

 

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

Excel 2016:

 Reverse Rows Using Power Query

Excel 2013 & 2010:

Replace Values Using Power Query

 

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

Currently you can see the Ranks ordered from First to Tenth. We want to reverse the ordering of the rows.

Reverse Rows Using Power Query

 

STEP 4: Within here you need to select Transform > Reverse Rows

Reverse Rows Using Power Query

 

STEP 5: Now you will see your changes take place. The Ranks are now ordered from Tenth to First.

Reverse Rows Using Power Query

 

STEP 6: Click Close & Load from the Home tab and this will open up a brand new worksheet in your Excel workbook with the updated data.

Reverse Rows Using Power Query

You now have your new table in reverse order.

Reverse Rows Using Power Query

 

If you like this Excel tip, please share it



Reverse Rows Using Power Query | MyExcelOnline


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  Consolidate Multiple Excel Sheets Using Power Query Append

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...