+ Reply to Thread
Results 1 to 6 of 6

Filter Worksheet then remove duplicates

  1. #1
    Registered User
    Join Date
    11-01-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Filter Worksheet then remove duplicates

    I am not good enough to write the code to do this. I tried "record Macro" but this wouldn't work (it exceeded memory?).

    The worksheet has multiple columns (fixed number) and unkown number of rows (data is imported). the 1st row is a header with autofilter on.

    First,
    I want to make the autofilter select the rows. Then delete the rows meeting that criteria. This is what I get from "record macro";

    ActiveSheet.Range("$A$1:$AP$447").AutoFilter Field:=42, Criteria1:= _
    "=Documents Printed", Operator:=xlOr, Criteria2:="=Planned"

    But I the range needs to be selected based on the number of rows (changing each day).

    Secondly,
    After the data is filtered, I want to remove duplicates based on a single column.
    I can do this manually but don't know how to write it into code for the macro.

    I really appreciate any help.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Filter Worksheet then remove duplicates

    Maybe after your filter:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Filter Worksheet then remove duplicates

    Advanced filter with unique values Excel's function could do.

  4. #4
    Registered User
    Join Date
    11-01-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filter Worksheet then remove duplicates

    xladept,
    Thanks, this worked well.

  5. #5
    Registered User
    Join Date
    11-01-2013
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Filter Worksheet then remove duplicates

    AB33,
    Thanks for looking at this for me.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Filter Worksheet then remove duplicates

    Hi Larry,

    You're welcome and thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Remove Duplicates from Advanced Filter Results
    By joedrummer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2013, 11:56 AM
  2. Replies: 1
    Last Post: 10-23-2012, 09:12 AM
  3. Replies: 5
    Last Post: 02-28-2012, 02:52 PM
  4. Replies: 2
    Last Post: 03-20-2011, 11:19 AM
  5. Remove duplicates, filter by smallest value
    By bg000331 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-19-2008, 07:51 PM

Tags for this Thread

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