Results 1 to 4 of 4

Thread: Minimum Value Excluding Zero In Excel Range

  1. #1
    Grand Master
    Join Date
    Apr 2011
    Posts
    22
    Rep Power
    10

    Minimum Value Excluding Zero In Excel Range

    Here's a way to find the minimum value in a range of cells, after excluding zero

    Code:
        Dim rng as range
        Set rng = Range("SomeRangeWhichAlsoHasZeroesInIt")
        dbl = Evaluate("MIN(IF(" & rng.Address & "=0,""""," & rng.Address & "))")

  2. #2
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,122
    Rep Power
    10
    It could also be written as

    Code:
    dbl = Evaluate("MIN(IF(" & rng.Address & "<>0," & rng.Address & "))")
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

  3. #3
    Senior Member
    Join Date
    Apr 2011
    Posts
    190
    Rep Power
    14
    Would that not exclude all negative numbers as well as zero?

    can you use

    <>0
    xl2007 - Windows 7
    xl hates the 255 number

  4. #4
    Administrator Admin's Avatar
    Join Date
    Mar 2011
    Posts
    1,122
    Rep Power
    10
    Quote Originally Posted by Rasm View Post
    Would that not exclude all negative numbers as well as zero?

    can you use

    <>0
    Thanks Rasm. I edited the formula.
    Cheers !

    Excel Range to BBCode Table
    Use Social Networking Tools If You Like the Answers !

    Message to Cross Posters

    @ Home - Office 2010/2013/2016 on Win 10 (64 bit); @ Work - Office 2016 on Win 10 (64 bit)

Similar Threads

  1. Printing range of sheets in excel or in PDF
    By excel_learner in forum Excel Help
    Replies: 18
    Last Post: 10-11-2015, 01:36 PM
  2. Excluding Records of one Table from the Other Table
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 05-17-2013, 12:32 AM
  3. Replies: 2
    Last Post: 03-31-2013, 01:54 PM
  4. Find Minimum Value After Data Is Normalized
    By lokvan in forum Excel Help
    Replies: 1
    Last Post: 03-29-2013, 07:21 PM
  5. Replies: 2
    Last Post: 10-05-2011, 04:18 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •