ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sumproduct formula (https://www.excelbanter.com/excel-worksheet-functions/76406-sumproduct-formula.html)

Todd

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$640),$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

daddylonglegs

sumproduct formula
 

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$640),$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


Todd

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$640),$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




All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com