R
ryan
I'm trying to put together a macro to count and sort lists of URL
addresses by how often they appear. All data is in column "A" with a
header in the 1st row. So far I've used the record tool to get it all
sorted and counted using:
Sub SortCount()
'
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.Subtotal GroupBy:=1, Function:=xlCount,
TotalList:=Array(1), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
End Sub
It's sloppy I know, but I'm new at this. What I need is it to sort the
"groups" in order from largest to smallest after what I have up there
runs. I'd also like to get the count number in column "B" next to the
first cell of each "group" of URLs, (some are only in there once,
others could be in there several hundred times). Any advice would be
greatly appreciated.
addresses by how often they appear. All data is in column "A" with a
header in the 1st row. So far I've used the record tool to get it all
sorted and counted using:
Sub SortCount()
'
Application.CutCopyMode = False
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.Subtotal GroupBy:=1, Function:=xlCount,
TotalList:=Array(1), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
End Sub
It's sloppy I know, but I'm new at this. What I need is it to sort the
"groups" in order from largest to smallest after what I have up there
runs. I'd also like to get the count number in column "B" next to the
first cell of each "group" of URLs, (some are only in there once,
others could be in there several hundred times). Any advice would be
greatly appreciated.