Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default macro to delete duplicate rows using Filter

I am trying to create a macro to delete the duplicate rows in a sheet using
the Filter Unique Records Function. The following is the macro I have tried.
I keep getting an error at "ActiveSheet.Paste".

The duplicate data will not always be in side-by-side rows, and I cannot
sort the data without loosing the original order of the data.

Cells.Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Selection.ClearContents
ActiveSheet.Paste
Application.CommandBars("Task Pane").Visible = False
Range("A1").Select


I would really appreciate any suggestions.

Thanks,

Lost In Alabama
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default macro to delete duplicate rows using Filter

Yo get an aeeror on ActiveSheet.Paste because there is nothing to Paste!

HTH
--
AP

"Lost in Alabama" a écrit dans le
message de ...
I am trying to create a macro to delete the duplicate rows in a sheet

using
the Filter Unique Records Function. The following is the macro I have

tried.
I keep getting an error at "ActiveSheet.Paste".

The duplicate data will not always be in side-by-side rows, and I cannot
sort the data without loosing the original order of the data.

Cells.Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Selection.ClearContents
ActiveSheet.Paste
Application.CommandBars("Task Pane").Visible = False
Range("A1").Select


I would really appreciate any suggestions.

Thanks,

Lost In Alabama



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default macro to delete duplicate rows using Filter

So how do I select the copied sheet in the Clipboard...I have tried this, but
still get an error:

Cells.Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Selection.ClearContents
Application.CommandBars("Task Pane").Visible = True
ActiveSheet.Paste
Application.CommandBars("Task Pane").Visible = False
Range("A1").Select


"Ardus Petus" wrote:

Yo get an aeeror on ActiveSheet.Paste because there is nothing to Paste!

HTH
--
AP

"Lost in Alabama" a écrit dans le
message de ...
I am trying to create a macro to delete the duplicate rows in a sheet

using
the Filter Unique Records Function. The following is the macro I have

tried.
I keep getting an error at "ActiveSheet.Paste".

The duplicate data will not always be in side-by-side rows, and I cannot
sort the data without loosing the original order of the data.

Cells.Select
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Selection.ClearContents
ActiveSheet.Paste
Application.CommandBars("Task Pane").Visible = False
Range("A1").Select


I would really appreciate any suggestions.

Thanks,

Lost In Alabama




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
delete duplicate rows, keep one Wasdell Excel Discussion (Misc queries) 1 October 30th 09 12:16 PM
Delete Duplicate Rows Macro Question elfmajesty Excel Discussion (Misc queries) 1 June 17th 06 01:12 AM
Macro to copy duplicate rows (not delete) [email protected] Excel Programming 1 April 19th 05 12:30 PM
Macro to delete duplicate/triplicate rows Ken Wright Excel Programming 0 August 11th 03 05:50 PM
Macro to delete duplicate/triplicate rows Tom Ogilvy Excel Programming 0 August 11th 03 05:47 PM


All times are GMT +1. The time now is 09:12 PM.

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"