+ Reply to Thread
Results 1 to 15 of 15

Help choosing minimum price if in stock

  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    reading england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Help choosing minimum price if in stock

    I need to input look at different suppliers and see you is the lowest price but only show return the lowest price that is in stock. For instance if I have 5 suppliers and the lowest price is 10 but there is no stock then I want to go to the next lowest price and only show the result that is in stock.

    Please help - I just don't get it
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help choosing minimum price if in stock

    Hi

    Try this

    =MIN(IF(C2:C7="y";E2:E7))

    CSE= Array Formula.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

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

    Re: Help choosing minimum price if in stock

    Try this formula in E2

    =MIN(IF('input sheet'!C2:G2>0,'input sheet'!H2:L2))

    That's an "array formula" that needs to be confirmed with CTRL+SHIFT+ENTER

    copy down column
    Audere est facere

  4. #4
    Registered User
    Join Date
    03-12-2012
    Location
    reading england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Help choosing minimum price if in stock

    Thanks but I need to get it to return the supplier that is the cheapest from the range of supplier headings. can you look at my attached excel spreadsheet ofr my hashed attempt

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Help choosing minimum price if in stock

    Take a look to the example..
    Attached Files Attached Files

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

    Re: Help choosing minimum price if in stock

    That won't return correct value if two suppliers has same price but first is out of stock.

    Here, look at this:

    For other part use DDL formula, or some INDEX approach.
    Attached Files Attached Files

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help choosing minimum price if in stock

    Hi,

    As an array formula (entered with Ctrl-Shift-Enter) in E2 and copied down.
    =MIN(IF('input sheet'!C2:G2>0,'input sheet'!H2:L2))
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

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

    Re: Help choosing minimum price if in stock

    I think I already suggested that one Richard.....

    I think you need that formula in E2 for lowest in stock price, then you can use this formula in D2 for the supplier

    =IF(C2="n","",INDEX('input sheet'!H$1:L$1,MATCH(E2,'input sheet'!H2:L2,0)))

    see attached
    Attached Files Attached Files

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

    Re: Help choosing minimum price if in stock

    That won't return you correct value since cheapest supplier may be out of stock.
    Check mine example.

  10. #10
    Registered User
    Join Date
    03-12-2012
    Location
    reading england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Help choosing minimum price if in stock

    Thansk but not quite right for me yet

    On row 2 That returned the right supplier result - supplier 1 but didn't return the right buy price . it still says £15 rather than £125

    can you help- I do appreciate your knowledge

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help choosing minimum price if in stock

    @ddl

    Indeed you did - sorry, I missed that.

    Regards

  12. #12
    Registered User
    Join Date
    03-12-2012
    Location
    reading england
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Help choosing minimum price if in stock

    thanks that works perfectly.
    I really appreciate your help

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

    Re: Help choosing minimum price if in stock

    Are you referring to my last suggestion?

    zbor is right, mine gives correct results for that example but won't necessarily always work, I amended D2 to this formula copied down

    =IF(C2="n","",INDEX('input sheet'!H$1:L$1,MATCH(1,INDEX(('input sheet'!H2:L2=E2)*('input sheet'!C2:G2>0),0),0)))

    see attached
    Attached Files Attached Files

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

    Re: Help choosing minimum price if in stock

    Quote Originally Posted by zbor View Post
    That won't return you correct value since cheapest supplier may be out of stock.
    Check mine example.
    Nicely spotted

    Thanks zbor, I agree that my first D2 formula isn't correct (since corrected, see last post). I think that it will work in most cases, even if the cheaper supplier is out of stock because it's referencing the minimum in stock price......but if there is a tie between the cheapest prices and some of those suppliers are out of stock then it might pick the wrong supplier.

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

    Re: Help choosing minimum price if in stock

    At the end nice non-array solution from all of us

+ 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