Rearrange Data

LuxCoder

New Member
Joined
Apr 8, 2018
Messages
6
Hi,

I have data in this format:

CID"C-00001""C-00002""C-00003"
NameAlexandra Van de VyvereNathalie Pouradier DuteilThomas Raguenaud
Waist757988
Half Waist Front3940
Half Waist Back3739
Hips9298104
Half Hips Front4545
Half Hips Back4753
Thigh515768
Knee383952
Calf
Bottom292950
Full length including waistband9189112
Inside length6671
Full rise635874
Front crotch including waistband262228
Back crotch including waistband373646

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>

Which need in the following format:

"C-00001"Waist79
Half Waist Front40
Half Waist Back39
Hips98
Half Hips Front45
Half Hips Back53
Thigh57
Knee39
Calf0
Bottom29
Full length including waistband89
Inside length71
Full rise58
Front crotch including waistband22
Back crotch including waistband36
"C-00002"Waist79
Half Waist Front40
Half Waist Back39
Hips98
Half Hips Front45
Half Hips Back53
Thigh57
Knee39
Calf
Bottom29
Full length including waistband89
Inside length71
Full rise58
Front crotch including waistband22
Back crotch including waistband36

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Any help would be great. Thanks.

Lj
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Do you need to do this just once, or many times over and over again ?
Is your data far larger than the sample shown here ?

If you only need to do this once, and if your data isn't too large, then a simple cut and paste will do it.
 
Upvote 0
Hi,

Previous post had wrong data, please use this reference.

I have data in this format:

CID"C-00001""C-00002""C-00003"
NameAlexandra Van de VyvereNathalie Pouradier DuteilThomas Raguenaud
Waist757988
Half Waist Front3940
Half Waist Back3739
Hips9298104
Half Hips Front4545
Half Hips Back4753
Thigh515768
Knee383952
Calf
Bottom292950
Full length including waistband9189112
Inside length6671
Full rise635874
Front crotch including waistband262228
Back crotch including waistband373646

<tbody>
</tbody>


Which need in the following format:

"C-00001"Waist75
Half Waist Front39
Half Waist Back37
Hips92
Half Hips Front45
Half Hips Back47
Thigh51
Knee38
Calf
Bottom29
Full length including waistband91
Inside length66
Full rise63
Front crotch including waistband26
Back crotch including waistband37
"C-00002"Waist79
Half Waist Front40
Half Waist Back39
Hips98
Half Hips Front45
Half Hips Back53
Thigh57
Knee39
Calf
Bottom29
Full length including waistband89
Inside length71
Full rise58
Front crotch including waistband22
Back crotch including waistband36

<colgroup><col><col><col></colgroup><tbody>
</tbody>


Any help would be great. Thanks.

Lj​





 
Upvote 0
Thank you Sir for replying.

There are around 600 customers and their data. Cannot copy paste all of them.

Regards

Lj
 
Upvote 0
How about
Code:
Sub LuxCoder()
   Dim Ary As Variant, Hdr As Variant
   Dim i As Long, UsdCols As Long
   
   With Sheets("[COLOR=#ff0000]Sheet1[/COLOR]")
      UsdCols = .Cells(1, Columns.Count).End(xlToLeft).Column
      Hdr = .Range("A1", .Cells(1, UsdCols)).Value
      Ary = .Range("A3", .Range("A" & Rows.Count).End(xlUp).Offset(, UsdCols - 1)).Value
   End With
   For i = 2 To UBound(Ary, 2)
      With Sheets("[COLOR=#ff0000]sheet2[/COLOR]").Range("B" & Rows.Count).End(xlUp).Offset(1)
         .Offset(, -1).Value = Hdr(1, i)
         .Resize(UBound(Ary), 2).Value = Application.Index(Ary, Evaluate("row(1:15)"), Array(1, i))
      End With
   Next i
End Sub
Change sheet names in red to suit
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,559
Messages
6,114,302
Members
448,564
Latest member
ED38

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