Transpose Data

Ruban S

New Member
Joined
Dec 31, 2019
Messages
35
Office Version
  1. 2016
Platform
  1. Windows
Dear All,

Please help me.

I have data like this

SHORTLONGNOUNMODIFIERATT N1ATT V1
BELT,A56BELT,DESIGNATION:A56BELT--DESIGNATIONA56
BELT,A57BELT,DESIGNATION:A57BELT--DESIGNATIONA57

And I want it like this

BELT,A56BELT,DESIGNATION:A56
BELT--
DESIGNATIONA56
BELT,A57BELT,DESIGNATION:A57
BELT--
DESIGNATIONA57
 
You need to change the sheet names to match your sheet names
Thank You Very much.
It is working. But it is restricted to 6 Fields(columns). What to do if I have many columns.
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
It's not limited to 6 columns, as long as there are no blank columns or rows it will work for your entire data.
 
Upvote 0
It's not limited to 6 columns, as long as there are no blank columns or rows it will work for your entire data.
Dear,

It is really helpful.

Can you please help me with the below request also.

I have data like this
CODENOUN & MODIFIERSHORTLONGATT N1ATT V1ATT V1 ABBATT N2ATT V2ATT V2 ABB
1​
BELT,--BELT,A56BELT,DESIGNATION:A56,MATERIAL:RUBBERDESIGNATIONA56A56MATERIALRUBBERRBR
2​
BELT,--BELT,A57BELT,DESIGNATION:A57,MATERIAL:RUBBERDESIGNATIONA57A57MATERIALRUBBERRBR


And I want it like this
1​
BELT,--BELT,A56BELT,DESIGNATION:A56,MATERIAL:RUBBER
1​
DESIGNATIONA56A56
1​
MATERIALRUBBERRBR
2​
BELT,--BELT,A57BELT,DESIGNATION:A57,MATERIAL:RUBBER
2​
DESIGNATIONA57A57
2​
MATERIALRUBBERRBR
 
Upvote 0
How about
VBA Code:
Sub RubanS()
    Dim Oary As Variant, Nary As Variant
    Dim r As Long, c As Long, nr As Long
    
    Oary = Range("A1").CurrentRegion.Value2
    ReDim Nary(1 To UBound(Oary) * UBound(Oary, 2) / 2, 1 To 4)
    For r = 2 To UBound(Oary)
        For c = 2 To UBound(Oary, 2) Step 3
            nr = nr + 1
            Nary(nr, 1) = Oary(r, 1)
            Nary(nr, 2) = Oary(r, c)
            Nary(nr, 3) = Oary(r, c + 1)
            Nary(nr, 4) = Oary(r, c + 2)
        Next c
    Next r
    Sheets("Sheet2").Range("A1").Resize(nr, 4).Value = Nary
End Sub
 
Upvote 0
Dear,

Thank you very much. It is working great.

Please help me in future also, if I need anything else.
 
Upvote 0
Dear,

I need your help for the below request.

I have data like this

SHORTLONGNOUNMODIFIERATT N1ATT V1ATT N2ATT V2ATT N3ATT V3
CHEMICAL,FAST-DRY SELF VULCANIZING CEMNTCHEMICAL, TYPE:FAST-DRY SELF VULCANIZING CEMENT, PACK SIZE:236.6MLCHEMICAL--TYPEPACK SIZE
CHEMICAL,FLUSH,LOCO,236.6MLCHEMICAL,FLUSH, BRAND:LOCO, PACK SIZE:236.6MLCHEMICALFLUSHMANUFACTURERBRANDPACK SIZE

I Need it like this

SHORTLONGNOUNMODIFIERATT N1ATT V1ATT N2ATT V2ATT N3ATT V3
CHEMICAL,FAST-DRY SELF VULCANIZING CEMNTCHEMICAL, TYPE:FAST-DRY SELF VULCANIZING CEMENT, PACK SIZE:236.6MLCHEMICAL--TYPEFAST-DRY SELF VULCANIZING CEMENTPACK SIZE236.6ML
CHEMICAL,FLUSH,LOCO,236.6MLCHEMICAL,FLUSH, BRAND:LOCO, PACK SIZE:236.6MLCHEMICALFLUSHMANUFACTURERBRANDLOCOPACK SIZE236.6ML

Likewise, I have many records, Please help me with some solution.
Data has to be Autofill based on LONG
 
Upvote 0
As this is a totally different question, you will need to start a new thread.
Thanks
 
Upvote 0
As this is a totally different question, you will need to start a new thread.
Thanks
Dear,

Please help me with this.

 
Upvote 0

Forum statistics

Threads
1,223,936
Messages
6,175,507
Members
452,650
Latest member
Tinfish

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