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

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
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,590
Messages
6,179,762
Members
452,940
Latest member
rootytrip

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