+ Reply to Thread
Results 1 to 6 of 6

Minimum Function Problem

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Minimum Function Problem

    Hi,

    I want to select the lowest of three values in cells I21, I22 & I23. Another condition is that the formula should not select the lowest if it happens to be a zero.

    eg,

    If i have 0, 100 & 200 I need the formula to select the 100 value.

    Cheers for you help

    Sam
    Last edited by 3smees23; 05-18-2009 at 10:04 AM.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Minimum Function Problem

    Hi,

    Try this array:

    =MIN(IF(I21:I23=0,"",I21:I23))

    To confirm use CTRL, SHIFT and ENTER, if done correctly, excel will display:

    {=MIN(IF(I21:I23=0,"",I21:I23))}
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Minimum Function Problem

    or non-array alternative

    =SMALL(I21:I23,COUNTIF(I21:I123,"<=0")+1)

  4. #4
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Re: Minimum Function Problem

    Thanks Guys,

    I went for the second option. The only problem is that if there is not a value in I21:I23 then it displays #NUM!. I basically cannot have this as its getting pulled into a program that does our job costing. How can I make this #NUM! value zero?

    Regards,

    Sam

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Minimum Function Problem

    A few options, one would be:

    =IF(COUNTIF(I21:I23,">0"),SMALL(I21:I23,COUNTIF(I21:I23,"<=0")+1),0)

  6. #6
    Forum Contributor
    Join Date
    12-30-2008
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    197

    Re: Minimum Function Problem

    Thanks DonkeyOte

+ 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