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 / December 2005

Tip: Looking for answers? Try searching our database.

Count OR Sum Or if

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Diane1477 - 29 Jun 2005 16:19 GMT
I need to calculate the number of times an item appears within a date range.
Another words, if column A is contains my dates ranging from 1/1/05 - 7/1/05
and column B contains various symbols (ie A, B, C etc.), I need to calculate
how many A's appear between 3/1/05 - 3/31/05.  Is ther a formula to use?  Or
is there a way to do a combination IF/THEN statement?  (If Column A is btwn
3/1/05-3/31/05 then count "A" that appear in column B)  I am using Excel 2000.

PLEASE HELP.  My brain is goingo n overload!
KL - 29 Jun 2005 17:23 GMT
Hi Diane1477,

Try something like this:

=SUMPRODUCT((MONTH(A1:A100)=3)*(YEAR(A1:A100)=2005)*(UPPER(A1:A100)="A"))

or

=SUMPRODUCT((A1:A100>=DATE(2005,3,1))*(A1:A100<=DATE(2005,3,31))*(UPPER(A1:A100)="A"))

Regards,
KL

>I need to calculate the number of times an item appears within a date
>range.
[quoted text clipped - 10 lines]
>
> PLEASE HELP.  My brain is goingo n overload!
KL - 29 Jun 2005 17:28 GMT
Sorry - misprint. The formulae should read as follows:

=SUMPRODUCT((MONTH(A1:A100)=3)*(YEAR(A1:A100)=2005)*(UPPER(B1:B100)="A"))

or
SDM - 11 Dec 2005 03:34 GMT
I had a similar need and the this formula worked great. I do have a couple of
questions:

1.  Can you have the formula look at two conditions to meet before it
counts. Were there would be (UPPER (B1:B100="A") and (UPPER (C1:C100="B")?

2. The "*" seems to be a form of a seperator, is that correct? It seems to
me that it's similar to using commas, am I correct in that assumption?

sdm

> Sorry - misprint. The formulae should read as follows:
>
> =SUMPRODUCT((MONTH(A1:A100)=3)*(YEAR(A1:A100)=2005)*(UPPER(B1:B100)="A"))
>
> or
Biff - 11 Dec 2005 03:59 GMT
Hi!

For question 1:

Just add another array to the formula:

=SUMPRODUCT((MONTH(A1:A100)=3)*(YEAR(A1:A100)=2005)*(UPPER(B1:B100)="A")*(UPPER
(C1:C100="B")))

For question 2:

The "*" is the multiplication operator. What the formula is doing is
multiplying all the arrays together like this:

TRUE * FALSE * FALSE * FALSE = 0
TRUE * TRUE * TRUE * TRUE =1
FALSE * FALSE * FALSE * FALSE = 0

Then summing the result of the multiplication to arrive at a count.

Biff

>I had a similar need and the this formula worked great. I do have a couple
>of
[quoted text clipped - 27 lines]
>> appear in column B)  I
> am using Excel2000.>>>> PLEASE HELP.  My brain is goingo n overload!>>
 
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.