Transponse each n rows + merge rows periodically

krneki

New Member
Joined
May 24, 2012
Messages
6
I have data in three columns which I would like to transponse like demonstrated on the screenshot below. All the solutions that I have managed to found on the forums so far did not really work for the timestamps since they need to be merged (one unique timestamp per row). The data pattern is always the same, periodical.


Could anyone please help me out on how to achieve the desired result?


DfJNCiw.png
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
try PowerQuery

timestampsvariablesvaluestimestampsABC
20.11.2018 0:00:00A
1​
20.11.2018 0:00:00
1​
2​
3​
20.11.2018 0:00:00B
2​
20.11.2018 0:00:01
4​
5​
6​
20.11.2018 0:00:00C
3​
20.11.2018 0:00:02
7​
8​
9​
20.11.2018 0:00:01A
4​
20.11.2018 0:00:03
10​
11​
12​
20.11.2018 0:00:01B
5​
20.11.2018 0:00:01C
6​
20.11.2018 0:00:02A
7​
20.11.2018 0:00:02B
8​
20.11.2018 0:00:02C
9​
20.11.2018 0:00:03A
10​
20.11.2018 0:00:03B
11​
20.11.2018 0:00:03C
12​

Code:
[SIZE=1]let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Pivoted Column" = Table.Pivot(Source, List.Distinct(Source[variables]), "variables", "values", List.Sum)
in
    #"Pivoted Column"[/SIZE]
 
Last edited:
Upvote 0
You can do that quite easily with a Pivot Table. Select your range A1:C13. From the Insert tab, click Pivot Table. Click OK on the dialog box. Then on the new sheet, look for the PivotTable Fields box on the right. Drag timestamps to the Rows box, variables to the Columns box, and values to the Values box. You can go to the PivotTable Tools/Design tab, click the Grand Totals button and remove the Grand Totals if you want.
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,933
Members
449,480
Latest member
yesitisasport

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