+ Reply to Thread
Results 1 to 13 of 13

Find minimum (ignoring blank cell or zero values) with Multiple Criteria

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Hi,

    I have managed to get the array to work using

    {=MIN(IF((A2:A12=E2)*(B2:B12=F2),C2:C12))}


    However, it is taking the "blank cells" as "zero" as the minimum values. How do I write it so that it will ignore the blank cell? And how to write it if trying to get it to ignore "zero" values?

    If someone can help me... I really appreciate it.

    Thank you in advance.

    Joey
    Attached Files Attached Files

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    try it like this

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Ah... I see how you included the Nested IF to ignore blank cells. Thank you vlady!

    Following your 'Nested IF' idea, I've further changed the equation to also ignore "zero values". I thought I should post the formula here for future reference if anyone else looking for such answer.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    If you want to ignore blanks and zeroes then a single test for that is sufficient, i.e.

    =MIN(IF((A$2:A$12=E2)*(B$2:B$12=F2)*(C$2:C$12<>0),C$2:C$12))
    Audere est facere

  6. #6
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Thank you all for quick response.

    How do I get the equation to return a "No Data" instead of "zero" when Column C has only blank for the selected criteria?

    Thanks again!

  7. #7
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Thanks zbor

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    with any of the formula's given above you can include an if statement

    =if(theformula=0,"No Data",theformula)

    note: take the shortest formula by DDL.

    regards,
    vladimir

  9. #9
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    :D... Thanks so much vladimir - Works perfectly!

    Cheers
    Joey

  10. #10
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    MIN always returns zero if no criteria are met, if you switch to SMALL you can get #NUM! error instead, i.e.

    =SMALL(IF((A$2:A$12=E2)*(B$2:B$12=F2)*(C$2:C$12<>0),C$2:C$12),1)

    ....and take that one step further by adding IFERROR to convert to "No data", i.e.

    =IFERROR(SMALL(IF((A$2:A$12=E2)*(B$2:B$12=F2)*(C$2:C$12<>0),C$2:C$12),1),"No data")

  11. #11
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Ah... I have not known about SMALL and the IFERROR commands. This is exactly what I need to run my calculations! Thank you daddylonglegs

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  13. #13
    Registered User
    Join Date
    04-23-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Find minimum (ignoring blank cell or zero values) with Multiple Criteria

    Thank you arlu. I'm learning how to navigate this site!

+ 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