+ Reply to Thread
Results 1 to 7 of 7

Search multiple worksheets for keyword and return all rows with that keyword to new sheet

  1. #1
    Registered User
    Join Date
    10-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question Search multiple worksheets for keyword and return all rows with that keyword to new sheet

    I know there are 100+ scripts out there for searching, but I have not found one that can search all worksheets for a keyword and bring all rows containing that keyword onto a new worksheet. If the term is in multiple instances within a row it should still only bring that row into the new worksheet once. However, multiple instances within a column should be sure to bring each row containing that keyword into the new sheet.

    Style points if the new worksheet is titled the name of the search term such that running multiple searches keeps things organized.
    Also style points for an 'exact' checkbox option that looks for the keyword as a stand-alone word as entered vs. looking for the search term buried within words. Ie. with box unchecked 'ham' returns rows with 'Birmingham'
    Even more style points for color-coding the search term within the new worksheet.

    If I've missed this (I've spent quite a few hours looking) please point me in the right direction. If you can help with a script, kudos and I imagine others would reference this in the future also.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Search multiple worksheets for keyword and return all rows with that keyword to new sh

    Try this - should do everything except the colours

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    10-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search multiple worksheets for keyword and return all rows with that keyword to new sh

    Martin - thanks - this is slick.

  4. #4
    Registered User
    Join Date
    10-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search multiple worksheets for keyword and return all rows with that keyword to new sh

    I've been using this a bit more lately and with a larger workbook (36 worksheets) and have found that the results it returns are incomplete. I wish I could give you more specifics, but I haven't figured out why it chooses to skip certain rows. Running a manual CTRL+F find will find hundreds more unique instances than this script does, but it is a nightmare to try to consolidate those finds without the script. Any help would be much appreciated.

  5. #5
    Registered User
    Join Date
    10-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search multiple worksheets for keyword and return all rows with that keyword to new sh

    Ah ha - more details, it looks like the script stops searching any given worksheet as soon as it gets a hit, limiting the find capability to only one hit per worksheet. Is there any easy fix?

  6. #6
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Search multiple worksheets for keyword and return all rows with that keyword to new sh

    Having a copy of your workbook and search terms would be useful in working out what is going on.

  7. #7
    Registered User
    Join Date
    10-07-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search multiple worksheets for keyword and return all rows with that keyword to new sh

    Quote Originally Posted by mrice View Post
    Having a copy of your workbook and search terms would be useful in working out what is going on.
    Afraid I can't do that. Database contains sensitive data that would not be easy to mask. I will see if I can build a mockup

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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