+ Reply to Thread
Results 1 to 11 of 11

INDEX MATCH as arrayfunction using MAX and PRODUCT

  1. #1
    Registered User
    Join Date
    11-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    17

    INDEX MATCH as arrayfunction using MAX and PRODUCT

    EDIT: I wrote MAX in the Heading incorrectly although the syntax should be the same I guess...

    Hello,

    I want to know which of the Y's that give the minimum value for the product between table 1 and 2. I.e. I want cell B2 to give me Y1, B3 to give me Y2, B4 to give me Y1 and B5 to give me Y3. My last try for a formula was
    Please Login or Register  to view this content.
    .

    Please help!

    PrintScreen till ExcelForum.JPG
    Last edited by Sherk; 10-06-2016 at 08:48 AM. Reason: Heading is wrong MAX should be MIN

  2. #2
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Hi Sherk,

    If I'm understanding your query correctly try this in cell B2. This will return the values from the corresponding table.

    =VLOOKUP(A2,$G$2:$J$5,MATCH(1,C2:E2,0)+1)

    To return the text reference use:

    =INDEX($C$9:$E$9,MATCH(1,C10:E10,0))

    Regards,

    Snook
    Last edited by The_Snook; 10-06-2016 at 05:36 AM.

  3. #3
    Registered User
    Join Date
    11-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Quote Originally Posted by The_Snook View Post
    Hi Sherk,

    If I'm understanding your query correctly try this in cell B2. This will return the values from the corresponding table.

    =VLOOKUP(A2,$G$2:$J$5,MATCH(1,C2:E2,0)+1)

    To return the text reference use:

    =INDEX($C$9:$E$9,MATCH(1,C10:E10,0))

    Regards,

    Snook
    I think you've misunderstood my question as you're not doing a looking up the minimum or doing any multiplication of the tables...

    Br,
    Sherk

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Hi,

    An array formula
    =INDEX($H$1:$J$1;MATCH(MIN(H2:J2*C2:E2);H2:J2*C2:E2;0))

    I feel that posting a workbook would have been more helpful than a picture.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Registered User
    Join Date
    11-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Quote Originally Posted by xlnitwit View Post
    Hi,

    An array formula
    =INDEX($H$1:$J$1;MATCH(MIN(H2:J2*C2:E2);H2:J2*C2:E2;0))

    I feel that posting a workbook would have been more helpful than a picture.
    Thanks for the reply and although it's closer to the mark than the previous answer it's not quite enough as the tables don't correspond row by row, some sort of IF needs to be used I think.

    Sure, here's a workbook where I think the need for an IF-statement is more obvious!

    Br,
    Sherk
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Try this as an array formula (it's xlnitwit's solution with a slight tweak):

    =INDEX($H$1:$J$1,MATCH(MIN(H2:J2*C2:E2),H2:J2*C2:E2,0))

    Edit: I've just thought, this isn't quite the final solution because presumably we need to factor in the match from column A as well?
    Last edited by The_Snook; 10-06-2016 at 08:16 AM.

  7. #7
    Registered User
    Join Date
    11-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Quote Originally Posted by The_Snook View Post
    Try this as an array formula (it's xlnitwit's solution with a slight tweak):

    =INDEX($H$1:$J$1,MATCH(MIN(H2:J2*C2:E2),H2:J2*C2:E2,0))
    Thanks for keep going at it, it's the same as xlnitwit responded before so have a look at my response to him/her where I've also included a workbook!

    Br,
    Sherk

  8. #8
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Give this one a whirl:

    =INDEX($H$1:$J$1,MATCH(MIN(INDIRECT("H"&MATCH(A2,G$1:G$5,0)):INDIRECT("J"&MATCH(A2,G$1:G$5,0))*C2:E2),INDIRECT("H"&MATCH(A2,G$1:G$5,0)):INDIRECT("J"&MATCH(A2,G$1:G$5,0))*C2:E2,0))

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    I believe this array formula will meet your requirements, provided that there will never be more than one match for the minimum

    =INDEX($H$1:$J$1,MATCH(MIN(INDEX($H$2:$J$5,MATCH(A2,$G$2:$G$5,0),)*C2:E2),INDEX($H$2:$J$5,MATCH(A2,$G$2:$G$5,0),)*C2:E2,0))
    Last edited by xlnitwit; 10-06-2016 at 08:32 AM.

  10. #10
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Or ...

    =INDEX($H$1:$J$1,MATCH(MIN(C2:E2*INDEX($H$2:$J$5,MATCH(A2,$G$2:$G$5,0),0)),
    C2:E2*INDEX($H$2:$J$5,MATCH(A2,$G$2:$G$5,0),0),0))

  11. #11
    Registered User
    Join Date
    11-27-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: INDEX MATCH as arrayfunction using MAX and PRODUCT

    Quote Originally Posted by The_Snook View Post
    Give this one a whirl:

    =INDEX($H$1:$J$1,MATCH(MIN(INDIRECT("H"&MATCH(A2,G$1:G$5,0)):INDIRECT("J"&MATCH(A2,G$1:G$5,0))*C2:E2),INDIRECT("H"&MATCH(A2,G$1:G$5,0)):INDIRECT("J"&MATCH(A2,G$1:G$5,0))*C2:E2,0))
    Quote Originally Posted by xlnitwit View Post
    I believe this array formula will meet your requirements, provided that there will never be more than one match for the minimum

    =INDEX($H$1:$J$1,MATCH(MIN(INDEX($H$2:$J$5,MATCH(A2,$G$2:$G$5,0),)*C2:E2),INDEX($H$2:$J$5,MATCH(A2,$G$2:$G$5,0),)*C2:E2,0))
    Both seem to be working fine, xlnitwit's solution is a bit simpler but who cares! Thanks a lot to the both of you!

+ 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] Average value from month, year and product (index,match)
    By danwoltrs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-30-2016, 07:05 PM
  2. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  3. [SOLVED] Index match with min and sum product
    By lejanco in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-16-2014, 01:01 PM
  4. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  5. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  6. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  7. match product id with product name from other workbook
    By mustangfanatic in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 07-22-2008, 03:37 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