Where is your original list located? Is it in a single row on a
worksheet? All in one cell? Other?
If it is in a single row on a worksheet, use code like the following.
Change the lines marked with <<< to the appropriate values.
Sub AAA()
Dim ColNum As Long
Dim StartCol As Long
Dim EndCol As Long
Dim WS As Worksheet
Dim R As Range
Dim RowNum As Long
RowNum = 1 '<<< CHANGE TO ROW NUMBER OF DATA
StartCol = 1 '<<< CHANGE TO FIRST COLUMN OF DATA
Set WS = Worksheets("Sheet2") '<<< CHANGE SHEET NAME
Set R = WS.Range("A5") '<<< CHANGE TO WHERE COLUMNS SHOULD START
With WS
EndCol = .Cells(RowNum, .Columns.Count).End(xlToLeft).Column
End With
For ColNum = StartCol To EndCol Step 2
R(1, 1).Value = WS.Cells(RowNum, ColNum).Value
R(1, 2).Value = WS.Cells(RowNum, ColNum + 1).Value
Set R = R(2, 1)
Next ColNum
End Sub
If all the data is in a single cell, use code like the following.
Change the lines marked with <<< to the appropriate values.
Sub BBB()
Dim V As Variant
Dim R As Range
Dim DataCell As Range
Dim WS As Worksheet
Dim N As Long
Set WS = Worksheets("Sheet2") '<<< CHANGE
Set DataCell = WS.Range("A1") '<<< CHANGE
Set R = WS.Range("A5") '<<< CHANGE
V = Split(DataCell.Value, " ")
For N = LBound(V) To UBound(V) Step 2
R(1, 1) = V(N)
R(1, 2) = V(N + 1)
Set R = R(2, 1)
Next N
End Sub
If neither of these procs work, post back with considerably more
detail.
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Tue, 24 Feb 2009 13:12:07 -0800, mt engineer <mt