+ Reply to Thread
Results 1 to 4 of 4

Macro to filter, sort, and then display top 20 rows based on value in particular cell

  1. #1
    Registered User
    Join Date
    02-09-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    92

    Macro to filter, sort, and then display top 20 rows based on value in particular cell

    I have a work sheet called 'Risk Register' with a data range comprising 100 rows, and 36 columns.

    I would like to have a macro that does the following:

    1) Filters the range to show only those with 'Threat' in column C

    2) Of those showing after step 1, filters OUT rows with 'Removed/Passed' in column D

    3) Sorts the range according to values in column Q, with largest at the top

    4) Finally, filters the data range to show only the top 10 values based on column Q (still in ascending order)

    ... I would also like some code that clears the effects of the above macro.

    I have tried doing this myself, and was successful up until point 4. However I fear that successful implementation of point 4 will require a re-think of points 1-3, hence why I'm turning to Excel Forum for help!

    I attach the spreadsheet.

    Many thanks in advance for whoever cracks it!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: Macro to filter, sort, and then display top 20 rows based on value in particular cell

    Hi Shaun,

    The file is password protected...
    Regards
    Parth

    I appreciate your feedback. Hit * if u Like.
    Rules - http://www.excelforum.com/forum-rule...rum-rules.html

  3. #3
    Registered User
    Join Date
    02-09-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro to filter, sort, and then display top 20 rows based on value in particular cell

    Apologies - I knew I'd forgotten something!

    Please find attached version without password protection.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-09-2015
    Location
    London
    MS-Off Ver
    2013
    Posts
    92

    Re: Macro to filter, sort, and then display top 20 rows based on value in particular cell

    Is this not possible?

+ 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. [SOLVED] I have a sort macro. How to add script to preselect rows to sort based on column value?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-09-2014, 02:25 AM
  2. [SOLVED] Macro - Filter Columns and Rows based on cell value
    By Fett2oo5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 04:26 PM
  3. Create macro upon double click cell display filter in new sheet
    By kamalhilmi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2012, 07:40 AM
  4. Auto Filter, Sort and Hide cells based on cell value
    By kal46 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-29-2012, 05:09 PM
  5. Macro to Filter Copy the rows based on input
    By souvick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2011, 02:47 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