Written by: host 5/18/2007 12:00 AM
I don't understand why Excel doesn't (appear to) have a Row To Column function built in. If it does, I couldn't find it. The following macro does the trick, and only took like five minutes to record edit and run to get right. I figured this has to be a common enough problem, so here was my own solution: Sub RowToColumn() Dim i As Integer For i = 1 To 27 Range("B1").Select() Selection.Cut(Destination:=Range("A" & i + 1)) Range("C1:Z1").Select() Selection.Cut(Destination:=Range("B1:Y1")) Next i End Sub
I don't understand why Excel doesn't (appear to) have a Row To Column function built in. If it does, I couldn't find it. The following macro does the trick, and only took like five minutes to record edit and run to get right. I figured this has to be a common enough problem, so here was my own solution:
Sub RowToColumn() Dim i As Integer For i = 1 To 27 Range("B1").Select() Selection.Cut(Destination:=Range("A" & i + 1)) Range("C1:Z1").Select() Selection.Cut(Destination:=Range("B1:Y1")) Next i End Sub
Sub RowToColumn()
Dim i As Integer
For i = 1 To 27
Range("B1").Select()
Selection.Cut(Destination:=Range("A" & i + 1))
Range("C1:Z1").Select()
Selection.Cut(Destination:=Range("B1:Y1"))
Next i
End Sub
0 comments so far...