Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to sort duplicates? J.Scargill[_2_] Excel Worksheet Functions 0 March 23rd 10 11:55 AM
HOW DO I SORT A COLUMN OF NUMBERS AND HAVE THE DUPLICATES REMOVED Jeff Excel Discussion (Misc queries) 2 August 29th 06 08:38 PM
Sort data then delete duplicates mike b Excel Programming 8 April 15th 05 07:57 PM
How do I sort a column of data and have each data row sort accordi Oedalis Excel Discussion (Misc queries) 1 March 17th 05 11:52 PM
Scanning for Duplicate Data in a Column, Merging Data and Finally Removing All Duplicates...? : VB : Excel Programming 2 August 24th 03 02:22 PM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"