Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SumProduct With Multiple criteria
Hi, trying get sumproduct formula to correctly count positive and negative
p&l if the stock price is =10 and <=20. I have written: =SUMPRODUCT(--($B$2:$b$6=10),--($b$2:$b$6<=20),--($a$92:$a$60),$a$2:$a$6) which results in 300, for the negative total I used =SUMPRODUCT(--($B$2:$b$6=10),--($b$2:$b$6<=20),--($a$92:$a$6<0),$a$2:$a$6) which gives me -370. But I need to count? Thanks P&L Price (120) 10 300 12 (100) 14 (150) 15 30 25 200 26 |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
SumProduct With Multiple criteria
Just take out the last array argument to the sumproduct function:
=SUMPRODUCT(--($B$2:$b$6=10),--($b$2:$b$6<=20),--($a$2:$a$60)) and =SUMPRODUCT(--($B$2:$b$6=10),--($b$2:$b$6<=20),--($a$2:$a$6<0)) "Tony D" wrote: Hi, trying get sumproduct formula to correctly count positive and negative p&l if the stock price is =10 and <=20. I have written: =SUMPRODUCT(--($B$2:$b$6=10),--($b$2:$b$6<=20),--($a$92:$a$60),$a$2:$a$6) which results in 300, for the negative total I used =SUMPRODUCT(--($B$2:$b$6=10),--($b$2:$b$6<=20),--($a$92:$a$6<0),$a$2:$a$6) which gives me -370. But I need to count? Thanks P&L Price (120) 10 300 12 (100) 14 (150) 15 30 25 200 26 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple Criteria in SumProduct, N/A Result | Excel Worksheet Functions | |||
COUNTIF or SUMPRODUCT counting multiple criteria | Excel Worksheet Functions | |||
Using Sumproduct with multiple Criteria | Excel Worksheet Functions | |||
sumproduct using multiple criteria | Excel Worksheet Functions | |||
Sumproduct - multiple criteria in Column A | Excel Worksheet Functions |