+ Reply to Thread
Results 1 to 9 of 9

Min Max IF

  1. #1
    Registered User
    Join Date
    05-09-2016
    Location
    New York
    MS-Off Ver
    2015
    Posts
    4

    Min Max IF

    hi all.

    Having an issue with this formula. Can someone help out. Thanks

    IF(C12<=E10,MIN(F10,(C24*1296/90*C27/H13),IF(C12<=C10,MIN(D10,(C24*1296/90*C27/H13)))),0)

    What this should mean is:
    If C12 is less than or equal to E10 then the lower number of F10 or the equation should appear...but if C12 is equal to or less than C10 (but higher than E10) then the lower number of D10 or the equation should appear.

    equationC24*1296/90*C27/H13)

  2. #2
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: Min Max IF

    IF(C12<=E10,MIN(F10,(C24*1296/90*C27/H13)),IF(C12<=C10,MIN(D10,(C24*1296/90*C27/H13)),0))

    try this perhaps?

  3. #3
    Registered User
    Join Date
    05-09-2016
    Location
    New York
    MS-Off Ver
    2015
    Posts
    4

    Re: Min Max IF

    Jdevil, Its not working. It gives a value of 0 if entered lower number and False if larger number..

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Min Max IF

    Jdevil's formula works as per your description.
    Last edited by newdoverman; 05-09-2016 at 04:17 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Min Max IF

    Jdevil's syntax is correct.

    What should the correct answer be with the cases you've given?

    Eg,
    C24=C27=0 ??
    H13=0 => Formula will return #DIV/0! error message.
    What are F10 and D10?
    Is D10 = FALSE? (which is equal to zero when assessed arithmetically).


    EDIT:

    Like newdoverman's pointed out, when you have two independent criteria like this, you have four possible outcomes.

    I find it's usually helpful to tabulate:

    C12 <= E10 C12 > E10
    C12 <= C10 MIN(F10, fxn) 0
    C12 > 10 MIN(F10, fxn) 0

    That's what your formula is driving towards logically, regardless of syntax errors; is that what you want?
    Last edited by ben_hensel; 05-09-2016 at 04:19 PM.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  6. #6
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Min Max IF

    Hi -

    I just tried Jdevil's solution and it appears to work. What do you mean by "It gives a value of 0 if entered lower number and False if larger number"? Can you give us the numbers in those cells that make it not work and what you think the answer should be? Better yet, can you post a sample spreadsheet with a couple of examples of how it's not working?
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  7. #7
    Registered User
    Join Date
    05-09-2016
    Location
    New York
    MS-Off Ver
    2015
    Posts
    4

    Re: Min Max IF

    YOU MADE IT MY FRIEND! Thank you so much! Very appreciate your help!

  8. #8
    Registered User
    Join Date
    05-09-2016
    Location
    New York
    MS-Off Ver
    2015
    Posts
    4

    Re: Min Max IF

    Hi all,

    A few changes to this equation have been made. C12 is now (C15/N17)and the equation has changed.

    My only question left on this function is: Is it possible to have 3 options in the MIN Function (as seen below with B35,C35,F10)?

    =IFERROR(IF((C15/N17)<=E10,MIN(IF((C15/N17)<=E10,MIN(B35,C35,F10))),MIN(IF(AND((C15/N17)<=C10,(C15/N17)>E10),MIN(B35,C35,D10)))),"")*N17

    Thanks!

  9. #9
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Min Max IF

    Hi -

    Yes, MIN() can evaluate multiple items in a list. In this case it should take the smallest value of B35,C35 and F10.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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