+ Reply to Thread
Results 1 to 9 of 9

How do i advanced filter rows based on specific data that could in a large range of cells?

  1. #1
    Registered User
    Join Date
    01-01-2020
    Location
    Texas
    MS-Off Ver
    2019
    Posts
    4

    How do i advanced filter rows based on specific data that could in a large range of cells?

    Hi all,

    I'm fairly new to Excel and I've been playing with the advanced filter function and have been trying to understand how I can filter rows based on a specific piece of data being in one of a large range of cells.

    For example, if I list a group of people's 10 favorite restaurants (one person and their favorites in each row), how do i filter rows based on the people who mentioned that restaurant in any one of the 10 columns listing their favorite restaurants? If I have data in 300 columns then how do i filter for people who mentioned a specific restaurant in one of those 300 columns.

    I attached a small sample of data - in this example, how would i copy/filter only the people who listed "Tillie's" somewhere in their responses?

    Cheers!
    Andy
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Hi Andy & Welcome to the Forum,

    Here is one way. In L1 I put the search term.

    In a helper column, Column L >> L3 and down >> =IF(COUNTIF($H3:$K3,"*" & $L$1 & "*"),"Yes","No")

    Now filter on "Yes" from column L
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    01-01-2020
    Location
    Texas
    MS-Off Ver
    2019
    Posts
    4

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Thanks Jeff, this is really useful!

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Here is the macro to move the data to it's own sheet.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-01-2020
    Location
    Texas
    MS-Off Ver
    2019
    Posts
    4

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Thanks! Is it possible for the macro to create a new worksheet each time for each filter (so create 12 worksheets with each individual filtered data set on).
    Thanks for your help with this I spent 10 hours trying to work this out over Christmas!

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Quote Originally Posted by ao747 View Post
    Is it possible for the macro to create a new worksheet each time for each filter (so create 12 worksheets with each individual filtered data set on).
    Certainly, but I'm stepping out right now to spend some time with the grandchildren. I take a look upon my return.

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Hi Andy,

    See how this works out for you. Just change the value in N1 and then press the button.

    We could make this a Worksheet change event off of N1, but would have to make some VBA edits to check for the return of any records and cancel if no records.

    Something to think about.

    Please Login or Register  to view this content.
    Attached Files Attached Files

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

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    If you prefer AdvancedFilter then
    Please Login or Register  to view this content.
    As you change Sheet1!A2, it runs and no need to care about the number of columns.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-01-2020
    Location
    Texas
    MS-Off Ver
    2019
    Posts
    4

    Re: How do i advanced filter rows based on specific data that could in a large range of ce

    Jeff this is fantastic, thank you! It gives me exactly the data that I need. I really appreciate the help, following along in the spreadsheet also helped me see where I was going wrong.

    Thanks again!
    Andy

+ 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. Replies: 3
    Last Post: 12-19-2018, 10:04 AM
  2. 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
  3. Advanced Filter for specific words/phrases within cells
    By dsal24 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-18-2014, 06:33 PM
  4. Replies: 3
    Last Post: 12-06-2013, 07:27 AM
  5. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 PM
  6. Second Advanced Filter does not work based on the data generated from the filter
    By mucc1928 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2011, 02:42 PM
  7. advanced filter macro doesn't work on large data set
    By bullkater in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-02-2009, 08:05 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