Forum Discussion

LeandroCampacci's avatar
LeandroCampacci
Copper Contributor
May 04, 2023
Solved

Transpose certain rows into columns

Hello! I have a vertically arranged table that contains name, email and unit. In this table, names and e-mails can repeat more than once when a given contact has two or more units.

 

What I need is, from this original table, create a new one containing name and e-mail per line and, for cases of two or more units, only these units are transposed to new columns.

 

Example of what I currently have:

 

 

Example of what I need to do:

 

 

In the example in the last image, I used the transpose option in the paste action. It was manual. So I wanted to find a solution that could somehow automate this.

 

Edit: There was no sensitive data except names, but I chose to update.

  • LeandroCampacci 

    Is there any confidential data in your file and in the screenshots? If so please delete everything (file, screenshots.....) containing confidential data. Thank you.

     

    Maybe like this with Power Query. In the attached file you can add data to the blue dynamic table. Then you can click in any cell of the green table and right-click with the mouse and select refresh to update the green result table.


    The data layout in the screenshot and in the attached file is for illustration. You can place the green result table to the right of the blue table or in another worksheet.

2 Replies

  • LeandroCampacci 

    Is there any confidential data in your file and in the screenshots? If so please delete everything (file, screenshots.....) containing confidential data. Thank you.

     

    Maybe like this with Power Query. In the attached file you can add data to the blue dynamic table. Then you can click in any cell of the green table and right-click with the mouse and select refresh to update the green result table.


    The data layout in the screenshot and in the attached file is for illustration. You can place the green result table to the right of the blue table or in another worksheet.

Resources