+ Reply to Thread
Results 1 to 7 of 7

Search multiple tables for value and return adjacent value

  1. #1
    Registered User
    Join Date
    03-14-2017
    Location
    Liverpool, England
    MS-Off Ver
    2013
    Posts
    9

    Search multiple tables for value and return adjacent value

    I have a number of tables in my workbook on different sheets. I want to search all of these tables for a value and then return the value adjacent/to the right.

    I have used a nested IF statement but it keeps returning value error.

    Unsure which formula is best to use?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,471

    Re: Search multiple tables for value and return adjacent value

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,546

    Re: Search multiple tables for value and return adjacent value

    Attach a sample workbook not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  4. #4
    Registered User
    Join Date
    03-14-2017
    Location
    Liverpool, England
    MS-Off Ver
    2013
    Posts
    9

    Re: Search multiple tables for value and return adjacent value

    The workbook should be self-explanatory. Search tab with the search function and all other tabs containing tables I want to search in.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,546

    Re: Search multiple tables for value and return adjacent value

    Create a named range of your tabs called "Sheets"

    in E7

    =VLOOKUP(D7,INDIRECT("'"&INDEX(Sheets,MATCH(1,--(COUNTIF(INDIRECT("'"&Sheets&"'!$B$5:$C$100"),D7)>0),0))&"'!$b$5:$C$100"),2,FALSE)

    in E14

    =VLOOKUP(D14,INDIRECT("'"&INDEX(Sheets,MATCH(1,--(COUNTIF(INDIRECT("'"&Sheets&"'!$E$5:$F$100"),D14)>0),0))&"'!$E$5:$F$100"),2,FALSE)

    ...both confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-14-2017
    Location
    Liverpool, England
    MS-Off Ver
    2013
    Posts
    9

    Re: Search multiple tables for value and return adjacent value

    I cant seem to get this to work. Even with ctrl,shift+enter.

    Is there an alternative way of doing this? or did you manage to get this to work within the spreadsheet.

    I can get it to search and find using index match but not when adding extra tables into the formula.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,546

    Re: Search multiple tables for value and return adjacent value

    ....but not when adding extra tables into the formula.
    If you mean extra sheets (tabs) then you need to update the named range.

    It would be much easier if all the data was on one sheet: I can see no advantage in having the data on multiple sheets.

+ 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. Search for value in row and return adjacent cell
    By lindseyd32833 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2020, 04:03 PM
  2. Search and If found return adjacent cell [Solved]
    By jpullen88 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-29-2016, 03:49 PM
  3. [SOLVED] Search substring and return adjacent value
    By uberathlete in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-02-2015, 07:06 PM
  4. Search for value, return value in adjacent cell
    By laerm in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 08-13-2013, 01:12 PM
  5. Replies: 14
    Last Post: 06-17-2013, 09:43 AM
  6. Search for specific value in a row, then return content og adjacent cell
    By linaudio in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-20-2013, 09:11 AM
  7. SEARCH MACRO FOR VALUE IN WORKBOOK, RETURN value of adjacent cell.
    By thequiff in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-15-2012, 10:47 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