Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tony D
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Criteria in SumProduct, N/A Result dcd123 Excel Worksheet Functions 7 October 7th 05 01:26 PM
COUNTIF or SUMPRODUCT counting multiple criteria Peo Sjoblom Excel Worksheet Functions 0 May 31st 05 11:40 PM
Using Sumproduct with multiple Criteria Mark Jackson Excel Worksheet Functions 1 May 6th 05 10:07 PM
sumproduct using multiple criteria tifosi3 Excel Worksheet Functions 2 January 6th 05 08:46 PM
Sumproduct - multiple criteria in Column A briank Excel Worksheet Functions 2 January 6th 05 06:44 PM


All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"