Move Down to Across

Silvermini63

Active Member
Joined
Sep 25, 2006
Messages
293
I have a sheet that has two columns on it. In column one it has customer numbers and in column 2 it has the link name next to it. The customer may have many links therefore multiple entries.

I want to get the links to go across the page instead of going down. Can anyone help with this as there is over 20,000 rows.
Excel Workbook
AB
1CustomerLink
210000Link1
310000Link2
410000Link3
510000Link4
610000Link5
710001Link1
810001Link2
910001Link3
1010002Link1
1110002Link2
1210002Link3
13
Sheet1
Excel 2010
To this
Excel Workbook
ABCDEF
1CustomerLink
210000Link1Link2Link3Link4Link5
310001Link1Link2Link3
410002Link1Link2Link3
Sheet2
Excel 2010
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
This should do it for you:

Code:
Sub TransposeSections()
Dim X, NumBelow As Long
For X = Range("A" & Rows.Count).End(xlUp).Row To 2 Step -1
    If Range("A" & X).Text <> Range("A" & X - 1).Text Then
        Range("B" & X & ":B" & X + NumBelow).Copy
        Range("C" & X).PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
        Range("B" & X).Delete Shift:=xlToLeft
        Rows(X + 1 & ":" & X + NumBelow).Delete
        NumBelow = 0
    Else
        NumBelow = NumBelow + 1
    End If
Next
End Sub

Cheers

Dan
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,790
Members
452,942
Latest member
VijayNewtoExcel

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