Can you provide an example?
Does this macro do what you want...I have 19000 rows of data spreading from column A to V. I need to transpose these in a from left to right! That is, I need column A to sit instead of column V and all the columns in between in the same way.
Sub RearrangeColumns()
Dim X As Long, LastRow As Long, Letters As Variant, NewLetters As Variant
Const NewOrder As String = "V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A"
LastRow = Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlFormulas).Row
Letters = Split(NewOrder, ",")
ReDim NewLetters(1 To UBound(Letters) + 1)
For X = 0 To UBound(Letters)
NewLetters(X + 1) = Columns(Letters(X)).Column
Next
Range("A1").Resize(LastRow, UBound(Letters) + 1) = _
Application.Index(Cells, Evaluate("ROW(1:" & LastRow & ")"), NewLetters)
End Sub
hi
I have 19000 rows of data spreading from column A to V. I need to transpose these in a from left to right! That is, i need column A to sit instead of column V and all the columns in between in the same way.
please comment.
Already posted in Message #4.I am sure there is a VBA way to do it nicely.
Already posted in Message #4.
Yes. I just saw and tried it. It works like a magic as usual!