+ Reply to Thread
Results 1 to 3 of 3

sumproduct formula

  1. #1
    Todd
    Guest

    sumproduct formula

    I am trying to get a formula that
    1. if a cell in column c is greater than zero will multiply that cell by
    another and total the result by column.

    What I have is (which is not working)

    =SUMPRODUCT(--($C$7:$C$64>0),$C$7:$C$64*D$7:D$64)


    Column C Column D
    5 100
    0 400
    2 300
    4 200

    = 500+600+800


    Thanks,


    Todd

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

    Your formula should work if you just have numbers or blanks in C7:D64, what result do you get? Why doesn't it work?

    This slight modification might help

    =SUMPRODUCT(--($C$7:$C$64>0),$C$7:$C$64,D$7:D$64)

    although if you never have negative values in column C you could just use

    =SUMPRODUCT($C$7:$C$64,D$7:D$64)

  3. #3
    Todd
    Guest

    Re: sumproduct formula

    I was wrong! it wasn't that formula but the formula being used to check it
    with. Thank you for the help.

    "daddylonglegs" wrote:

    >
    > Hi Todd
    >
    > Your formula should work if you just have numbers or blanks in C7:D64,
    > what result do you get? Why doesn't it work?
    >
    > This slight modification might help
    >
    > =SUMPRODUCT(--($C$7:$C$64>0),$C$7:$C$64,D$7:D$64)
    >
    > although if you never have negative values in column C you could just
    > use
    >
    > =SUMPRODUCT($C$7:$C$64,D$7:D$64)
    >
    >
    > --
    > daddylonglegs
    > ------------------------------------------------------------------------
    > daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
    > View this thread: http://www.excelforum.com/showthread...hreadid=520863
    >
    >


+ 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