+ Reply to Thread
Results 1 to 4 of 4

Find Smallest X Value For A Group Ignoring Zeros

  1. #1
    Registered User
    Join Date
    05-09-2012
    Location
    USA
    MS-Off Ver
    2019 16.0.13205.200000 64-bit
    Posts
    57

    Find Smallest X Value For A Group Ignoring Zeros

    I have a trivial, hopefully, issue: I need to find several smallest data points for a certain group of values. I got an array formula, but I'm having a bit of a hard time making it ignore zero values completely. Here's the formula:
    Please Login or Register  to view this content.
    It's giving me zero values if there are any in the data, and I'd like to start with the smallest above-zero values.

    Any ideas, guys/gals? Thanks so much in advance!

    Sample file is attached as well.
    Attached Files Attached Files
    Last edited by splendidus; 06-11-2012 at 12:26 PM.
    Office 2019 16.0.13205.200000 64-bit

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    13,764

    Re: Find Smallest X Value For A Group Ignoring Zeros

    This one will do that for you.

    I try to translate the formula:

    =Small($B$2:$B$14;countif($B$2:$B$14;0%)+Row()-3)
    Attached Files Attached Files

  3. #3
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,799

    Re: Find Smallest X Value For A Group Ignoring Zeros

    Hi Splendidus, try adjusting your array formula to:

    =SMALL(IF(($A$2:$A$14=$A$14)*($B$2:$B$14>0),$B$2:$B$14),1)

    Note: You'll get a #NUM error if there is no 1st, 2nd or 3rd smallest greater than 0. You can use conditional formatting or wrap this array in an IFERROR function to hide those, of course.

  4. #4
    Forum Contributor tkowal's Avatar
    Join Date
    11-20-2010
    Location
    Miami, Fl
    MS-Off Ver
    Excel 2010
    Posts
    150

    Re: Find Smallest X Value For A Group Ignoring Zeros

    =MIN(IF($A2:$A14=$A$14,IF($B2:$B14>0,$B2:$B14)))

    Will work also
    Ted
    "Live Long and Prosper"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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