+ Reply to Thread
Results 1 to 8 of 8

Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

  1. #1
    Registered User
    Join Date
    07-13-2018
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    3

    Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Hi all,

    I'm struggling to solve the following, struggle a bit and would be glad for your help:




    I've got a Table with data as below (sorry. not allowed to post links or pictures or attachements):

    Please Login or Register  to view this content.
    Objective:
    • Lookup from a table
    • For a given ID (from a fixed column) and determine Row
    • Look up from cultiple Categories (Cat1 to Cat10) the Value where the Name matches "Money in $"

    I know how to get the value for a given row with INDEX and MATCH:
    Please Login or Register  to view this content.
    How can I make this happen (ideally in one expression without helper cells) to Make that expression finf the right row machtig an ID e.g. 12345 and does the Match-Category on that row?

    Thanks a lot in advance

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,774

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Yes, you ARE allowed to post attachments!

    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.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    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,662

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Oh dear... Your description is not very helpful.

    I have mocked up something that MIGHT be close to what you want...
    Attached Files Attached Files
    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

  4. #4
    Registered User
    Join Date
    07-13-2018
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Thanks for your very quick answers. Didn't expect that. Thanks

    Sorry for my crude explanation.

    Thanks a lot Glenn: Thats close, but I seek to identify the row based on a ID given (you did). Then I see to understand in that row the colum Matching a "Money in $". Finally I want to return the value of the field next to the field matching "Money in $" (offset) containing the actual Value in $.

    Pls see attached.

    Thanks to AliGW for the explanantion on the Attachments
    Attached Files Attached Files
    Last edited by RRJBE; 07-13-2018 at 08:23 AM. Reason: Typos and explanation

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Try this in C9:

    =IFERROR(INDEX(2:4,MATCH(B9,A2:A4,0),1/(1/(MIN(IF((A2:A4=B9)*(C2:L4="Money in $"),COLUMN(C2:L4)))))+1),"No Match") Ctrl Shift Enter

  6. #6
    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,662

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Nice one 63FD. The use of 1/(1/....) was pivotal...
    Last edited by Glenn Kennedy; 07-13-2018 at 08:55 AM.

  7. #7
    Registered User
    Join Date
    07-13-2018
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    3

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Quote Originally Posted by 63falcondude View Post
    =IFERROR(INDEX(2:4,MATCH(B9,A2:A4,0),1/(1/(MIN(IF((A2:A4=B9)*(C2:L4="Money in $"),COLUMN(C2:L4)))))+1),"No Match") Ctrl Shift Enter
    Thanks big times! Works like charm.

    I need to digest that not being that savvy in Excel Arrays. Probalby could do with some high level explanantion, especially on what the 1/(1/ is and what it is doing. What would be the subjcet I look for in the internet to learn more about!

    Again, thanks do much. You nailed it! And not to forget about Glenn! thanks to both of you. (The speed at which you did is almost embarrassing to me :-))

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Match a Row and then return a value from a match in the Row. (INDEX-MATCH-MATCH?)

    Happy to help. Thanks for the rep guys!

    The MIN(IF part of the formula returns the column number that "Money in $" is found in.

    For example, when B9=23456, =MIN(IF((A2:A4=B9)*(C2:L4="Money in $"),COLUMN(C2:L4))) returns 7. "Money in $" is found in column G, which is the 7th column.

    The 1/1/ part of the formula was put into place for instances where B9 is not found in A2:A4.
    For example, when B9=34567, =MIN(IF((A2:A4=B9)*(C2:L4="Money in $"),COLUMN(C2:L4))) returns 0.
    The 1/1/ is there to create an error when the MIN(IF part returns 0 and return the column number whenever it is not 0.

    For instance, when it returns 7 we have 1/(1/7) which is 7. When it returns 0 we have 1/(1/0) which returns a #DIV/0! error.

    The #DIV/0! error will make the entire formula return an error, which is what we want when the MIN(IF part is 0.
    Now the IFERROR part of the formula returns "No Match" instead of displaying the error.

+ 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. Return Multiple Match Values in Excel Using INDEX-MATCH
    By chris1089 in forum Excel General
    Replies: 10
    Last Post: 06-15-2017, 09:25 AM
  2. Replies: 5
    Last Post: 02-18-2017, 11:21 AM
  3. Replies: 5
    Last Post: 10-16-2016, 02:33 AM
  4. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  5. [SOLVED] Combining 3 Formulas: Return all Names that Match Criteria Using Index/Match
    By bchilme in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 09-29-2014, 09:28 AM
  6. Replies: 3
    Last Post: 05-08-2013, 02:10 PM
  7. Replies: 5
    Last Post: 02-29-2012, 08:51 PM

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