+ Reply to Thread
Results 1 to 43 of 43

Filter Top 10 in already filtered data

  1. #1
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Filter Top 10 in already filtered data

    I am attaching file named Filter top ten records.xlsx in which for example if I filter the item 801 in column L and then want to filter column K amounts, lets assume top 10 amount how can I achieve this. Because when I try in column K number filters > top 10 it filters whole range and shows fewer results for item 801.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    I'm not very familiar with Advanced filter.... so, this is what I would do:

    =AND(L2=801,K2>=LARGE(IF($L$2:$L$81=801,$K$2:$K$81),10))

    If you're still using Excel 2007, this is an array formula and must be set with CTRL-SHIFT-ENTER, before copying down. Then filter by TRUE.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    If you have Excel 2010+ there are non-array alternatives.

  4. #4
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,311

    Re: Filter Top 10 in already filtered data

    Or maybe you can use a pivottable.
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  5. #5
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234
    Quote Originally Posted by popipipo View Post
    Or maybe you can use a pivottable.
    Pivot table can not be convenient in my case. I want this for printing purpose and actual data does have many other information also.
    Last edited by KRIXXXX; 01-08-2023 at 12:30 PM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    And the solution at Post 2??

  7. #7
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234
    Quote Originally Posted by Glenn Kennedy View Post
    And the solution at Post 2??
    Yes, It's. But I fear about adding extra column and then need to exclude that area from printing area. So It would be more convenient if you can provide the filter solution.

  8. #8
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,469

    Re: Filter Top 10 in already filtered data

    You want conditional formatting, this post has been deleted
    Last edited by wk9128; 01-15-2023 at 08:41 PM.

  9. #9
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Filter Top 10 in already filtered data

    Use Glenn's formula as a conditional formatting formula in K column and set it with fill color, then filter using Filter by Color.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    That's a good idea... especially wrapped in NOT

    =NOT(AND($L2=801,$K2>=LARGE(IF($L$2:$L$81=801,$K$2:$K$81),10)))

    then filter the cells with no fill.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    @Glenn Kennedy
    Thank You for the effective and quick solution as always.

    @josephteh
    Thanks for the valuable suggestion.

  12. #12
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Formula provided in post #2 and #10 works perfectly in conditional formatting with my MS Excel 2007 of Home computer and Workplace computer but When I close the worksheet and reopen, it does not act like it should be. To got the results as earlier, I have to clear previous conditional formatting rule and then re-enter it again to got the expected result. Please suggest the solution.
    Last edited by KRIXXXX; 01-15-2023 at 12:03 PM.

  13. #13
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by Glenn Kennedy View Post
    That's a good idea... especially wrapped in NOT

    =NOT(AND($L2=801,$K2>=LARGE(IF($L$2:$L$81=801,$K$2:$K$81),10)))

    then filter the cells with no fill.
    Formula provided in post #2 and #10 works perfectly in conditional formatting with my MS Excel 2007 of Home computer and Workplace computer but When I close the worksheet and reopen, it does not act like it should be. To got the results as earlier, I have to clear previous conditional formatting rule and then re-enter it again to got the expected result. Please suggest the solution.

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    I may have (I did...) attach the wrong file. Try this one...
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by Glenn Kennedy View Post
    I may have (I did...) attach the wrong file. Try this one...
    Sorry, but the issue mentioned in post #13 still remains

    Is there any issue with my MS Excel 2007?
    Last edited by KRIXXXX; 01-17-2023 at 12:19 PM.

  16. #16
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Or because this formula is array formula, that's why I have to clear previous rule and apply the same rule again when I close and reopen the file.
    Kindly reply...
    Last edited by KRIXXXX; 01-18-2023 at 10:53 PM.

  17. #17
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by Glenn Kennedy View Post
    I may have (I did...) attach the wrong file. Try this one...
    Sir,
    Kindly look into the issue.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    I have not used Excel 2007 for many years.

    As far as I know, there is no reason why the original:
    =NOT(AND($L2=801,$K2>=LARGE(IF($L$2:$L$81=801,$K$2:$K$81),10)))

    should not work. I suppose you could also try:

    =AND($L2=801,$K2>=LARGE(IF($L$2:$L$81=801,$K$2:$K$81,""),10))

    and filter by colour.


    Have you got calculation options set to manual, by any chance?
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Sorry Sir,
    I have used both formula provided by you in conditional formatting but issue mentioned in post #13 still remains.

    And Yes, Calculation option in my excel is automatic, so there's no issue there.

    I feel Conditional formatting is the best option for my query, Kindly solve the issue.

  20. #20
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    Does it work in my file?

    Does it fail only in your file?

    If so, post your file.

    Otherwise, I do not know what to do next. Over to others.

  21. #21
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    I have tried with all files provided by you including last one, issue remains same with all.

    Either I have to clear the previous rule and reapply it again or I have to right click on any cell which contains conditional formatting then > manage rule > edit rule > then ok and apply again but this is cumbersome process

  22. #22
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    No idea. I'm out.

  23. #23
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Please someone provide the solution of the query

  24. #24
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by josephteh View Post
    Use Glenn's formula as a conditional formatting formula in K column and set it with fill color, then filter using Filter by Color.
    Can you please provide the solution

  25. #25
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Filter Top 10 in already filtered data

    Please attach your problem workbook.

  26. #26
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Issue remains same as mentioned in post #13, #21 with all files whether it is my original first attachment file post #1 or all files provided as solution here.
    Attached Files Attached Files

  27. #27
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Filter Top 10 in already filtered data

    Your attached workbook seems to be working well as you did manage to filter the top 10 colored cell. What's the issue here?

    Same as Glenn, I have no Excel 2007 and am unable to see your problem.

  28. #28
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    That's the problem that these workbooks works fine with never version of office but not working as it should be in my office 2007.
    So it would be really helpful if someone can provide solution

  29. #29
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,069

    Re: Filter Top 10 in already filtered data

    Is Excel 2007 able to filter by color?

  30. #30
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Only first time when I open the file. After closing the file and after that when I reopen file it doesn't show colours because conditional formatting don't work at that time. I have to use the method explain in post #21

  31. #31
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by josephteh View Post
    Is Excel 2007 able to filter by color?
    In general Yes with all other files it does. I request you to please read all posts of this thread, so you can understand the problem clearly.
    But I think the provided formula may be heavy for excel 2007

  32. #32
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,132

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by KRIXXXX View Post
    But I think the provided formula may be heavy for excel 2007
    .

    That is not the case. The formula is very simple. Something else is interfering, but I do not know what!!

    Can you reinstall Excel? Don't do so, yet... but have you got the installation discs... just in case??

  33. #33
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    I am already using different Conditional formatting in many other workbooks and It works fine with them. Reinstalling may not be needed since this issue is not with my home computer only but same issue is with my workplace pc also.

  34. #34
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,259

    Re: Filter Top 10 in already filtered data

    You should be able to do it directly with an advanced filter as in the attached version.
    Attached Files Attached Files
    Remember what the dormouse said
    Feed your head

  35. #35
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    This works but I am attaching the sheet which is same as the sheet with whom I have to work. Here I have to also mention that in original sheet there are around 2K to 12K records with whom I have to work with.
    I am attaching the original sheet in which I have to filter the top N number of data. There are two possible scenarios with whom I have to work with.
    (1) filtering data of column N and then filter top N number of records in column K. for example in column N we filter 77701 and then want to filter top 15 number of records in column K.
    (2) filtering data of column N and column G and then filter top N number of records in column K. for example in column N we filter 77701 and in column G filter B1 and then want to filter top 15 number of records in column K.

  36. #36
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,259

    Re: Filter Top 10 in already filtered data

    Like this? You just need to reapply the filter if you change any of the input values in the criteria range.

  37. #37
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    It works really well,
    But I have some doubts
    1. is it mandatory to add extra two rows at top?. Isn’t it possible to put the formula in first row of my original file, without occupying extra column or row. I mean it will be really helpful if it can be done within the range of original files cell A1 to cell P!.
    2. do advance filter works only if criteria range contains heading else not.

  38. #38
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,259

    Re: Filter Top 10 in already filtered data

    You have to have header cells, so you can't have the criteria in the first row. You could put them to the right of your data set.

  39. #39
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by rorya View Post
    You have to have header cells, so you can't have the criteria in the first row. You could put them to the right of your data set.
    Is it possible to use the criteria in another sheet ?

  40. #40
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,259

    Re: Filter Top 10 in already filtered data

    Yes, you can do that.

  41. #41
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Quote Originally Posted by rorya View Post
    Yes, you can do that.
    I have tried but not working, Can you please help with it.

  42. #42
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,259

    Re: Filter Top 10 in already filtered data

    What are you stuck on? Just cut and paste the criteria cells to another sheet.

  43. #43
    Forum Contributor
    Join Date
    04-08-2020
    Location
    MUMBAI
    MS-Off Ver
    OFFICE 2007
    Posts
    234

    Re: Filter Top 10 in already filtered data

    Okay, Thanks

+ 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. Excel VBA use userform to filter data and copy filtered data to new sheet
    By reiiling in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2018, 09:36 AM
  2. [SOLVED] Want to Show Filtered data in Listbox with Tickbox Option to Filter data
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2017, 11:55 AM
  3. [SOLVED] Want to Show Filtered data in Listbox with Tickbox Option to Filter data
    By HaroonSid in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-04-2017, 05:49 AM
  4. [SOLVED] Help Needed: Getting 'Filtered' data using filter value from a cell.
    By chaitreya in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-20-2014, 03:18 AM
  5. Macro that can filter excel data and copy the filtered data to another worksheet
    By glide2131 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2013, 02:43 PM
  6. Filter top 10 of filtered data
    By heinecorp in forum Excel General
    Replies: 2
    Last Post: 04-21-2013, 03:49 PM
  7. Need a macro to filter data then email filtered data through lotus notes (or print)
    By Crimson Bourne in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2012, 01:26 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