+ Reply to Thread
Results 1 to 7 of 7

Need explanation of a MAX-MIN formula!

Hybrid View

  1. #1
    Registered User
    Join Date
    03-01-2013
    Location
    malta
    MS-Off Ver
    Excel 2003
    Posts
    3

    Need explanation of a MAX-MIN formula!

    Hi all

    I am working through an excel file which i didn't create myself and am having trouble to understand one particular formula. can someone help me to understand what is the scope of this formula, what is it doing??

    =MAX(0,MIN(($H19-$K19-$L19),

    where for example:
    H19 is 71000
    K19 is 0
    L19 is 46000


    Thanks in advance,

    Pam

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Need explanation of a MAX-MIN formula!

    Hi,

    Post the full formula, =MAX(0,MIN(($H19-$K19-$L19), this is only a part of the complete formula.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: Need explanation of a MAX-MIN formula!

    Hi Pam, welcome to the forum.

    That can't be all of the formula, because it's missing two parenthesises on the right. Maybe you only pasted the left side and there's more?

  4. #4
    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: Need explanation of a MAX-MIN formula!

    Hello Pam and welcome to the forum

    I assume there should be two closing parentheses )) instead of the comma in your function example.
    However it may be that this isn't the complete formula, but on the face of it there's no need to wrap h19-k19-l19 in a MIN function since there's no second or third parts to the minimum to evaluate. A normal MIN function would look like =MIN(cell1,cell2,cell3.....etc).

    Assuming there had been the Min function would return the lowest value.

    The whole function is then wrapped in a MAX(0,MIN()) function so that if the MIN function had been > 0 then the whole function would have been limited to zero.
    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.

  5. #5
    Registered User
    Join Date
    03-01-2013
    Location
    malta
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Need explanation of a MAX-MIN formula!

    Thanks to all of you. Yes i didn't post all the formula because that's the only part i'm not understanding...but this is the whole formula

    =IF(AND($H19>0,$I19>0,$J19>0),
    MAX(0,MIN(($H19-$K19-$L19),
    IF($I19="SL",(($H19-$K19)/$J19*M19),
    IF($I19="150% DDB",MAX(($H19-$K19-L19)/$J19*1.5*M19,($H19-$K19)/$J19*M19),
    IF($I19="200% DDB",MAX(($H19-$K19-L19)/$J19*2*M19,($H19-$K19)/$J19*M19)))))),"")

  6. #6
    Registered User
    Join Date
    03-01-2013
    Location
    malta
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Need explanation of a MAX-MIN formula!

    I will be always using I19 as being = SL, so the last two parts of the formula are not important to understand.

  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: Need explanation of a MAX-MIN formula!

    Quote Originally Posted by Pam019 View Post
    I will be always using I19 as being = SL, so the last two parts of the formula are not important to understand.
    In that case

    =IF(AND($H19>0,$I19>0,$J19>0),MAX(0,MIN($H19-$K19-$L19)))

    should be sufficient. The explanation is still as per psot # 4.

    It's always important to let is have all relevant details otherwise you just make things harder for everyone.

+ 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