+ Reply to Thread
Results 1 to 2 of 2

Removing entries using Selection.Autofilter, but keeping the greatest 100 entries?

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    New York
    MS-Off Ver
    Excel 2013
    Posts
    1

    Removing entries using Selection.Autofilter, but keeping the greatest 100 entries?

    Hi all,

    I've been trawling the archives and I'm at my wits end, so I thought I would post my question. Any and all help would be appreciated!

    My problem is thus:

    I have a large table with > 100,000 points, and many, many instances of these tables, but thankfully each datapoint is clearly classified with unique labels. Here's a small, truncated example of what my table looks like:

    # Type Value
    1 A 7
    2 A 10
    3 B 2
    4 C 8
    4 C 5

    Imagine that there are lots more values, but you get the idea - clearly labeled entries that each have a value associated with them. I want to be able to remove all instances of A and C, BUT, of those instances of A and C, I want to keep the greatest 100 values.

    So far I have something like below, where I can get rid of all instances of A/C, but I can't figure out how where to add the code to keep only the greatest 100 values of A/C.

    Please Login or Register  to view this content.
    Thanks so much for any help you might be able to give!

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Removing entries using Selection.Autofilter, but keeping the greatest 100 entries?

    Hi artenry,

    Nice code, easy to understand.

    You may want to try the following:
    a. Sort field 2 in descending order with AutoFilter
    b. Start the deletion as row 102.

    Lewis

+ 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. Removing/keeping duplicate entries
    By erlendee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2014, 01:32 AM
  2. [SOLVED] Read entries-locate entries and print entries
    By akotronis in forum Excel General
    Replies: 4
    Last Post: 05-01-2012, 03:05 PM
  3. Removing tied entries
    By Johnmus in forum Excel General
    Replies: 4
    Last Post: 12-02-2011, 06:13 PM
  4. Removing repeat entries in a long column of data entries
    By kaizhong1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-15-2010, 01:31 PM
  5. Removing duplicate entries.
    By dh01uk in forum Excel General
    Replies: 2
    Last Post: 01-13-2006, 11:55 AM

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