List in lines to Columns

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
:ROFLMAO:Hello, I have a large list of names and ages in column A, need each name and age in sequence row by row.
I tried already transpose but did not work.
Is it possible?
Any idea on how to perform this is more than welcome


...​
ABC
1NAME1NAME1AGE1
2AGE1NAME2AGE2
3NAME2NAME3AGE3
4AGE2......
5NAME3
6AGE3
7....

<tbody>
</tbody>
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
So you mean with a macro solution or manual?

If manual, you could insert a column in between A and B, then use a formula to determine if the row is odd or even and then filter those values to get the two separate lists. Copy the two lists to your destination columns, then delete the formula helper column.

If VBA, simple suggestion, try:
Code:
Sub TransferData()

Dim x As Long
Dim b As Long
Dim c As Long

    b = 1
    c = 1 
    
    Application.ScreenUpdating = False

    With ActiveSheet
    
        For x = 1 To .Cells(.Rows.Count, 1).End(xlUp).Row
            If x Mod 2 = 1 Then
                .Cells(b, 2).Value = .Cells(x, 1).Value
                b = b + 1
            Else
                .Cells(c, 3).Value = .Cells(x, 1).Value
                c = c + 1
            End If
        Next x
    
    End With
    
    Application.ScreenUpdating = True

End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,030
Messages
6,128,408
Members
449,448
Latest member
Andrew Slatter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top