Same values in cells --> show them as values in columns

Pontos

Board Regular
Joined
Mar 26, 2003
Messages
132
Hi.

I have table like this:
AB
1841204
1841205
1841308
1846412
9641204
9642541
9643413
9644151
10753115
10753245
10753697
10754105
10755189

<tbody>
</tbody>

And I want to transformed with a formula to form like this:

ABCDEF
1841024102513086412
9641204254134134151
107531153245369741055189

<tbody>
</tbody>

Thanks.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Code:
Sub IWriteThisMacroEveryWeek()


Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual


    Dim nextRow As Integer
    Dim startRow As Integer
    Dim endRow As Long
    
    nextCol = 4
    startRow = 2
    nextRow = startRow - 1
    endRow = Cells(Rows.Count, "A").End(xlUp).Row


    For x = startRow To endRow Step 1
    
        If Cells(x, 1) <> Cells(x - 1, 1) Then
            nextRow = nextRow + 1
            nextCol = 4
            Cells(nextRow, 3) = Cells(x, 1)
        End If
        
        Cells(nextRow, nextCol) = Cells(x, 2)
        nextCol = nextCol + 1
    Next x
    
    Columns(1).Delete
    Columns(1).Delete
    
Application.ScreenUpdating = True
Application.EnableEvents = True
Application.Calculation = xlCalculationAutomatic
    
End Sub


This will delete the data in column A:B. MAKE SURE YOU HAVE A COPY BEFORE RUNNING THIS MACRO.
 
Upvote 0

Forum statistics

Threads
1,222,017
Messages
6,163,401
Members
451,835
Latest member
kristianb63

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