+ Reply to Thread
Results 1 to 5 of 5

Search multiple sheets for criteria and paste all matched rows in new sheet

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Search multiple sheets for criteria and paste all matched rows in new sheet

    Multi-sheet workbook. Need macro to prompt user for criteria that will be found in column A (Franchise Number) on all sheets, copy the rows where that criteria is met and paste into new sheet.

    See dummy example file attached. The same file only has two sheets with a Results sheets.
    Attached Files Attached Files

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Search multiple sheets for criteria and paste all matched rows in new sheet

    see attached file
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-23-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search multiple sheets for criteria and paste all matched rows in new sheet

    nilem,

    What you created is awesome - however, when I look for the criteria F1100, it returns nothing. Also, how will it work with additional sheets, all have the same first column for lookup, but they have different columns of information that they could return. For example:
    Sheet one might have columns: Franchise No., FIrst Name, Last Name, Company Name
    Sheet two: Franchise No., Purchase Date, Settle Date, Amount
    Sheet three: FN (is the same thing as other sheets but abbreviation used), Stock Amt., Purchase Date, Settlement Date

    Does that make sense? In essence, column A is the criteria column, but each sheet will ahve varying data to return once it finds that criteria in column A. So the results sheet ends up being like a report for that one Franchise Number.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Search multiple sheets for criteria and paste all matched rows in new sheet

    I used the F1100 as a criterion, and the code gave me 27 lines with "F1100".
    The macro will work with any number of sheets added.
    Do you want the result as a single column? It would be better if you show the desired result in the file.

  5. #5
    Registered User
    Join Date
    07-23-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Search multiple sheets for criteria and paste all matched rows in new sheet

    Youn are correct! Great job. Thanks so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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