Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Laura
 
Posts: n/a
Default count records meeting three criteria

I am using DCOUNTA to count "records" (rows) in an Excel spreadsheet using
three criteria:
Type ="=Order"
Date =12/1/2005
Date <=12/19/2005

This works fine; however, I want to be able to use a reference to a cell
containing the date, rather than having to enter the date in the DCOUNT
criteria cells. Something like:
Type ="=Order"
Date =$B$1
Date <=$C$1
where B1 contains the start date and C1 contains the end date.

It works if I use Date =$B$1, but it won't do greater than or equal to $B$1.

Suggestions using DCOUNT or any other method would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default count records meeting three criteria

Hi,

You may try the following array formula (Ctrl+Shift+Enter). The data is in
range A2:B4

12/12/1991 12
15/01/1992 13
21/01/1992 12

=SUM(IF((A2:A4=A2)*(A2:A4<=A4),B2:B4))

"Laura" wrote:

I am using DCOUNTA to count "records" (rows) in an Excel spreadsheet using
three criteria:
Type ="=Order"
Date =12/1/2005
Date <=12/19/2005

This works fine; however, I want to be able to use a reference to a cell
containing the date, rather than having to enter the date in the DCOUNT
criteria cells. Something like:
Type ="=Order"
Date =$B$1
Date <=$C$1
where B1 contains the start date and C1 contains the end date.

It works if I use Date =$B$1, but it won't do greater than or equal to $B$1.

Suggestions using DCOUNT or any other method would be greatly appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Laura
 
Posts: n/a
Default count records meeting three criteria

Let me clarify:
The data is in range A4:G400. I want to be able to put two dates at the top
of the spreadsheet in cells B1 and C1 to use in my query. (Basically, I want
to make it easy for an end-user to just type in the dates in one spot to be
used in several separate formulas that use DCOUNTA.)

"Ashish Mathur" wrote:

Hi,

You may try the following array formula (Ctrl+Shift+Enter). The data is in
range A2:B4

12/12/1991 12
15/01/1992 13
21/01/1992 12

=SUM(IF((A2:A4=A2)*(A2:A4<=A4),B2:B4))

"Laura" wrote:

I am using DCOUNTA to count "records" (rows) in an Excel spreadsheet using
three criteria:
Type ="=Order"
Date =12/1/2005
Date <=12/19/2005

This works fine; however, I want to be able to use a reference to a cell
containing the date, rather than having to enter the date in the DCOUNT
criteria cells. Something like:
Type ="=Order"
Date =$B$1
Date <=$C$1
where B1 contains the start date and C1 contains the end date.

It works if I use Date =$B$1, but it won't do greater than or equal to $B$1.

Suggestions using DCOUNT or any other method would be greatly appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default count records meeting three criteria

Use

="="&B1

and

="<="&C1

note that it will display the dates serial number in the cell itself (number
of days since Jan 0 1900) which may confuse your users so you can insert the
text function as well

="="&TEXT(B1,"mm/dd/yy")

and

="<="&TEXT(C1,"mm/dd/yy")


--

Regards,

Peo Sjoblom

"Laura" wrote in message
...
Let me clarify:
The data is in range A4:G400. I want to be able to put two dates at the

top
of the spreadsheet in cells B1 and C1 to use in my query. (Basically, I

want
to make it easy for an end-user to just type in the dates in one spot to

be
used in several separate formulas that use DCOUNTA.)

"Ashish Mathur" wrote:

Hi,

You may try the following array formula (Ctrl+Shift+Enter). The data is

in
range A2:B4

12/12/1991 12
15/01/1992 13
21/01/1992 12

=SUM(IF((A2:A4=A2)*(A2:A4<=A4),B2:B4))

"Laura" wrote:

I am using DCOUNTA to count "records" (rows) in an Excel spreadsheet

using
three criteria:
Type ="=Order"
Date =12/1/2005
Date <=12/19/2005

This works fine; however, I want to be able to use a reference to a

cell
containing the date, rather than having to enter the date in the

DCOUNT
criteria cells. Something like:
Type ="=Order"
Date =$B$1
Date <=$C$1
where B1 contains the start date and C1 contains the end date.

It works if I use Date =$B$1, but it won't do greater than or equal to

$B$1.

Suggestions using DCOUNT or any other method would be greatly

appreciated.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Laura
 
Posts: n/a
Default count records meeting three criteria

It isn't working. With ="="&B1, it just returns 0. (The correct number in
this case should be 11.)

Here is more information:
B1 =12/1/2005
C1 =12/19/2005
A58 =DCOUNTA(Cases!$A$1:$G$897,"Case Number",A53:C54)
A53 Order {field name}
A54 ="=Notice" {value in field Order}
B53 Order Date {field name}
B54 ="="&B1
C53 Order Date {field name}
C54 ="<="&C1

This works if I use:
B54 =12/1/2005
C54 <=12/19/2005

Thanks for your help! I am completely baffled by why this isn't working.

"Peo Sjoblom" wrote:

Use

="="&B1

and

="<="&C1

note that it will display the dates serial number in the cell itself (number
of days since Jan 0 1900) which may confuse your users so you can insert the
text function as well

="="&TEXT(B1,"mm/dd/yy")

and

="<="&TEXT(C1,"mm/dd/yy")


--

Regards,

Peo Sjoblom

"Laura" wrote in message
...
Let me clarify:
The data is in range A4:G400. I want to be able to put two dates at the

top
of the spreadsheet in cells B1 and C1 to use in my query. (Basically, I

want
to make it easy for an end-user to just type in the dates in one spot to

be
used in several separate formulas that use DCOUNTA.)

"Ashish Mathur" wrote:

Hi,

You may try the following array formula (Ctrl+Shift+Enter). The data is

in
range A2:B4

12/12/1991 12
15/01/1992 13
21/01/1992 12

=SUM(IF((A2:A4=A2)*(A2:A4<=A4),B2:B4))

"Laura" wrote:

I am using DCOUNTA to count "records" (rows) in an Excel spreadsheet

using
three criteria:
Type ="=Order"
Date =12/1/2005
Date <=12/19/2005

This works fine; however, I want to be able to use a reference to a

cell
containing the date, rather than having to enter the date in the

DCOUNT
criteria cells. Something like:
Type ="=Order"
Date =$B$1
Date <=$C$1
where B1 contains the start date and C1 contains the end date.

It works if I use Date =$B$1, but it won't do greater than or equal to

$B$1.

Suggestions using DCOUNT or any other method would be greatly

appreciated.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default count records meeting three criteria

In cells B1 and C1, it appears that you've typed in the equals sign
before the date. If you remove those, your formula should work fine.

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
Show top five records based on meeting multiple criteria Joe D Excel Worksheet Functions 4 November 20th 05 11:51 PM
count records which meet filter criteria AKH Excel Discussion (Misc queries) 1 October 31st 05 03:54 PM
Counting unique records with additional criteria [email protected] Excel Worksheet Functions 4 September 27th 05 06:53 PM
Filter Count of Records Retrieved. amkazen Excel Discussion (Misc queries) 2 March 31st 05 10:03 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


All times are GMT +1. The time now is 11:10 AM.

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"