+ Reply to Thread
Results 1 to 3 of 3

Look Up Text Value on Multiple Worksheets and Return Adjacent Cell or Cells

  1. #1
    Registered User
    Join Date
    04-14-2015
    Location
    Lincoln, UK
    MS-Off Ver
    2013
    Posts
    37

    Look Up Text Value on Multiple Worksheets and Return Adjacent Cell or Cells

    Hi -

    I am trying to piece hundreds of workbooks (single worksheets in each) into one workbook, so the 'files' become 'worksheets' in effect.

    I have got this working using VBA, and now have 3,000 worksheets in one file. I now need to populate various fields to make a large information table for products and can do this using an index of all the sheet names and =INDIRECT("'"&B6&"'!"&J6) where B6 is the tab (worksheet) name ref and J6 the cell location of the text I require. This is fine where the information is static sheet-to-sheet, but some of the details vary in their cell placement.

    Is there a way to use indirect with either INDEX or VLOOKUP, to say "look in sheet 6, search for the term 'product code' or 'colour' and return the next cell along to the right?'

    I can't get this working and just get #N/A error when using =VLOOKUP($M$3,INDIRECT("'"&B8&"'!$A$2:$A$6"),2) (where M3= 'colour', B8 is sheet ref and A2:A6 location on the sheet where word 'colour' may be?

    I am not sure on the limits of the function or what you can/can't combine with?

    I'd appreiciate any help on this

    Thanks,

    Stuart

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Look Up Text Value on Multiple Worksheets and Return Adjacent Cell or Cells

    3,000 worksheets sounds utterly unmanageable.

    It sounds like it would be better to merge the data from all your source files into one data model, and filter / report against that as required. This would be quite straightforward to automate using Power Query.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    04-14-2015
    Location
    Lincoln, UK
    MS-Off Ver
    2013
    Posts
    37

    Re: Look Up Text Value on Multiple Worksheets and Return Adjacent Cell or Cells

    Solved it - the references such as 'colour' had a colon, so 'colour:', working now!!

    Thanks,

    Stuart

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 08-16-2016, 07:58 AM
  2. [SOLVED] Vba code to find value across multiple worksheets and return adjacent data
    By Flatdown in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-06-2014, 08:44 AM
  3. Replies: 2
    Last Post: 09-07-2013, 07:50 PM
  4. Replies: 6
    Last Post: 03-06-2013, 03:30 PM
  5. [SOLVED] Return top 5 results w/corresponding text from adjacent cells
    By jsmifc in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-21-2013, 07:18 PM
  6. Replies: 1
    Last Post: 08-08-2012, 08:40 PM
  7. Replies: 6
    Last Post: 06-29-2009, 08:43 AM

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