Hey guys,
First of all, let me say thankyou for having such a large database of past q&a's, it has been very helpful to me in the past when googling how to do something specific. Alas, google has now failed me, so I turn to you.
A-Desired Quantity
B-Supplier 1 Price
C-Supplier 1 Qty
D-Supplier 2 Price
E-Supplier 2 Qty
So in row F, I want to find the Min value of B and D and LIMIT it to the quantity associated with it. So if Supplier 1 has the lowest price but 10 units, then I want F to represent 10 (if A > 10). I can (easily) find the minimum price, but I can't figure out how to restrict the quantity based on the corresponding maximum value in C and E and my own desired quantity in A. And then of course I'd like to have the second supplier fill my remaining quantity into G or something, but that's another task.
I've tried inserting a custom data validation setting restricting the limit into F based on C but if it went over I just got an error message because it was too high a result (the result didn't cap itself). I think I can get around it by doing something like =MIN(IF(B2<D2, MIN(A2,C2))) which would give me a result of either the lowest number of units I want to order from supplier A if he was the lowest based supplier but then I'd have to do repeating formulas for if Supplier 2 had the lowest price etc and more formulas for second-cheapest supplier (ie, if supplier 1 has the lowest price but a lower quantity then I want to order, I have to order from 2 suppliers) and it grows exponentially (2 suppliers=4 formulas, 3 suppliers=9)... I think that makes sense? If it doesn't just ignore me, I'm slightly delirious from trying to work this one out. Thanks
Bookmarks