row to column - vba or code or formula

Vishaal

Well-known Member
Joined
Mar 16, 2019
Messages
533
Office Version
  1. 2010
  2. 2007
Platform
  1. Windows
  2. Web
we have the following data and we have copy the sheet1!B2:C2 and pasted on Sheet2!B2 and transposed it, again we have copied the data from Sheet1!B3:D3 and again pasted on Sheet2!B3

we will copy the data and check last filled row in sheet2 and paste transposed data

in sheet1 data may be long B2:AZ2

Book11
BCDE
2ST1ST2
3TT2TT4TT6
4TT98TT4TT6TT2
Sheet1


Required as per below sheet
Book11
B
2ST1
3ST2
4TT2
5TT4
6TT6
7TT98
8TT4
9TT6
10TT2
Sheet2
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Power Query

Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}, {"Column3", type text}, {"Column4", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Attribute"})
in
    #"Removed Columns"

Book1
ABCD
1Column1Column2Column3Column4
2ST1ST2
3TT2TT4TT6
4TT98TT4TT6TT2
5
6Value
7ST1
8ST2
9TT2
10TT4
11TT6
12TT98
13TT4
14TT6
15TT2
Sheet1
 
Upvote 1
Solution
I have not used power query code, can we get vba
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,984
Members
449,092
Latest member
Mr Hughes

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