+ Reply to Thread
Results 1 to 4 of 4

Small Function

  1. #1
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    2021
    Posts
    154

    Small Function

    Hello All, Using Excel 2007

    I have the following sample worksheet:

    A
    1 2
    2 0
    3 14
    4 7
    5 1

    How can I get the smallest value in A1:A5 that is NOT a zero. (in this case 1)
    I have tried {=small(if(A1:a5=0,"",small(a1:a5,1)))} and I get the error "too few arguments" for this function.
    Any help would be appreciated.

    Mike

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    =IF(MIN(A1:A5)=0,SMALL(A1:A5,COUNTIF(A1:A5,"=0")+1),MIN(A1:A5))
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    2021
    Posts
    154
    Thanks VBA Noob for your help. Works great!

    Mike

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Along the lines of your original attempt....

    =SMALL(IF(A1:A5<>0,A1:A5),1)

    confirmed with CTRL+SHIFT+ENTER

+ 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