+ Reply to Thread
Results 1 to 12 of 12

Finding the minimum value in a range but excluding one value

  1. #1
    Registered User
    Join Date
    05-28-2010
    Location
    London
    MS-Off Ver
    MS365 (PC) Version 2301
    Posts
    94

    Finding the minimum value in a range but excluding one value

    hi

    I need to find the minimum value in a range of just 5 cells but I want to exclude the lowest value

    I need to know the earliest start time in a range of 5 start times but exclude where the value is midnight

    So I want the return to be 07:00 in this example below

    00:00 00:00 08:00 08:00 07:00

    thanks in advance

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Finding the minimum value in a range but excluding one value

    Try this array formula..
    Assuming your numbers are listed in A1:E1

    Please Login or Register  to view this content.
    Confirm with Ctrl+Shift+Enter and not just Enter
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: Finding the minimum value in a range but excluding one value

    Use this array formula:

    =MIN(IF(A1:A5>0,A1:A5))

    Confirm with Ctrl-Shift-Enter instead of the usual <Enter>

    Hope this helps.

    Pete
    Last edited by Pete_UK; 10-04-2012 at 07:56 AM.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: Finding the minimum value in a range but excluding one value

    Another way:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Finding the minimum value in a range but excluding one value

    =MIN(IF(A1:E1>0,A1:E1))

    Array formula(C+Sh+En)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  6. #6
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Finding the minimum value in a range but excluding one value

    Quote Originally Posted by zbor View Post
    Another way:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Don't you actually mean
    =SMALL(A1:E1,COUNTIF(A1:E1,0)+1)

    Your formula will give incorrect results unless the desired result happens to be the mid-smallest (3 out of 5, 4 out of 7 etc.) value in the range

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: Finding the minimum value in a range but excluding one value

    Yes, true.. Didn't test it and take conclusion on this particular case..

  8. #8
    Registered User
    Join Date
    05-28-2010
    Location
    London
    MS-Off Ver
    MS365 (PC) Version 2301
    Posts
    94

    Re: Finding the minimum value in a range but excluding one value

    Thanks guys - for some reason I can't see all replies in normal mode but did in print mode - I've tried the =min(if( but am getting the old #Value error

    Example attached!

    Forum Min If.xls

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,053

    Re: Finding the minimum value in a range but excluding one value

    That's because you didn't comfirm with ctrl+shift+enter like everyone told you.

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Finding the minimum value in a range but excluding one value

    Confirm this usisng Control+Shift+Enter. Not just Enter

  11. #11
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Finding the minimum value in a range but excluding one value

    You need to confirm with Ctrl +Shift+Enter and not just Enter

    Once you do that, you should see {} around the formula. Dont type these in manually

    Format cell to h:mm

  12. #12
    Registered User
    Join Date
    05-28-2010
    Location
    London
    MS-Off Ver
    MS365 (PC) Version 2301
    Posts
    94

    Re: Finding the minimum value in a range but excluding one value

    Great - that works now thanks but

    "like everyone told you" ???? It wasn't obvious sorry - that's why I asked for help

+ 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