+ Reply to Thread
Results 1 to 9 of 9

How to search for text across multiple worksheets and copy rows?

  1. #1
    Registered User
    Join Date
    04-17-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    7

    How to search for text across multiple worksheets and copy rows?

    I would like to search for text across multiple worksheets and summarize the entire row in one worksheet. In my example, I am looking to find all instances where the words "change order" appears, and then copy the entire row into the "Summary" tab so that I can sum the change orders. The attached example is a simplified version, and the actual spreadsheet contains at least 50 different worksheets with various titles.

    Any help would be greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: How to search for text across multiple worksheets and copy rows?

    Like this?
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-17-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to search for text across multiple worksheets and copy rows?

    That worked like it should have, but I guess my example was too simplistic because it didnt work in the actual spreadsheet I wanted it to. Here is an exerpt of the actual spreadsheet I am dealing with. To make things more interesting, is there a way to put out to the side of each change order the worksheet that it came from?

    Thank you for your help!
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: How to search for text across multiple worksheets and copy rows?

    Try this:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-17-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How to search for text across multiple worksheets and copy rows?

    Wow that worked like a charm! You probably just saved me hours of tedious work. Thank you!

  6. #6
    Registered User
    Join Date
    08-10-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: How to search for text across multiple worksheets and copy rows?

    Actually this helped too just had to modify and do some research about the script. Though I am not a pro.

  7. #7
    Registered User
    Join Date
    01-02-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to search for text across multiple worksheets and copy rows?

    I am looking at doing something quite similar to what the initial question was asking. The macro provided works for what I am trying to do, with two exceptions:

    First; instead of looking for "change order", I am looking for either "Low Outlier" or "High Outlier". These two will be the result of the following formula:

    =IF(O21="","",IF(O21<VLOOKUP("Low Outlier Cost",A:B,2,FALSE),"Low Outlier",IF(O21>VLOOKUP("High Outlier Cost",A:B,2,FALSE),"High Outlier","")))

    The macro does not seem to recognize the result of this formula. If I copy the result and paste it as a value, however, then the macro recognizes it and performs the appropriate functions. Do I have to copy and paste all the results of above formula as values for this to work or is there a way around it? I have almost 100 worksheets in the document so it would be quite a mess to have to go through the whole thing.

    Second; when the macro copies the various fields to the summary page, it copies the forumlas and not values. Therefore the results show up as #REF instead of the values of the cells. How do I change the macro to only pasting values and not formulas?

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to search for text across multiple worksheets and copy rows?

    zajro,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  9. #9
    Registered User
    Join Date
    01-02-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How to search for text across multiple worksheets and copy rows?

    arlu1201,

    Sorry about that.

+ 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