Column List to Multiple Columns
On Jan 8, 11:20*am, merjet wrote:
Sub Macro1()
'assumes target sheet is ActiveSheet
'assumes data starts in row 1
'works in Excel 2002
Dim iCt As Integer
Dim iRow As Integer
iCt = 2
iRow = 1
iCol = 24
Do
* * If Range("C" & iCt) = "" Then
* * * * Cells(iRow, iCol) = Range("W" & iCt)
* * * * Range("W" & iCt).Clear
* * * * iCol = iCol + 1
* * Else
* * * * iCol = 24
* * * * iRow = iCt
* * End If
* * iCt = iCt + 1
Loop Until Range("W" & iCt) = ""
End Sub
Hth,
Merjet
What changes to the code have to be made if the data begins on Row 2?
|