List in lines to Columns

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
:rofl: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


...​
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]NAME1[/TD]
[TD="align: center"]NAME1[/TD]
[TD="align: center"]AGE1[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]AGE1[/TD]
[TD="align: center"]NAME2[/TD]
[TD="align: center"]AGE2[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]NAME2[/TD]
[TD="align: center"]NAME3[/TD]
[TD="align: center"]AGE3[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]AGE2[/TD]
[TD="align: center"]...[/TD]
[TD="align: center"]...[/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]NAME3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: center"]AGE3[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: center"]....[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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,223,790
Messages
6,174,600
Members
452,574
Latest member
hang_and_bang

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