+ Reply to Thread
Results 1 to 2 of 2

Complex Lookups - How to return column number

  1. #1
    Registered User
    Join Date
    09-12-2015
    Location
    Toronto, Ontario
    MS-Off Ver
    13
    Posts
    1

    Exclamation Complex Lookups - How to return column number

    Hi everyone,

    I’m having difficulty managing a large file with many lookups, and cannot create a formula for a specific lookup I need. I have created a similar situation example which is simpler to better understand the problem. I am using 2 separate workbooks (2 separate tables) and trying to lookup a value from one and use it in the other.
    Table 1 is where the raw data is; it is a download/extract from another program and is used by many people and therefore cannot be changed or reformatted for ease of use. It must be used as is. Also note that the blank cells are not actually empty and excel reads them as such, meaning a “ISBLANK” formula will not work for this problem.

    Table 1 looks like this:

    Work 1.png

    The headers describe ingredients in recipes, and numbers in column A represent different recipes. Where it says “Yes” indicates that that ingredient is in the recipe.
    Table 2 looks like this:

    Work 2.png


    This is the working file where the same recipes are listed in column A, but will be in a varying order. As new recipes are created, they will be added and so this must be a continuous file. The headers in this file give a list of grouped ingredients, the same list for 5 columns (a recipe can have a max of 5 of the ingredients in this list, however there are more than 5 ingredients possible). Each recipe needs to indicate which ingredients are in it. In this example, recipe 3 has lemons. If it contained more than this, it would list them in no particular order in 5 cells for that recipe.
    I need a formula which reads the header from Table 1, from the same column as “Yes” for the corresponding recipe. Here, Table 1 says ‘Yes’ under lemons from column E for recipe 3, so Table 2 says lemons under the first available spot for ingredients.
    My approach is this: I created an INDEX MATCH MATCH formula to find the header. I used the entire Table 1 as the array. The row will always be 1 (as the headers will always appear in this row). The column number of the header will match the column number of the work “Yes”, however I cannot seem to make this work. My thought is that I would match the word ‘Yes’ within the recipe number row, and return the column number. Keep in mind, since this is a large file and this same type of sequence occurs many times, it needs to specifically look in columns B-K only, as the work ‘Yes’ will exist elsewhere in the file for that row. Any help would be greatly appreciated !!

    Thanks

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,621

    Re: Complex Lookups - How to return column number

    Attach a sample workbook (pics are nice but useless). 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 use the paperclip icon to open the upload window.

    View Pic

+ 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. [SOLVED] Return a value based on multiple lookups
    By Herr Rommel in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 03-18-2015, 02:36 PM
  2. [SOLVED] Find first negative number in column, return row number
    By slade8200 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-06-2014, 11:14 AM
  3. Multiple Lookups, Return Table Value
    By rutgersed in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-29-2014, 04:18 PM
  4. Replies: 5
    Last Post: 02-13-2014, 05:37 PM
  5. [SOLVED] Return row number of complex matrix values
    By triangulo in forum Excel General
    Replies: 12
    Last Post: 10-30-2013, 08:03 AM
  6. Complex Lookups...
    By eramsva in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-28-2012, 08:48 AM
  7. Replies: 4
    Last Post: 07-18-2012, 08:54 PM

Tags for this Thread

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