+ Reply to Thread
Results 1 to 8 of 8

sumproduct problems

  1. #1
    Forum Contributor
    Join Date
    03-16-2010
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    215

    sumproduct problems

    Hi,

    Could you please advice what is my mistake with the below formula:

    =SUMPRODUCT(('Completion FC'!$T$136:$T$199)*('Completion FC'!$D$136:$D$199="BORDER"))

    I want to count only those value that the D column equal to "BORDER"
    Last edited by sanlen; 12-09-2010 at 10:23 AM.

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

    Re: sumproduct problems

    Do you mean count or sum? Your formula sums column T when column D = "border". Do you get an error? With that syntax any text in the sum range, 'Completion FC'!$T$136:$T$199, will cause a #VALUE! error.

    For a single condition SUMIF is preferable, anyway. Try

    =SUMIF('Completion FC'!$D$136:$D$199,"BORDER",'Completion FC'!$T$136:$T$199)
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    03-16-2010
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    215

    Re: sumproduct problems

    Hi,

    I have this data:

    border 4-Dec-10
    border 5-Dec-10
    border 6-Dec-10
    city 5-Nov-10
    city 2-Jul-10
    city 3-Feb-10
    city 5-Mar-10
    border 5-Aug-10

    i want to count how many for the "border" and how many for the "city"

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct problems

    To count you only need COUNTIF:

    =COUNTIF('Completion FC'!$D$136:$D$199,"Border")

    and

    =COUNTIF('Completion FC'!$D$136:$D$199,"City")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  5. #5
    Forum Contributor
    Join Date
    03-16-2010
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    215

    Re: sumproduct problems

    Hi,

    If i have the data as follow:

    border 1-Dec-10
    city 2-Dec-10
    border 3-Dec-10
    city 4-Dec-10
    border 5-Dec-10
    city 6-Dec-10
    border 7-Dec-10
    city
    border

    I want to count only those that have completed. Can i do as follow?

    =COUNTIF(C3:C11,B3:B11="border")
    and
    =COUNTIF(C3:C11,B3:B11="city")

    It does not work for me.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct problems

    Back to Sumproduct, then:

    =SUMPRODUCT(ISNUMBER('Completion FC'!$T$136:$T$199)*('Completion FC'!$D$136:$D$199="BORDER"))

    assuming if there is a date, then it is considered completed.

  7. #7
    Forum Contributor
    Join Date
    03-16-2010
    Location
    Phnom Penh, Cambodia
    MS-Off Ver
    Excel 2003
    Posts
    215

    Re: sumproduct problems

    Quote Originally Posted by NBVC View Post
    Back to Sumproduct, then:

    =SUMPRODUCT(ISNUMBER('Completion FC'!$T$136:$T$199)*('Completion FC'!$D$136:$D$199="BORDER"))

    assuming if there is a date, then it is considered completed.
    It is working fine with your formula now . However, could you please advice what is the problem with my first formula.

    =SUMPRODUCT(('Completion FC'!$T$136:$T$199)*('Completion FC'!$D$136:$D$199="BORDER"))

    if it is whatever data and the cell is not blank.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: sumproduct problems

    You don't have a condition of check on the first array.. how you wrote it, it would just try to sum T136:T199 based on the second condition....

+ 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