How to transpose groups of rows of data into corresponding columns where each group is one row

michcheong

New Member
Joined
Aug 26, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi there,
Looking for help to transpose groups of rows of data into corresponding columns, where each group is now one row. I would like to use PowerQuery to do it. Best is to use clicking the commands steps in PowerQuery as I am not great in programming.

From this format:
1661493872912.png


To this format:
1661493931884.png
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to the MrExcel board!
  1. Click anywhere inside your source table and convert it to an official Excel table by hitting Ctrl-t...and indicate that your table has headers.
  2. While selecting a cell anywhere inside the newly created table, click Data > From Table/Range to open the Power Query editor. Your table should be automatically loaded into PQ.
  3. Click on your Year column heading and then Transform > Pivot Column. In the dialog box that pops up, confirm that the Date column entries are to form the new columns and then select the column that holds the numeric values (that will form the body of the transformed table) and confirm. Your table should appear as you've indicated.
  4. To load the table back into an Excel worksheet, click Home > Close and Load to... and indicate the destination.
 
Upvote 0
Welcome to the MrExcel board!
  1. Click anywhere inside your source table and convert it to an official Excel table by hitting Ctrl-t...and indicate that your table has headers.
  2. While selecting a cell anywhere inside the newly created table, click Data > From Table/Range to open the Power Query editor. Your table should be automatically loaded into PQ.
  3. Click on your Year column heading and then Transform > Pivot Column. In the dialog box that pops up, confirm that the Date column entries are to form the new columns and then select the column that holds the numeric values (that will form the body of the transformed table) and confirm. Your table should appear as you've indicated.
  4. To load the table back into an Excel worksheet, click Home > Close and Load to... and indicate the destination.
Thank you very much! It works like magic!!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top