Results 1 to 5 of 5

Trying to run a macro to sort and remove duplicates from entire sheet

Threaded View

  1. #1
    Registered User
    Join Date
    08-31-2009
    Location
    Edinburgh
    MS-Off Ver
    Excel 2007
    Posts
    2

    Trying to run a macro to sort and remove duplicates from entire sheet

    Hi, currently use this macro (see below) but occasionally I have more rows than 842. I could increase to 10000 and this would work but looking for a more automated macro that will automatically remove duplicates from all rows i.e. a macro that works out all rows.

    Sub copyTab()
    '
    ' copyTab Macro
    '

    '
    Cells.Select
    Selection.Copy
    Sheets("filtered_data").Select
    Range("A1").Select
    ActiveSheet.Paste
    Columns("A:A").Select
    Application.CutCopyMode = False
    ActiveSheet.Range("$A$1:$J$842").RemoveDuplicates Columns:=1, Header:=xlYes
    End Sub
    Last edited by sgmiller; 08-31-2009 at 01:38 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1