+ Reply to Thread
Results 1 to 7 of 7

find value in multiple sheets, copy offset and paste to summary sheet

  1. #1
    Registered User
    Join Date
    10-04-2011
    Location
    INDIANA, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    find value in multiple sheets, copy offset and paste to summary sheet

    ok. there is a list of sample numbers in column G, and results in column I. Every so often we run check values to make sure our instruments are still calibrated. every check value is labeled "LFB" in column G, with a corresponding result in column I. there is a new worksheet in the same workbook for every new day we run our testing.

    I would like to create a macro that will find every LFB we've run on all worksheets in the workbook, copy the corresponding result from column I, and paste it into a column on separate sheet in the workbook named LFBsummary (in my code i have column h to paste results but any will work). I only need this done once, and not a continually updating thing or anything more advanced. Ive read through the forums and used a few codes but they don't seem to return values. It seems simpler to me than the other macro i used for copying fixed values throughout these sheets... but i'm having no luck, any advice/help would be greatly appreciated.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: find value in multiple sheets, copy offset and paste to summary sheet

    Pholic,

    Welcome to the forum! Give the following a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    10-04-2011
    Location
    INDIANA, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: find value in multiple sheets, copy offset and paste to summary sheet

    Thank you very much about the quick response... I tried out the code you gave me but i'm getting an error on the first autofilter line ".Autofilter 1, "LFB""... it's acting as if LFB is a variable that has not been set yet... which seemed to be where my code was failing. I've done some vbs before but not too much with excel and it's errors/operations etc. Thanks again for all the info. - nicholas

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: find value in multiple sheets, copy offset and paste to summary sheet

    Pholic,

    Can you post a sample workbook?

  5. #5
    Registered User
    Join Date
    10-04-2011
    Location
    INDIANA, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: find value in multiple sheets, copy offset and paste to summary sheet

    unfortunately my boss won't let my post a scrubbed example of our data, so i can't help you there... on the other hand i can post the working code that and that may help point you in some direction... whether or not we're moving forward or side to side is your call, haha.


    Please Login or Register  to view this content.
    now this is a bit simpler considering it just copy/paste info in static cells to a summary page vs matching a value and copying an offset, but at this point even capturing the whole row with "LFB" in it would help me create a summary of the data i need much faster than manually going through 1000 worksheets in 20 workbooks... thanks again for all the help, i greatly appreciate it... nothing more frustrating than being so close to the correct code and not knowing enough scripting to polish it off. - nicholas
    Last edited by Pholic; 10-07-2011 at 04:54 PM.

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: find value in multiple sheets, copy offset and paste to summary sheet

    Nicholas,

    The code you posted takes data from several cells on different rows. It also doesn't look for LFB in column G at all, let alone return corresponding values, so I'm not sure if this contradicts your original request. Additionally, what's the error you're getting? The "LFB" is a string value, not a variable, so its definitely not looking for a variable value. If items in column G have text that contains "LFB" instead of equaling "LFB" then you would want to change that to "*LFB*"

    Without a sample workbook however, there's not much more I can do. Attached is an example workbook so you can see how the macro works when it runs successfully. Perhaps I've got the wrong idea of what you need.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-04-2011
    Location
    INDIANA, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: find value in multiple sheets, copy offset and paste to summary sheet

    Yes thank you very much. I'm sorry I haven't had much time to review/mess around with the project lately, it got put on the backburner so to speak. your example works perfectly, altho oddly enough i couldn't copy/use your code, but copying my sheets and putting in your workbook works just as well for me. thank you again for all the help and sorry if i made it confusing at all.

+ 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