Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Counting Records Between Two Dates

Hi,

I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates.

Can somebody please help?

Best regards

Steve
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Counting Records Between Two Dates

Try it like this:
=SUMPRODUCT((D1:D999=--"1 Jan 2008")*(D1:D999<=--"31 Dec
2008")*(TRIM(G1:G999)="apples"))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,400 Files:356 Subscribers:53
xdemechanik
---
"Stevo" wrote:
I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates.

Can somebody please help?

Best regards

Steve

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Counting Records Between Two Dates

Try it this way:

=SUMPRODUCT((D1:D999=--"1/1/2008")*(D1:D999<=--"31/12/2008")*(G1:G999="apples"))

or like this:

=SUMPRODUCT((D1:D999=DATE(2008,1,1))*(D1:D999<=DA TE(2008,12,31))*(G1:G999="apples"))

Hope this helps.

Pete

On Jul 29, 2:18*pm, Stevo wrote:
Hi,

I have a long list of records all on the same worksheet. *In column d are
the categories I want to search on (e.g. apples). *I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. *I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates. *

Can somebody please help?

Best regards

Steve


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Counting Records Between Two Dates

=SUMPRODUCT((D1:D999)=DATE(2008,1,1))*((D1:D999)< =DATE(2008,12,31))*(G1:G999="apples")

Regards,
Stefi

€žStevo€ť ezt Ă*rta:

Hi,

I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates.

Can somebody please help?

Best regards

Steve

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 52
Default Counting Records Between Two Dates

hi Stevo
Try
=SUMPRODUCT((D1:D999=--"1/1/2008")*(D1:D999<=--"31/12/2008")*(G1:G999="apples"))

Regards,
Pedro J.

Hi,

I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates.

Can somebody please help?

Best regards

Steve



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 209
Default Counting Records Between Two Dates

=SUMPRODUCT(--((D1:D999)=Datevalue("1/1/2008")),--((D1:D999)<=Datevalue("31/12/2008")),--(G1:G999="apples"))
--
Hope this helps.
Thanks in advance for your feedback.
Gary Brown


"Stevo" wrote:

Hi,

I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates.

Can somebody please help?

Best regards

Steve

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Counting Records Between Two Dates

really appreciate the help - overwhelming response. I picked Pete Uk's
solution at random and it worked great. It seems that one of the differences
between Pete's suggestion and my original attempt was hte inclusion of dashes
(-----), can anybody please tell me what do these represent in the sum
product function?

Best regards

Steve

"Stevo" wrote:

Hi,

I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these dates.

Can somebody please help?

Best regards

Steve

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Counting Records Between Two Dates

The way you had it you were comparing D1:D999 with 1/1/2008, which Excel
interprets as 1 divided by 1 divided by 2008. To overcome this you need to
put 1/1/2008 within quotes, but then this will not be in the correct format.
The double unary minus, or --, converts this into a value, but you could
have used *1, or +0, or even VALUE( ... ) to convert it. The other formula I
gave you used the DATE function, as another way to achieve the result.

The other differences with your formula were the use of brackets.

Hope this helps.

Pete


"Stevo" wrote in message
...
really appreciate the help - overwhelming response. I picked Pete Uk's
solution at random and it worked great. It seems that one of the
differences
between Pete's suggestion and my original attempt was hte inclusion of
dashes
(-----), can anybody please tell me what do these represent in the sum
product function?

Best regards

Steve

"Stevo" wrote:

Hi,

I have a long list of records all on the same worksheet. In column d are
the categories I want to search on (e.g. apples). I am tryoing to found
out
how many apples between 01/01/2008 and 31/01/2008. I have tried

=SUMPRODUCT((D1:D999)=1/1/2008)*((D1:D999)<=31/12/2008)*(G1:G999="apples")

This returns 0 even though there are apples in column g between these
dates.

Can somebody please help?

Best regards

Steve



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
Counting records f(x) two columns jkl Excel Discussion (Misc queries) 6 May 8th 07 05:39 PM
Help a novice with counting number of records TheBoz Excel Discussion (Misc queries) 3 November 14th 06 04:20 AM
counting records [email protected] Excel Worksheet Functions 8 September 14th 06 09:38 PM
Counting unique records yhtak Excel Worksheet Functions 6 June 16th 06 02:34 PM
Counting records within a month JoAnn New Users to Excel 1 November 22nd 05 06:15 PM


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