Count and Sort list.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top