+ Reply to Thread
Results 1 to 5 of 5

smallest number not zero

  1. #1
    Registered User
    Join Date
    01-09-2004
    Posts
    10

    smallest number not zero

    Is there a function that i can use to find the smallest number in an array but not enclused 0.

    I tried =Small(A1:A25,2)

    but i have multiple zero's and it still picks zero.

    I'm not great w/ vb but i can do a little if i need to.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    A long way to go for it, but this does it.

    =SMALL(A1:A25,COUNT(A1:A25)-COUNTIF(A1:A25,"=0")-1)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    =Min(IF(A1:A25<>0,A1:A25))

    confirmed with CTRL+SHIFT+ENTER not just ENTER
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    I assume you have only positive numbers or zero....try either

    =SMALL(A1:A25,COUNTIF(A1:A25,0)+1)

    or an array formula

    =MIN(IF(A1:A25,A1:A25))

    confirmed with CTRL+SHIFT+ENTER

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    smallest number not zero

    Try something like this for the smallest non-zero number:
    Please Login or Register  to view this content.

    for the 2nd smallest:

    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ 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