A
AncientLearner
I have 3 columns of data, the numbers of rows is variable. I am trying the
transpose the data from each row into a single column.
A1 B1 C1
Parts# Qty Sor
12345 1 011
67890 10 012
Desired result:
Parts#
Qty
Sor
12345
1
011
67890
10
012
I have been using the following but can't seem to get the 3rd column to move.
Sub test()
Dim rngFrom As Range
Dim rngTo As Range
Dim rng As Range
With Sheets("Sheet1")
Set rngFrom = .Range(.Range("A2"), .Cells(Rows.Count, "A").End(xlUp))
End With
Set rngTo = Sheets("Sheet2").Range("A2")
For Each rng In rngFrom
rngTo.Value = rng.Value
rngTffset(1, 0).Value = rng.Offset(0, 1).Value
Set rngTo = rngTffset(4, 0)
Next rng
End Sub
Any suggestions?
Thanks.
transpose the data from each row into a single column.
A1 B1 C1
Parts# Qty Sor
12345 1 011
67890 10 012
Desired result:
Parts#
Qty
Sor
12345
1
011
67890
10
012
I have been using the following but can't seem to get the 3rd column to move.
Sub test()
Dim rngFrom As Range
Dim rngTo As Range
Dim rng As Range
With Sheets("Sheet1")
Set rngFrom = .Range(.Range("A2"), .Cells(Rows.Count, "A").End(xlUp))
End With
Set rngTo = Sheets("Sheet2").Range("A2")
For Each rng In rngFrom
rngTo.Value = rng.Value
rngTffset(1, 0).Value = rng.Offset(0, 1).Value
Set rngTo = rngTffset(4, 0)
Next rng
End Sub
Any suggestions?
Thanks.