View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
merjet merjet is offline
external usenet poster
 
Posts: 812
Default Multi Line Transpose Excel VBA code

Sub macro1()
Dim iCt As Long
Dim iCol As Long
Dim iRow As Long
Set ws = Sheets("Sheet1")
iCol = 2
iCt = 1
iRow = 1
Do Until ws.Cells(iCt, 1) = ""
ws.Cells(iRow, iCol) = ws.Cells(iCt, 1)
If iCt Mod 5 = 0 Then
iRow = iRow + 1
iCol = 1
End If
iCol = iCol + 1
iCt = iCt + 1
Loop
End Sub

Hth,
Merjet