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 / Worksheet Functions / October 2006

Tip: Looking for answers? Try searching our database.

countif Column A and excule column B if it's cancelled

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LLWest - 31 Oct 2006 22:41 GMT
I have a spreadsheet that has column A with project type and column B with
the status.  I need to count all projects of a certain type in column A that
do not have a status = Cancelled in column B.  The formulas as in another
worksheet.

I've been trying  to use this formula but it's not correct:

=COUNTIF(Projects!$A:$A,"Home")-COUNTIF(Projects!$B:$B,"Cancelled")

I'm not sure if Countif is the right function to use.  would Sumproduct be
better?
Biff - 31 Oct 2006 22:52 GMT
Hi!

Try this:

=SUMPRODUCT(--(Projects!$A1:$A100="Home"),--(Projects!$B1:$B100<>"Cancelled"))

Note: you can't use entire columns as range arguments with Sumproduct
(unless you're using Excel 2007 beta)

Better to use cells to hold the criteria:

C1 = Home
C2 = Cancelled

=SUMPRODUCT(--(Projects!$A1:$A100=C1),--(Projects!$B1:$B100<>C2))

Biff

>I have a spreadsheet that has column A with project type and column B with
> the status.  I need to count all projects of a certain type in column A
[quoted text clipped - 8 lines]
> I'm not sure if Countif is the right function to use.  would Sumproduct be
> better?
bj - 31 Oct 2006 22:56 GMT
try = sumproduct(--(A1:A64000="Home"),--(B1:B64000<>"Cancelled"))
a specific range must be specified and not an entire column

> I have a spreadsheet that has column A with project type and column B with
> the status.  I need to count all projects of a certain type in column A that
[quoted text clipped - 7 lines]
> I'm not sure if Countif is the right function to use.  would Sumproduct be
> better?
LLWest - 31 Oct 2006 23:30 GMT
that formula works great - thanks.

I have a column C now that has the revenue amount.  how would I do the
formual to add up the revenue of only the projects for that project type that
aren't cancelled?

thanks again

> try = sumproduct(--(A1:A64000="Home"),--(B1:B64000<>"Cancelled"))
> a specific range must be specified and not an entire column
[quoted text clipped - 10 lines]
> > I'm not sure if Countif is the right function to use.  would Sumproduct be
> > better?
Biff - 31 Oct 2006 23:47 GMT
=SUMPRODUCT(--(Projects!A1:A100="Home"),--(Projects!B1:B100<>"Cancelled"),Projects!C1:C100)

Biff

> that formula works great - thanks.
>
[quoted text clipped - 23 lines]
>> > be
>> > better?
 
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.