Transpose the column values into row base on a certain values in a column

pratheesh

New Member
Joined
Dec 16, 2020
Messages
12
Office Version
  1. 365
  2. 2011
  3. 2010
Platform
  1. Windows
Hi all,

I have a table that looks like the below "Input" and i want to transpose it into a structure like the "Output"

I need to take the unique values in the column "ID". And print it as once even how many time it appears the column till "country" should print once and the values in the "Rate" column should be print in rows until in available for the same "ID". when the value in the "ID" column changes, it the respected values for the next "ID" should start a print in the next row.

Please see the image for reference.

Thanks in advance
 

Attachments

  • excel.PNG
    excel.PNG
    19.1 KB · Views: 11
How about
+Fluff 1.xlsm
ABCDEFGHIJKL
1IDCityCountryRateIDCityCountryRate1Rate2Rate3Rate4
21RomeItaly12551RomeItaly125521525486
31RomeItaly2152ParisFrance65588142
41RomeItaly254863FrankfurtGermany985131546515681548
52ParisFrance65584MilanItaly59949666
62ParisFrance8142
73FrankfurtGermany9851
83FrankfurtGermany31546
93FrankfurtGermany51568
103FrankfurtGermany1548
114MilanItaly5994
124MilanItaly9666
13
Test
Cell Formulas
RangeFormula
F2:H5F2=UNIQUE(A2:C12)
I2:K2,I5:J5,I4:L4,I3:J3I2=TRANSPOSE(FILTER($D$2:$D$12,($B$2:$B$12=G2)))
Dynamic array formulas.
 
Upvote 0
Solution

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

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