+ Reply to Thread
Results 1 to 4 of 4

SMALL/LARGE function

  1. #1
    Registered User
    Join Date
    03-01-2005
    Posts
    12

    SMALL/LARGE function

    Hi all,

    I have a working array like :

    =IF(COUNTIF(SalesmanList!$A$2:$A$200,A2)>1,(LARGE((SalesmanList!$A$2:$A$200=$A2)*(SalesmanList!$I$2:$I$200),4)),0)

    and I now want to count the nth smallest sale instead of largest but get a "0.0" result when I swap the SMALL and LARGE functions in this array. Any clues what the problem might be or perhaps an alternative way of doing this?

    Also when using SMALL I don't want to count zero values - would I best do this by including an "AND <> 0" function with the COUNTIF function, and how?

    Thanks in advance for any help.

    Barry

  2. #2
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    Hi Barry, the answer as to why zero when using the small function is that the zero results from the array of names becoming zero where this is not true

    SalesmanList!$A$2:$A$200=$A2

    that is you get an array like 1,1,0,0,0, etc

    resulting in the min arguement of the small function being zero

    I think this does the trick for the smallest of a given name

    =IF(COUNTIF(SalesmanList!$A$2:$A$200,A2)>1,IF((SalesmanList!$A$2:$A$200=$A2),SMALL(SalesmanList!$I$2:$I$200,1),0),0)

    again entered with control + shift+ enter
    not a professional, just trying to assist.....

  3. #3
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    actually I thought about it more and this is better

    =IF(COUNTIF(Sheet1!$A$2:$A$8,A2)>1,IF((Sheet1!$A$2:$A$8=$A2),IF(SMALL(Sheet1!$I$2:$I$8,1)=0,SMALL(Sheet1!$I$2:$I$8,2),SMALL(Sheet1!$I$2:$I$8,1)),0))

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

    =IF(COUNTIF(SalesmanList!$A$2:$A$200,$A2)>1,SMALL(IF((SalesmanList!$A$2:$A$200=$A2)*(SalesmanList!$I$2:$I$200>0),SalesmanList!$I$2:$I$200),4),0)

    ...confirmed with CONTROL+SHIFT+ENTER, not just ENTER.

    Hope this helps!

+ 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