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 / September 2007

Tip: Looking for answers? Try searching our database.

Function SUMPRODUCT (or COUNTIFS) for 2 or more options?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kasanoff@o2.pl - 25 Sep 2007 10:38 GMT
Hi guys!

I'm using Excel 2003 and for instance I have a following table:

     A     B
1  2008  W
2  2008  W
3  2008  M
4  2009  M

I'd like to know how many 2008 year is in the column A which has
letter "W" for example. The correct answer is 2 and can get this with
this function:

=SUMPRODUCT(--(A1:A4=2008),--(B1:B4="W"))

The function COUNTIFS works only in 2007 :(

So that's okay. But now I'm changing the B column to following:

     A     B
1  2008  W1
2  2008  W2
3  2008  M1
4  2009  M2

And now I'd like to know how many 2008 year is in the column A which
has "W1" OR "W2". The correct answer is also 2 but how can I count
that?

I am kindly grateful for the anwer! :)

Thanks!

Regards
Wild Bill - 25 Sep 2007 10:53 GMT
A very minor tweak handles that:
=SUMPRODUCT(--(A1:A4=2008),--(LEFT(B1:B4,1)="W"))

>Hi guys!
>
[quoted text clipped - 31 lines]
>
>Regards
kasanoff@o2.pl - 25 Sep 2007 11:36 GMT
Thanks so much, it works :)

Regards
 
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.