#1   Report Post  
jnorton
 
Posts: n/a
Default 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.

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

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.



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

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.



  #4   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

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.



  #5   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

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.





  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

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



  #7   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Oh, I read it - it just didn't sink in ;-)

Bernie

Seems neither of us bother to read it all :-)



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
Countif bjg Excel Worksheet Functions 11 November 27th 04 03:32 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM
Countif ??? terryv Excel Worksheet Functions 2 November 8th 04 09:03 AM
Countif, Sumif, If - help! Angel160 Excel Worksheet Functions 2 November 3rd 04 05:23 PM
countif, again Liz G Excel Worksheet Functions 2 November 1st 04 11:20 PM


All times are GMT +1. The time now is 09:23 AM.

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

About Us

"It's about Microsoft Excel"