+ Reply to Thread
Results 1 to 5 of 5

Formula based on lowest value of A and maximum value of B

  1. #1
    Registered User
    Join Date
    02-18-2017
    Location
    Australia
    MS-Off Ver
    2020
    Posts
    2

    Formula based on lowest value of A and maximum value of B

    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

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Formula based on lowest value of A and maximum value of B

    Hi, welcome to the forum

    1st, thanks for the kind words

    2nd, Im not really sure I understand what you want here, perhaps it would help if you could upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    I have a feeling you are looking at using the AND() function, something like...
    AND(min(proce1,price2,max(QTY1,QTY2))
    or something like that
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-18-2017
    Location
    Australia
    MS-Off Ver
    2020
    Posts
    2

    Re: Formula based on lowest value of A and maximum value of B

    Ok, here is a basic csv file with an example (I am using excel, but the attachments won't open a window to choose a file from)

    https://docs.google.com/spreadsheets...it?usp=sharing

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Formula based on lowest value of A and maximum value of B

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  5. #5
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Formula based on lowest value of A and maximum value of B

    Hi All,

    just for fin and for sharing some ideas, in the attachment 5 suppliers and some formulae (orange background)

    Please Login or Register  to view this content.
    to create a couple of helper row.

    I get units to order (green background) from

    Please Login or Register  to view this content.
    Hope it could be of some help.


    --------------


    Thanks for sharing kind feedback
    Attached Files Attached Files
    Last edited by canapone; 02-20-2017 at 01:05 PM.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

+ 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] Ranking order based on highest to lowest value
    By Pranuvins in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-29-2016, 04:10 AM
  2. Recording lowest and 2nd lowest numbers in a rang of cells
    By ORIELSON in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-01-2015, 10:31 AM
  3. How to find Top 10/Lowest 10 values based on Month 2nd
    By bigroo1958 in forum Excel General
    Replies: 1
    Last Post: 06-26-2014, 02:56 PM
  4. Replies: 1
    Last Post: 01-10-2014, 01:55 PM
  5. [SOLVED] How to show lowest value based on names
    By figo12 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-06-2013, 07:01 PM
  6. formula for ordering inventory based on maximum allowed
    By ctrrs817 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2013, 04:42 PM
  7. formula for ordering inventory based on maximum allowed
    By ctrrs817 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-02-2013, 06:27 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