Complex Transpose?

cschaaf

New Member
Joined
Nov 14, 2008
Messages
18
Office Version
  1. 365
Platform
  1. Windows
I've tried to search, but I'm not sure what keywords will get me the right results.

I have ~1000 data records each with 6 data points. The data is currently arranged like this:

Driver 1Avg Duration4
Avg Repair10
Escalation9
Score9
Surveys15
Volume1000
Driver 2Avg Duration88
Avg Repair3
Escalation8
Score10
Surveys100
Volume5000

I need to transpose those records so it looks like this:
Avg DurationAvg RepairEscalationScoreSurveysVolume
Driver 141099151000
Driver 28838101005000

I'm not sure how to get this to work.

Thanks!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
With Power Query aka Get and Transform Data

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Filled Down" = Table.FillDown(Source,{"Column1"}),
    #"Pivoted Column" = Table.Pivot(#"Filled Down", List.Distinct(#"Filled Down"[Column2]), "Column2", "Column3")
in
    #"Pivoted Column"

Book12
ABCDEFGHIJK
1Column1Column2Column3Column1Avg DurationAvg RepairEscalationScoreSurveysVolume
2Driver 1Avg Duration4Driver 141099151000
3Avg Repair10Driver 28838101005000
4Escalation9
5Score9
6Surveys15
7Volume1000
8Driver 2Avg Duration88
9Avg Repair3
10Escalation8
11Score10
12Surveys100
13Volume5000
Sheet1
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Sorry! Updated. I'm using O365 on Windows. I'm not an advanced user.
With Power Query aka Get and Transform Data
This looks like what I need. Off to learn about Power Query now! I'll start with the video in your signature. Thank you!
 
Upvote 0
Updated. I'm using O365 on Windows.
Thanks for that. (y)
With a formula
Fluff.xlsm
ABCDEFGHIJKL
1Avg DurationAvg RepairEscalationScoreSurveysVolume
2Driver 1Avg Duration4Driver 141099151000
3Avg Repair10Driver 28838101005000
4Escalation9
5Score9
6Surveys15
7Volume1000
8Driver 2Avg Duration88
9Avg Repair3
10Escalation8
11Score10
12Surveys100
13Volume5000
14
Data
Cell Formulas
RangeFormula
G1:L1G1=TOROW(B2:B7)
F2:F3F2=TOCOL(A2:A1000,1)
G2:L3G2=WRAPROWS(TOCOL(C2:C1000,1),6)
Dynamic array formulas.
 
Upvote 1
Solution
I've tried to search, but I'm not sure what keywords will get me the right results.

I have ~1000 data records each with 6 data points. The data is currently arranged like this:

Driver 1Avg Duration4
Avg Repair10
Escalation9
Score9
Surveys15
Volume1000
Driver 2Avg Duration88
Avg Repair3
Escalation8
Score10
Surveys100
Volume5000

I need to transpose those records so it looks like this:
Avg DurationAvg RepairEscalationScoreSurveysVolume
Driver 141099151000
Driver 28838101005000

I'm not sure how to get this to work.

Thanks!
By using formulas.

Complex Transpose.xlsm
GHIJKLM
3Avg DurationAvg RepairEscalationScoreSurveysVolume
4Driver 1341944382371298825092320
5Driver 2336714913095234240832859
6Driver 33974158589311142999130
7Driver 4169847361057245117154054
8Driver 536714798316235447701558
9Driver 631771906209231223475663
10Driver 725063567313637786994506
11Driver 831683491189241347744720
12Driver 972748044849274325021200
13Driver 109961333443812411980598
14Driver 1112779274192162524472305
15Driver 124039384846304029061745
16Driver 13476111131573295129631705
17Driver 14361719653209130135231135
18Driver 15404114162448259012903120
19Driver 16417267547005771964155
20Driver 17153239592973480436004284
Sheet1
Cell Formulas
RangeFormula
G4:G20G4=UNIQUE(FILTER(A1:A102,A1:A102<>""))
H3:M3H3=TRANSPOSE(B1:B6)
H4:M20H4=TRANSPOSE(OFFSET(INDIRECT("A" & MATCH($G4,$A:$A,0)),0,2,6,1))
Dynamic array formulas.
 
Upvote 1
N.B. Fluff posted a formula solution.
What information do you ultimately require?
Consider modifying the structure and then prepare your reports from the "Database style data'.
You could use formulas or other tools.

or use formulas to change the structure
T202311a.xlsm
ABC
1DriverTypeNum
2Driver 1Avg Duration4
3Driver 1Avg Repair10
4Driver 1Escalation9
5Driver 1Score9
6Driver 1Surveys15
7Driver 1Volume1000
8Driver 2Avg Duration88
9Driver 2Avg Repair3
10Driver 2Escalation8
11Driver 2Score10
12Driver 2Surveys100
13Driver 2Volume5000
2a


use sum or sumproduct

T202311a.xlsm
ABCDEFGHIJK
1
2Column1Avg DurationAvg RepairEscalationScoreSurveysVolume
3Driver 141099151000
4Driver 28838101005000
5
6Driver 141099151000
7Driver 28838101005000
8
2aa
Cell Formulas
RangeFormula
E3:E4,E6:E7E3=UNIQUE(Driver)
F3:K4F3=SUM(--(Driver=$E6)*(Type=F$2)*Num)
F6:K7F6=SUMPRODUCT(--(Driver=$E6),--(Type=F$2),Num)
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Driver='2a'!$A$2:$A$13F3:K4, F6:K7, E3, E6
Num='2a'!$C$2:$C$13F3:K4, F6:K7
rData='2a'!$A$2:$C$13F3:K4, F6:K7, E3, E6
Type='2a'!$B$2:$B$13F3:K4, F6:K7
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,286
Members
449,218
Latest member
Excel Master

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