Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using a range of dates

I have an application where I have one column filled with dates, say column
A, I have another column filled with numbers representing a product, say
column B. I am trying to count the number times a particular value in column
B is present between a range of dates.
Example: the number of times 4 is present in column B between 12/1/2004 and
12/31/2004.

HELP!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default using a range of dates

MinnesotaBob

one way:

=SUMPRODUCT(--(A2:A68=DATEVALUE("1/12/2004"))*--(A2:A68<=DATEVALUE("31/12/2004"))*--(B2:B68=4))

Or, if you have the dates as *text* in cells J2 and J3 (for example)

=SUMPRODUCT(--(A2:A68=DATEVALUE(J2))*--(A2:A68<=DATEVALUE(J3))*--(B2:B68=4))

Or, with true dates in cells J7 and J8 and the value you are looking for in
J9:

=SUMPRODUCT(--(A2:A68=DATE(YEAR(J7),MONTH(J7),DAY(J7)))*--(A2:A68<=DATE(YEAR(J8),MONTH(J8),DAY(J8)))*--(B2:B68=J9))

You'll need to change the dates round ... I'm in the UK, hence 31/12/2004,
etc.

Regards

Trevor


"MinnesotaBob" wrote in message
...
I have an application where I have one column filled with dates, say column
A, I have another column filled with numbers representing a product, say
column B. I am trying to count the number times a particular value in
column
B is present between a range of dates.
Example: the number of times 4 is present in column B between 12/1/2004
and
12/31/2004.

HELP!!!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Min and Max Dates in Range that Contains Zeroes, Dates, and Number Ezra[_2_] Excel Discussion (Misc queries) 5 August 25th 09 07:54 PM
Identifying unique dates in a range of cells containing dates... cdavidson Excel Discussion (Misc queries) 4 October 13th 06 03:30 PM
Identifying unique dates within a range of cells containing dates cdavidson Excel Discussion (Misc queries) 0 October 12th 06 08:19 PM
How do I find the earliest dates in a range of dates? JJ Excel Worksheet Functions 3 May 16th 06 09:36 AM
How to count dates within a certain range in a column with mutiple date range entries Krisjhn Excel Worksheet Functions 2 September 1st 05 01:59 PM


All times are GMT +1. The time now is 07:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"