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

#### Pontos

##### Board Regular
Hi.

I have table like this:
 A B 184 1204 184 1205 184 1308 184 6412 964 1204 964 2541 964 3413 964 4151 1075 3115 1075 3245 1075 3697 1075 4105 1075 5189

<tbody>
</tbody>

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

 A B C D E F 184 1024 1025 1308 6412 964 1204 2541 3413 4151 1075 3115 3245 3697 4105 5189

<tbody>
</tbody>

Thanks.

### Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

#### NeonRedSharpie

##### Well-known Member
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.

#### Pontos

##### Board Regular
Thanks - it works great!

Replies
9
Views
744
Replies
3
Views
596
Replies
2
Views
120
Replies
0
Views
423
Replies
1
Views
501

1,195,619
Messages
6,010,733
Members
441,567
Latest member
Flitbee

### 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.

### Which adblocker are you using?

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

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