Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kwong
 
Posts: n/a
Default sum item within certain date range

hello everyone,

Good day, my question:

I need to calculate the number of times an item appears within a date
range. Meaning, 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.

I had tried some solutions given:

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

or

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

but unfortunately it doesn't work...
anyone can help me with this? Thank you for your time for reading my post....
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

apart from the second one having a mistake in the range (which I assume is a
typo), they both work for me.

Are you sure that they are actually dates, not text? Try this which might
show it

=SUMPRODUCT((--(A1:A100)=DATE(2005,3,1))*(--(A1:A100)<=DATE(2005,3,31))*(UP
PER(B1:B100)="A"))

other than that post some data examples.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"kwong" wrote in message
...
hello everyone,

Good day, my question:

I need to calculate the number of times an item appears within a date
range. Meaning, 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.

I had tried some solutions given:

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

or


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

but unfortunately it doesn't work...
anyone can help me with this? Thank you for your time for reading my

post....


  #3   Report Post  
RagDyeR
 
Posts: n/a
Default

It's usually easier to assign cells to accept your variables.
Revisions can then be accomplished more easily without changing the formula
itself, and entering dates is simplified.

Start date in C1,
End date in C2,
Symbol to count in C3,

=SUMPRODUCT((A1:A100=C1)*(A1:A100<=C2)*(B1:B100=C 3))

I don't believe that you need the Upper() function, since nothing here is
case sensitive.

--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"kwong" wrote in message
...
hello everyone,

Good day, my question:

I need to calculate the number of times an item appears within a date
range. Meaning, 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.

I had tried some solutions given:

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

or

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

but unfortunately it doesn't work...
anyone can help me with this? Thank you for your time for reading my
post....


  #4   Report Post  
Paul Sheppard
 
Posts: n/a
Default


kwong Wrote:
hello everyone,

Good day, my question:

I need to calculate the number of times an item appears within a date
range. Meaning, 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.

I had tried some solutions given:

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

or

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

but unfortunately it doesn't work...
anyone can help me with this? Thank you for your time for reading my
post....



Hi kwong

You could try a pivot table

Paul


--
Paul Sheppard
------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=395751

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
Match function...random search? Les Excel Worksheet Functions 10 July 28th 05 11:54 AM
Help! Selecting data according to date range redbna Excel Discussion (Misc queries) 0 June 8th 05 06:58 PM
If formula for date range rediproof Excel Discussion (Misc queries) 9 May 28th 05 04:59 AM
Change the low date range regional setting. genesearcher Excel Discussion (Misc queries) 1 March 17th 05 06:51 PM
SUMPRODUCT with date range question Rob V Excel Discussion (Misc queries) 1 January 31st 05 03:55 PM


All times are GMT +1. The time now is 11:49 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"