+ Reply to Thread
Results 1 to 2 of 2

Min AND Small function

  1. #1
    Registered User
    Join Date
    02-11-2005
    Posts
    4

    Min AND Small function

    I'm trying to find the MIN value in range and if MIN value is 0 then find the 2nd smallest value.

    A3 = Date
    'DB05'!U2:U501 = Date serial nr
    AE3 = Date serial nr
    'DB05'!F2:501 = Quantity

    =IF(A3>0;IF(MIN(IF('DB05'!$U$2:$U$501=AE3;'DB05'!$F$2:$F$501))>1;MIN(IF('DB05'!$U$2:$U$501=AE3;'DB05'!$F$2:$F$501));SMALL(IF('DB05'!$U$2:$U$501=AE3;'DB05'!$D$2:$F$501);2));"")

    The formula works when the Quantity in range are:
    500
    600
    1000
    5000

    But not when the Quantity in range are :
    500
    600
    1000
    Blank or 0

    then the formula give a value of 1.

    What have I done wrong ?

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Try the following...

    =IF(A3>0,MIN(IF(('DB05'!$F$2:$F$501>0)*('DB05'!$U$2:$U$501=AE3),'DB05'!$F$2:$F$501)),"")

    ...confirmed with CONTROL+SHIFT+ENTER.

    Hope this helps!

    Quote Originally Posted by yakumo
    I'm trying to find the MIN value in range and if MIN value is 0 then find the 2nd smallest value.

    A3 = Date
    'DB05'!U2:U501 = Date serial nr
    AE3 = Date serial nr
    'DB05'!F2:501 = Quantity

    =IF(A3>0;IF(MIN(IF('DB05'!$U$2:$U$501=AE3;'DB05'!$F$2:$F$501))>1;MIN(IF('DB05'!$U$2:$U$501=AE3;'DB05'!$F$2:$F$501));SMALL(IF('DB05'!$U$2:$U$501=AE3;'DB05'!$D$2:$F$501);2));"")

    The formula works when the Quantity in range are:
    500
    600
    1000
    5000

    But not when the Quantity in range are :
    500
    600
    1000
    Blank or 0

    then the formula give a value of 1.

    What have I done wrong ?

+ 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