Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort Data for duplicates
I would like some code that will sort my data based on column B. I do not
want to delete the duplicates, just have them togetherfor this macro. I would like a seperate macro just to delte the dups based on column B Thanks. I want to see the steps for future improvement in the code -- Mike B |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort Data for duplicates
Already added to your last post...
Public Sub SortStuff() Dim wks As Worksheet Dim rng As Range Set wks = ActiveSheet Set rng = wks.Cells rng.Sort Key1:=wks.Range("B2"), Order1:=xlAscending, Header:=xlYes Set wks = Nothing Set rng = Nothing End Sub "mike b" wrote: I would like some code that will sort my data based on column B. I do not want to delete the duplicates, just have them togetherfor this macro. I would like a seperate macro just to delte the dups based on column B Thanks. I want to see the steps for future improvement in the code -- Mike B |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sort Data for duplicates
Thanks
"Jim Thomlinson" wrote: Already added to your last post... Public Sub SortStuff() Dim wks As Worksheet Dim rng As Range Set wks = ActiveSheet Set rng = wks.Cells rng.Sort Key1:=wks.Range("B2"), Order1:=xlAscending, Header:=xlYes Set wks = Nothing Set rng = Nothing End Sub "mike b" wrote: I would like some code that will sort my data based on column B. I do not want to delete the duplicates, just have them togetherfor this macro. I would like a seperate macro just to delte the dups based on column B Thanks. I want to see the steps for future improvement in the code -- Mike B |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to sort duplicates? | Excel Worksheet Functions | |||
HOW DO I SORT A COLUMN OF NUMBERS AND HAVE THE DUPLICATES REMOVED | Excel Discussion (Misc queries) | |||
Sort data then delete duplicates | Excel Programming | |||
How do I sort a column of data and have each data row sort accordi | Excel Discussion (Misc queries) | |||
Scanning for Duplicate Data in a Column, Merging Data and Finally Removing All Duplicates...? | Excel Programming |