Hi,
I need to do something similar to this:
http://www.mrexcel.com/forum/excel-...-rows-paste-transpose-into-single-column.html
How do I change the destination from Sheet 1 "J1" to Sheet 2 "J1"?
I need to do something similar to this:
http://www.mrexcel.com/forum/excel-...-rows-paste-transpose-into-single-column.html
How do I change the destination from Sheet 1 "J1" to Sheet 2 "J1"?
Code:
Sub SubbyWays()
Dim sData As Variant
Dim f_Data As Variant
Dim iC As Integer
Dim iR As Long
Dim rCoun As Long
Dim UCol As Integer
rCoun = 1
sData = Range("A1").CurrentRegion.Value
UCol = UBound(sData, 2)
ReDim f_Data(1 To UBound(sData, 1) * UCol, 1 To 1)
For iR = LBound(sData, 1) To UBound(sData, 1)
For iC = LBound(sData, 2) To UBound(sData, 2)
f_Data(rCoun, 1) = sData(Int((iC - 1) / UCol) + iR, 1 + ((iC - 1) Mod UCol))
rCoun = rCoun + 1
Next
Next iR
Range("J1").Resize(UBound(f_Data), 1) = f_Data
End Sub
Last edited: