+ Reply to Thread
Results 1 to 8 of 8

Index / Match / Large based on a criteria.

  1. #1
    Registered User
    Join Date
    08-15-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Index / Match / Large based on a criteria.

    I have been pulling my hair out for hours and I hope that someone here can offer me some help.

    I have a large list of product models, and the component parts that make up each model.

    The data is all in one list, and I want to generate reports off the data to show the largest price effect for only the red models.

    The largest mix effect for only the red models, etc. I have attached an example. I am hoping to use the Index/Large/match formula.

    My list is quite large, and I want to use the most efficient formula that won't bog down my workbook.

    Thank you very much!


    Model Part # PriceEffect MixEffect Prev Month Price Curr Month Price
    Red ABC 5.00 20.00 80.00 90.00
    Red DEF 6.00 21.00 81.00 91.00
    Yellow GHI 7.00 22.00 82.00 92.00
    Blue JKL 8.00 23.00 83.00 93.00
    Red MNO 9.00 24.00 84.00 94.00
    Red PQR 10.00 25.00 85.00 95.00
    Red STU 11.00 26.00 86.00 96.00
    Red VWX 12.00 27.00 87.00 97.00
    Blue ABC 13.00 28.00 88.00 98.00
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Index / Match / Large based on a criteria.

    try in L12

    =LARGE(IF($A$7:$A$15=K12,$C$7:$C$15),J12)

    This is an array formula and needs to be confirmed with Ctrl-Shift-Enter. Then copy down. Copy the formula to L25 and copy down.

    try in M12
    =INDEX($B$7:$B$15,MATCH(K12&L12,INDEX($A$7:$A$15&$C$7:$C$15,0),0))

    try in N12
    =INDEX($F$7:$F$15,MATCH(K12&L12,INDEX($A$7:$A$15&$C$7:$C$15,0),0))

    Copy down and copy to the "Blue" section as well. The nested Match formula combines the model name with the price effect, so you don't get wrong results if, for example red and blue both have a price effect of 12. With a simple lookup on just the price effect number, you'd see only the first occurrence rather than the correct occurrence.
    Like a post? Click the star below it!

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Index / Match / Large based on a criteria.

    But it will fail if two Red has same price.

    try just Pivot table.. and filter desired model
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-06-2012
    Location
    Switzerland
    MS-Off Ver
    MS Excel 365
    Posts
    68

    Re: Index / Match / Large based on a criteria.

    Hi! Suggest a "Tie Breaker" to make the prices more unique (as I am not aware of the "large list of product models"). The formula in L12 is an array formula, so exit with Ctrl+Shift+Enter. Hmmm, see now that "npamcpp" had the same idea...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-15-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Index / Match / Large based on a criteria.

    npamcpp

    I copied your formulas for M12 and N12 and dropped them into my sheet and received an error.

    Could you see if you can drop the formulas in my sheet and they work? I really like your formula structure and that's what I was looking for.

    Thank you!

  6. #6
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: Index / Match / Large based on a criteria.

    Sure. Here is the file.

  7. #7
    Registered User
    Join Date
    06-06-2012
    Location
    Switzerland
    MS-Off Ver
    MS Excel 365
    Posts
    68

    Re: Index / Match / Large based on a criteria.

    Hmmm, when you change cell C13 to "12", then you have "Part Number" STU twice in the result list... that's why I have used the tie breaker... to make all the values unique... (see my attachment above; if you are confused iro the decimal places in cell L12:L14, just format the cells showing NIL decimals places).

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Index / Match / Large based on a criteria.

    You can use this formula in M12

    =INDEX(B$7:B$15,SMALL(IF((A$7:A$15=K12)*(C$7:C$15=L12),ROW(B$7:B$15)-ROW(B$7)+1),COUNTIF(L$12:L12,L12)))

    confirmed with CTRL+SHIFT+ENTER and copied down

    That will cope with duplicate values in L12:L14
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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