+ Reply to Thread
Results 1 to 11 of 11

Look up data from multiple worksheets

  1. #1
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Look up data from multiple worksheets

    I have three worksheets I'm working with. The first worksheet is source data which includes machine name and an adapter name. Each machine name in Column A can be listed multiple times, once for each type of adapter it may have installed.

    In a second worksheet I have specific adapter names I’m searching for. It contains a subset of all the available adapter types that might exist on the first worksheet.

    On the third worksheet, I have just one instance of each machine name in Column A and I’d like to put in Column B of that worksheet which of the adapters it has, as listed on the second worksheet.

    I have included a sample worksheet that describes what I’m hoping to achieve.
    Attached Files Attached Files
    Last edited by JimDandy; 03-13-2013 at 04:05 PM.

  2. #2
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Look up data from multiple worksheets

    Any takers?

  3. #3
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Look up data from multiple worksheets

    Hi JimDandy

    Here is one approach that almost achieves what you require.

    If you really need "No" entries it can be done. However, could there be multiple (looked for) adapters?

    Regards

    Alastair
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Look up data from multiple worksheets

    It is an approach, and I certainly do appreciate the suggestion however I really need to keep the Source pace separate from the Results page. The intention is that I can replace the Source page with new data, change the Adapter list, and the Results page stays intact, changing only as the other two change. This result can be done by sorting the Source page and selecting items with the filter and doesn't really need a formula.

  5. #5
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Look up data from multiple worksheets

    Ok - not a problem.

    Could there ever be more than one entry in the results for any workstation? Do you need the results page to show "No" or can it just be omitted?

    Regards
    Alastair

  6. #6
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Look up data from multiple worksheets

    Sorry, I forgot to answer that question... no, I don't suspect there being any more than one entry found, and if there was, any answer would be good, and the results can be empty.

    Thank you

  7. #7
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Look up data from multiple worksheets

    Hi JimDandy

    I have written a macro that does what you ask.

    To run it press Ctrl+shift+Q

    I have shown the effect of adding a couple of extra adapters onto the Adapters tab

    Hope this is of use

    Regards
    Alastair
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Look up data from multiple worksheets

    This worked well in the example but my full source is 267000 rows, and the Results worksheet has 3200 individual device names. I modified the macro to allow for the size of both worksheets, but I still get an error at the line "wkstn(i, 1) = ActiveCell.Offset(0, -3)" and it seems to stop at about row 7827.

  9. #9
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Look up data from multiple worksheets

    OK so I mis guessed the size of your problem I'm sorry. Alright!

    I have now tested the updated macro on 300,000 lines and it works fine (OK so it gave my little laptop indigestion, but the macro worked)

    If it seizes up your computer, let me know and I can re-do it so it uses less resources.

    Hope this works ok

    Alastair
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    11-17-2004
    MS-Off Ver
    Office 2016
    Posts
    527

    Re: Look up data from multiple worksheets

    Outstanding! Many thanks...this performed exactly as I needed.

  11. #11
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Look up data from multiple worksheets

    Glad to have been of assistance.

    Alastair
    Last edited by aydeegee; 03-19-2013 at 03:24 AM.

+ 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