Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2006

Tip: Looking for answers? Try searching our database.

sum and count multiple conditions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ftahbaz@gmail.com - 30 Nov 2006 18:13 GMT
I have a sheet with the folliwing info:  the "///"  represents a new
column

Sheet 1

A///12
B///10
D///-5
C///-1
E///0
G///6
A///8
B///1
D///9
E///7

Now I know that I can use the formula =countif(Sheet1!A:A,"A") and get
the number of occurences that A had...
Also, I can get the sum of all the A occurences with
=sumif(Sheet1!A:A,"A",Sheet1!B:B)

What I want to know is...what formula would count the number of times
that A was positive...and also what formula to only sum up the times
that A was positive.

Thanks a lot
Roger Govier - 30 Nov 2006 18:22 GMT
Hi

How do you want to treat 0 in your count of positive's, include or
ignore?
Including, I have used >=0 in the following formula. To exclude from the
count just use >0

Count
=SUMPRODUCT($A$1:$A$100="A")*($B$1:$B$100>=0))

Sum
=SUMPRODUCT($A$1:$A$100="A")*($B$1:$B$100>=0)*$B$1:$B$100))
Clearly in the Sum, it does not alter the result whether 0 is included
or excluded.

Signature

Regards

Roger Govier

>I have a sheet with the folliwing info:  the "///"  represents a new
> column
[quoted text clipped - 22 lines]
>
> Thanks a lot
Bob Phillips - 30 Nov 2006 18:26 GMT
=COUNTIF(A:A,">0")

=SUMIF(A:A,">0")

Signature

HTH

Bob

(change the xxxx to gmail if mailing direct)

>I have a sheet with the folliwing info:  the "///"  represents a new
> column
[quoted text clipped - 22 lines]
>
> Thanks a lot

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.