close

Hi, trying get sumproduct formula to correctly count positive and negative
pamp;l if the stock price is gt;=10 and lt;=20. I have written:
=SUMPRODUCT(--($B$2:$b$6gt;=10),--($b$2:$b$6lt;=20),--($a$92:$a$6gt;0),$a$2:$a$6)
which results in 300, for the negative total I used
=SUMPRODUCT(--($B$2:$b$6gt;=10),--($b$2:$b$6lt;=20),--($a$92:$a$6lt;0),$a$2:$a$6)
which gives me -370. But I need to count? Thanks

Pamp;L Price
(120) 10
300 12
(100) 14
(150) 15
30 25
200 26Just take out the last array argument to the sumproduct function:
=SUMPRODUCT(--($B$2:$b$6gt;=10),--($b$2:$b$6lt;=20),--($a$2:$a$6gt;0))
and =SUMPRODUCT(--($B$2:$b$6gt;=10),--($b$2:$b$6lt;=20),--($a$2:$a$6lt;0))quot;Tony Dquot; wrote:

gt; Hi, trying get sumproduct formula to correctly count positive and negative
gt; pamp;l if the stock price is gt;=10 and lt;=20. I have written:
gt; =SUMPRODUCT(--($B$2:$b$6gt;=10),--($b$2:$b$6lt;=20),--($a$92:$a$6gt;0),$a$2:$a$6)
gt; which results in 300, for the negative total I used
gt; =SUMPRODUCT(--($B$2:$b$6gt;=10),--($b$2:$b$6lt;=20),--($a$92:$a$6lt;0),$a$2:$a$6)
gt; which gives me -370. But I need to count? Thanks
gt;
gt; Pamp;L Price
gt; (120) 10
gt; 300 12
gt; (100) 14
gt; (150) 15
gt; 30 25
gt; 200 26
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()