+ Reply to Thread
Results 1 to 7 of 7

Help with Min formula

  1. #1
    Registered User
    Join Date
    11-20-2003
    Posts
    7

    Help with Min formula

    HI

    I have a range of cells with values including zero but I need the minimum value, but as some of the cells have zero I keep getting zero. How can I write a formula that gives the Minimum that is the next value above zero?

    Any help appreciated.

    G Wates
    Guy

  2. #2
    Forum Contributor
    Join Date
    09-05-2004
    Location
    Melbourne
    Posts
    193
    using the morefunc addin from http://longre.free.fr/english/, I came up with this and the MMIN() function.

    =SUM(MMIN(Range,COUNTIF(range,0)+1))

    This doesn't work for negative numbers but you didn't mention that it had to. It ignores blanks so they are okay.

    Cheers!

  3. #3
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    Thanks Ola Sandstrom


    I am considering the range to be A1:G1

    =min(if(A1:G1>0,A1:G1,"NONE"))


    It should work if it's Entered as an Array formula - Hold down Ctrl and Shift then hit Enter to confirm the formula. Otherwise you will get #VALUE!

  4. #4
    Forum Contributor
    Join Date
    09-05-2004
    Location
    Melbourne
    Posts
    193
    I've since discovered a better Function than the one used in my previous post called SMALL(). Use like this

    =SMALL(Range,COUNTIF(Range,0)+1)

    anilsolipuram solution is just as good so you choose!

    Cheers!

  5. #5
    Registered User
    Join Date
    11-20-2003
    Posts
    7
    Hi thanks for the reply but I can't get it to work so I enclose the formula, any help appreciated.

    =MIN(K7:K8,L7:L8,P7:P8,Q7:Q8)

  6. #6
    Registered User
    Join Date
    01-21-2005
    Posts
    1

    Min Formula

    Guy,

    I know this is by no means elegant, but I hope it will suffice for you...

    =MIN(MIN(IF(K7:K8>0,K7:K8,"NONE")),MIN(IF(P7:P8>0,L7:L8,"NONE")),MIN(IF(P7:P8>0,P7:P8,"NONE")),MIN(IF(Q7:Q8>0,Q7:Q8,"NONE")))

    Best regards,

  7. #7
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256
    This should do it:
    =MIN(IF(K7:L8>0,K7:L8),IF(P7:Q8>0,P7:Q8))

    Ola Sandstrom


    Note:
    Confirm the formula by holding down Ctrl and Shift, and then press Enter.
    Othervise the result will be #VALUE!
    Last edited by olasa; 01-21-2005 at 07:45 PM.

+ 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