![]() |
Countif
I have three formulas that work great by themselves
This sums the product of all my trades on another worksheet that have the same symbol. =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(Tra des!H2:H2000)) This sums the product of all my trades on another worksheet that have fall in the same month. =SUMPRODUCT((MID(Trades!A2:A2000,1,3)=E1)*(Trades! H2:H2000)) This counts the number of positive trades =COUNTIF(Trades!H2:H2000,"<0") What I would like to do is combine the three formulas and have the formula count the number of positive trades for the stocks that have the same symbol and fall withiin the same month. |
You have already posted this, and JE and I gave you an answer.
-- HTH RP (remove nothere from the email address if mailing direct) "jnorton" wrote in message ... I have three formulas that work great by themselves This sums the product of all my trades on another worksheet that have the same symbol. =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(Tra des!H2:H2000)) This sums the product of all my trades on another worksheet that have fall in the same month. =SUMPRODUCT((MID(Trades!A2:A2000,1,3)=E1)*(Trades! H2:H2000)) This counts the number of positive trades =COUNTIF(Trades!H2:H2000,"<0") What I would like to do is combine the three formulas and have the formula count the number of positive trades for the stocks that have the same symbol and fall withiin the same month. |
Noticed you just extended from the previous post
=SUMPRODUCT(--(Trades!C2:C2000=Performance!A15),--(MID(Trades!A2:A2000,1,3)= E1),--(Trades!H2:H2000<0)) -- HTH RP (remove nothere from the email address if mailing direct) "jnorton" wrote in message ... I have three formulas that work great by themselves This sums the product of all my trades on another worksheet that have the same symbol. =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(Tra des!H2:H2000)) This sums the product of all my trades on another worksheet that have fall in the same month. =SUMPRODUCT((MID(Trades!A2:A2000,1,3)=E1)*(Trades! H2:H2000)) This counts the number of positive trades =COUNTIF(Trades!H2:H2000,"<0") What I would like to do is combine the three formulas and have the formula count the number of positive trades for the stocks that have the same symbol and fall withiin the same month. |
jnorton,
Try (all on one line - this may wrap) =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(MID (Trades!A2:A2000,1,3)=E1)* (Trades!H2:H2000<0) *(Trades!H2:H2000)) Though why your positive trades are less than zero rather than greater than zero..... HTH, Bernie MS Excel MVP "jnorton" wrote in message ... I have three formulas that work great by themselves This sums the product of all my trades on another worksheet that have the same symbol. =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(Tra des!H2:H2000)) This sums the product of all my trades on another worksheet that have fall in the same month. =SUMPRODUCT((MID(Trades!A2:A2000,1,3)=E1)*(Trades! H2:H2000)) This counts the number of positive trades =COUNTIF(Trades!H2:H2000,"<0") What I would like to do is combine the three formulas and have the formula count the number of positive trades for the stocks that have the same symbol and fall withiin the same month. |
Duh. Ignore my first post - I missed the "I want to count" part.
Try =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(MID (Trades!A2:A2000,1,3)=E1)* (Trades!H2:H2000<0)*1) HTH, Bernie MS Excel MVP "jnorton" wrote in message ... I have three formulas that work great by themselves This sums the product of all my trades on another worksheet that have the same symbol. =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(Tra des!H2:H2000)) This sums the product of all my trades on another worksheet that have fall in the same month. =SUMPRODUCT((MID(Trades!A2:A2000,1,3)=E1)*(Trades! H2:H2000)) This counts the number of positive trades =COUNTIF(Trades!H2:H2000,"<0") What I would like to do is combine the three formulas and have the formula count the number of positive trades for the stocks that have the same symbol and fall withiin the same month. |
Seems neither of us bother to read it all :-)
Bob "Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Duh. Ignore my first post - I missed the "I want to count" part. Try =SUMPRODUCT((Trades!C2:C2000=Performance!A15)*(MID (Trades!A2:A2000,1,3)=E1)* (Trades!H2:H2000<0)*1) HTH, Bernie MS Excel MVP |
Oh, I read it - it just didn't sink in ;-)
Bernie Seems neither of us bother to read it all :-) |
All times are GMT +1. The time now is 12:45 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com