Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 06-14-2005, 06:30 PM
was was is offline
Registered User
 
Join Date: 21 Feb 2005
Posts: 15
was is becoming part of the community
Formula counts incorrectly

Please Register to Remove these Ads

Help please.
Column K contains dates and blank cells. I would like to count how many of these dates fall within a given date range. For example, in the first week in May. Column K contains these dates. 5/2/2005, 5/3/2005, 5/5/2005, 5/5/2005. I would like to count this as 4 dates within the first week of May. I created this formula but the output is 3.

=SUMPRODUCT(--(ECNT!F2:F515>=DATE(2005,5,2)),--(ECNT!F2:F515<=DATE(2005,5,6)),--(ISNUMBER(ECNT!K2:K515)))

I assume that it is only counting 5/5/2005 one time?

I changed the dates in the formula to check a second 2nd date range (5/9 to 5/13). Column K contains only one date within that range 5/13/2005. However this formula returns 2.

Could someone please modify this formula to work the way I want it to?
Reply With Quote
  #2  
Old 06-14-2005, 06:56 PM
olasa olasa is offline
Forum Guru
 
Join Date: 24 Dec 2004
Location: Sweden
Posts: 1,079
olasa is becoming part of the community
It workes fine for me:.

=SUMPRODUCT((A2:A10>=DATE(2005,5,2))*(A2:A10<=DATE(2005,5,6))*(ISNUMBER(B2:B10)))
---> 4

Hope it helped
Ola Sandström


Picture:
http://www.excelforum.com/attachment...tid=3501&stc=1
Attached Images
File Type: jpg Clipboard01.jpg (44.0 KB, 28 views)
Reply With Quote
  #3  
Old 06-15-2005, 06:05 PM
bj
Guest
 
Posts: n/a
RE: Formula counts incorrectly

Quick question your write up talks about column K only
your equation shows Column F
What is the is number section for?

"was" wrote:

>
> Help please.
> Column K contains dates and blank cells. I would like to count how many
> of these dates fall within a given date range. For example, in the
> first week in May. Column K contains these dates. 5/2/2005, 5/3/2005,
> 5/5/2005, 5/5/2005. I would like to count this as 4 dates within the
> first week of May. I created this formula but the output is 3.
>
> =SUMPRODUCT(--(ECNT!F2:F515>=DATE(2005,5,2)),--(ECNT!F2:F515<=DATE(2005,5,6)),--(ISNUMBER(ECNT!K2:K515)))
>
> I assume that it is only counting 5/5/2005 one time?
>
> I changed the dates in the formula to check a second 2nd date range
> (5/9 to 5/13). Column K contains only one date within that range
> 5/13/2005. However this formula returns 2.
>
> Could someone please modify this formula to work the way I want it to?
>
>
> --
> was
> ------------------------------------------------------------------------
> was's Profile: http://www.excelforum.com/member.php...o&userid=20211
> View this thread: http://www.excelforum.com/showthread...hreadid=379171
>
>

Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump