+ Reply to Thread
Results 1 to 8 of 8

Top 5 and bottom 5 filter

  1. #1
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Top 5 and bottom 5 filter

    I have a table and would like to quickly filter the top 5 and bottom 5 variances.

    Can a macro help with that?

    Attached file shows original data and the result expected

    Thanks
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Top 5 and bottom 5 filter

    while you undoubtedly could do this with code, (not my strong side), I would use a helper column, with this in, say, C2, copied down...
    =OR(B2<=SMALL($B$2:$B$15,5),B2>=LARGE($B$2:$B$15,5))
    then just filter on TRUE
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Top 5 and bottom 5 filter

    Done with a pivot table.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Re: Top 5 and bottom 5 filter

    Thanks to both on a quick reply.

    Just keen to know how that was done with a pivot?
    I am able to understand that 2 pivots are created but then how is the top and bottom 5 filtered quickly?

  5. #5
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: Top 5 and bottom 5 filter

    If you click on the filter icon and then go into the value filter you'll see the setting for top or bottom 5.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Top 5 and bottom 5 filter

    Try
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    12-22-2014
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    89

    Re: Top 5 and bottom 5 filter

    Thanks all

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Top 5 and bottom 5 filter

    Happy to help and thanks for the feedback

+ 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. VBA Advanced Filter - Two Filters Without Deleting Bottom Filter Data In Same Column Range
    By hysterical.useless in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2017, 02:54 PM
  2. Add Total & Average at Bottom row of ListView And Filter based on criteria
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2015, 03:22 AM
  3. Replies: 1
    Last Post: 04-26-2015, 04:24 AM
  4. Replies: 5
    Last Post: 10-14-2014, 09:47 AM
  5. Excel 2007 [Auto]Filter ignores bottom row of range
    By tbrookes in forum Excel General
    Replies: 2
    Last Post: 12-23-2013, 04:45 PM
  6. Filter to bottom of data
    By Jiptastic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-27-2013, 01:39 PM
  7. [SOLVED] No filter results in bottom left hand corner
    By Natalie in forum Excel General
    Replies: 1
    Last Post: 10-24-2005, 01:05 PM

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