LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Counting number of rows between date range and meeting 2 string criteria

I would like to count the number of occurrences within a date range for
which the category belong to "BOOK" and "PRI", data examples as show below:

Dates Categories
01-Mar-09 VCD
08-Feb-09 CDO
08-Feb-09 CDO
08-Feb-09 CDO
23-Nov-08 BOOK
08-Feb-09 BOOK
08-Feb-09 BOOK
06-Jul-08 PRI

I am using Excel 2007
Dates is the named Range for column A, and Categories the named range for
Column B.
I had tried this formula, results in #VALUE!
=SUM(COUNTIFS(Dates,"="&DATE(2008,1,1),Categories ,"BOOK"),COUNTIFS(Dates,"="&DATE(2008,1,1),Catego ries,"PRI"))
The formula Countifs(Dates,"="&Date(2008,1,1),Categories,"BOO K") is already
giving #VALUE! Is it that the criteria must be of the same datatype?
If I count just 1 column, it is working fine, example:
=COUNTIFS(Dates,"="&DATE(2008,1,1),Date,"<"&DATE( 2008,2,1)) works fine, and
=SUM(COUNTIF(Categories,"BOOK"),COUNTIF(Categories ,"PRI")) works OK.

I now using the Autofilters on the 2 columns to do the counting -
subtotal(3, A1:A1). It becomes tedious when I need to do a few combination
of date range and categories.

Thanks in advance.

Sing Chung

 
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 a number of cells with 2 range criteria Garf[_2_] Excel Discussion (Misc queries) 3 June 19th 09 09:43 AM
FInding the largest number in a range meeting a criteria Babymech Excel Discussion (Misc queries) 4 February 20th 09 09:25 PM
Sum within a date range meeting one other criteria [email protected] Excel Worksheet Functions 3 January 28th 07 04:53 AM
Counting distinct entries based on meeting month & year criteria jennifer Excel Worksheet Functions 3 February 9th 06 01:56 PM
Counting the number of cells meeting conditional formating criteria Jeff Excel Worksheet Functions 4 July 9th 05 01:18 AM


All times are GMT +1. The time now is 06:55 PM.

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

About Us

"It's about Microsoft Excel"