Consulting

Results 1 to 9 of 9

Thread: Solved: Ignoring 0 in list

  1. #1

    Solved: Ignoring 0 in list

    I want to have a cell tell me the minimum value in a list of cells except to ignore zeros. I can't seem to figure out the syntax with anything. MIN(F3:F46) includes the zeros so, of course, the answer is 0. How can I get it to ignore zero?

    TIA,
    Ken

  2. #2
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    http://www.mrexcel.com/archive/Dates/11449.html

    I just searched google with this string:
    cell 0 Min formula function excel
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =MIN(IF(A1:A10<>0,A1:A10))

    as an array formula, committed with Ctrl-Shift-Enter, not just Enter.

  4. #4
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    I have learned some things from Bob especially with regard to formula's so I would try his contribution.....
    But when I tried it I found it was missing a trailing parenthesis:
    =MIN(IF(A1:A10<>0,A1:A10))
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Just fixed that
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Copy and paste bug

  7. #7
    Thank all of you for such a quick reply. It was the syntax I had trouble understanding but after looking at the examples you gave I understand now.

    Thanks again,
    Ken

  8. #8
    VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Good deal Ken. Be sure to mark your thread solved using the thread tools at the top of the page...
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  9. #9
    VBAX Expert Shazam's Avatar
    Joined
    Sep 2005
    Posts
    530
    Location
    Here is an non-array approach.

    =LARGE(A1:A10,COUNTIF(A1:A10,">0"))


    Hope it helps!
    SHAZAM!

Posting Permissions

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