+ Reply to Thread
Results 1 to 9 of 9

Lowest Value in a range

  1. #1
    Registered User
    Join Date
    11-15-2006
    Posts
    8

    Lowest Value in a range

    Can anybody tell me if there is a way to find the lowest value in a row of numbers, but only values more than zero? using the =min gives zero which I don't want.

    Thanks

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    try =small(range,1)

  3. #3
    Registered User
    Join Date
    11-15-2006
    Posts
    8
    Quote Originally Posted by davesexcel
    try =small(range,1)
    I've tried this but it still comes up with 0 as the result. There are mostly zeros in the range, but a few cells with numbers in them.

    Would I need an =if.... as the =small will word if I tell it which lowest number (ie 4th, 5th etc) I want, but I don't want to have to do that - I just want the lowest value higher than zero.

    THanks

  4. #4
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by leics27
    Can anybody tell me if there is a way to find the lowest value in a row of numbers, but only values more than zero? using the =min gives zero which I don't want.

    Thanks
    try following

    =IF(COUNTIF(A1:A50,"=0")>0,SMALL(A1:A50,2),SMALL(A1:A50,1))
    (assuiming that A1:A50 do not contain negative values)

    Regards.

  5. #5
    Registered User
    Join Date
    11-15-2006
    Posts
    8
    I took your formula and edited to the correct range

    =IF(COUNTIF(Q4:AA4,"=0")>0,SMALL(Q4:AA4,2),SMALL(Q4:AA4,1))

    It won't do it still, but does it matter that the values in the range are formula generated? (via a lookup)

    Thanks for your help

  6. #6
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by leics27
    I took your formula and edited to the correct range

    =IF(COUNTIF(Q4:AA4,"=0")>0,SMALL(Q4:AA4,2),SMALL(Q4:AA4,1))

    It won't do it still, but does it matter that the values in the range are formula generated? (via a lookup)

    Thanks for your help
    try this

    =SMALL(Q4:AA4,COUNTIF(Q4:AA4,"<=0")+1)

    Regards.

  7. #7
    Registered User
    Join Date
    11-15-2006
    Posts
    8
    That works, it gives the lowest value, not including zero.

    However, sorry to be a right pain the a*s,

    On some of the rows of data there are only zeros, so if this is the case zero is ok as the answer! Can the formula incorporate this argument too?
    Last edited by leics27; 11-16-2006 at 12:27 PM.

  8. #8
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    =if(countif(q4:aa4,"<=0")=count(q4:aa4),0,SMALL(Q4:AA4,COUNTIF(Q4:AA4,"<=0")+1))

    Regards

    Dav

  9. #9
    Registered User
    Join Date
    11-15-2006
    Posts
    8
    That does the job - thanks very much!!

+ 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