+ Reply to Thread
Results 1 to 8 of 8

Automatically Looking-Up Values on a Tab, finding a match and entering the findings on a

  1. #1
    Registered User
    Join Date
    06-15-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    5

    Automatically Looking-Up Values on a Tab, finding a match and entering the findings on a

    I need help with creating a formula that searches a TABLE on TAB-1, matches the headers there with headers on TAB-2 and then, concatenates the 3 rows below the matching header on TAB-1 in the list format on Tab-2.

    I have attached a worksheet that best illustrates my challenge...

    Although I have tried, I can't seem to find a graceful way of doing this through a formula…
    So, would appreciate any help this Forum could give me with this.
    JPAutomatically looking up Values.xlsx

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    Well, this is hardly a graceful formula, but with your list in a separate sheet starting at A3, you could use this formula in B3:

    =IF(ISNA(MATCH(A3,CHALLENGE!B:B,0)),IF(ISNA(MATCH(A3,CHALLENGE!C:C,0)),INDEX(CHALLENGE!D:D,MATCH(A3,CHALLENGE!D:D,0)+1)&" - "&INDEX(CHALLENGE!D:D,MATCH(A3,CHALLENGE!D:D,0)+2)&" - "&INDEX(CHALLENGE!D:D,MATCH(A3,CHALLENGE!D:D,0)+3),INDEX(CHALLENGE!C:C,MATCH(A3,CHALLENGE!C:C,0)+1)&" - "&INDEX(CHALLENGE!C:C,MATCH(A3,CHALLENGE!C:C,0)+2)&" - "&INDEX(CHALLENGE!C:C,MATCH(A3,CHALLENGE!C:C,0)+3)),INDEX(CHALLENGE!B:B,MATCH(A3,CHALLENGE!B:B,0)+1)&" - "&INDEX(CHALLENGE!B:B,MATCH(A3,CHALLENGE!B:B,0)+2)&" - "&INDEX(CHALLENGE!B:B,MATCH(A3,CHALLENGE!B:B,0)+3))

    Essentially, it says this:

    Please Login or Register  to view this content.
    It assumes that the headers in column A all exist within the table - you will get errors if they are invalid, so you would need to wrap:

    IFERROR( ... ,"")

    around the formula if that is a problem for you. Copy this down, as can be seen in the attached file.

    Hope this helps.

    Pete
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-15-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    Thank you Pete... your solution certainly works well on the example and is much appreciated; as I was beginning to believe this could not be done.
    Now I need to think through how practical it may be to scale-up if the actual Table grows to 40+ headers with possibly a few blanks in-between.
    Sigh... Thank you again for helping me.
    JP

  4. #4
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    write at B17
    =IFERROR(INDEX($B$3:$D$14,(TRUNC((TRUNC(ROW(1:1)-1)/3)+1)-1)*4+1,MOD(ROW(1:1)-1,3)+1),"")
    copy down

    at C17
    =IFERROR(INDEX($B$3:$D$14,(TRUNC((TRUNC(ROW(1:1)-1)/3)+1)-1)*4+2,MOD(ROW(1:1)-1,3))&" - "&INDEX($B$3:$D$14,(TRUNC((TRUNC(ROW(1:1)-1)/3)+1)-1)*4+3,MOD(ROW(1:1)-1,3)+1)&" - "&INDEX($B$3:$D$14,(TRUNC((TRUNC(ROW(1:1)-1)/3)+1)-1)*4+4,MOD(ROW(1:1)-1,3)+1),"")

    copy down

  5. #5
    Registered User
    Join Date
    06-15-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    Thank you Ghozi... wow, that is much simpler and it seems, more practical to "scale-up".
    i am going to invest time to try and understand the step-by-step "spirit" of your formula but... perhaps you can help me fast figure out why the first "Info-1" row under each heading is picking-up the values from the next side row... I think it has to do with either the TRUNC or MOD numbers in the formula but, because I don't yet fully understand what is going on within the formula, I can't really tell...
    Thank you very much for your consideration Ghozi.
    JP

  6. #6
    Registered User
    Join Date
    06-15-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    Hi Ghozi... just wanted to let you know that regarding my earlier comment;
    "why the first "Info-1" row under each heading is picking-up the values from the next side row... I think it has to do with either the TRUNC or MOD numbers in the formula but, because I don't yet fully understand what is going on within the formula, I can't really tell"
    I figured it out... we were missing "+1" in the second formula. :-)
    Now it all works and scales-up perfectly.
    Thanks again for you very good solution.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    Hereby my solution for column A and B
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Registered User
    Join Date
    06-15-2013
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Automatically Looking-Up Values on a Tab, finding a match and entering the findings on

    Hi Oeldere... thank you very much for taking the time and effort to help me figure this out.
    Your consideration is much appreciated.
    I have looked at your approach - which also works - but is in my opinion a bit more complex to scale-up.
    I think Ghozi really came-up with the most elegant way to resolve my challenge... you may want to take a look at his approach for your reference.
    Thank you again Oeldere.
    With best regards... JP

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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