Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
rbdude
 
Posts: n/a
Default Count With Date Problem

I have the following matrix and I want to count the number of rows where the
string "DOG" occurs anywhere within column A cells and the date in column B
is less than today's date (assume it is 6/7/05). In this example, I would
expect the result to be 2 (for matches in Row 1 and row 4.

Row 1 DOG 1/1/05
Row 2 DOG, CAT 9/1/06
Row 3 CAT 1/1/05
Row 4 DOG 4/1/05
Row 5 DOG 10/1/05

I tried somthing like
{=SUM(ISNUMBER((SEARCH("dog",A1:A5,1)))*TODAY()<B1 :B5}, but it doesn't work.
I did enter Ctl+Shift+Enter after entering the formula.

Does anyone know how I can correct this forumula? Thanks in advance.


  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

=SUMPRODUCT(--(ISNUMBER(SEARCH("dog",A1:A15))),--(ISNUMBER(B1:B15)),--(B1:B15<TODAY()))

Biff

"rbdude" wrote in message
...
I have the following matrix and I want to count the number of rows where
the string "DOG" occurs anywhere within column A cells and the date in
column B is less than today's date (assume it is 6/7/05). In this example,
I would expect the result to be 2 (for matches in Row 1 and row 4.

Row 1 DOG 1/1/05
Row 2 DOG, CAT 9/1/06
Row 3 CAT 1/1/05
Row 4 DOG 4/1/05
Row 5 DOG 10/1/05

I tried somthing like
{=SUM(ISNUMBER((SEARCH("dog",A1:A5,1)))*TODAY()<B1 :B5}, but it doesn't
work. I did enter Ctl+Shift+Enter after entering the formula.

Does anyone know how I can correct this forumula? Thanks in advance.



  #3   Report Post  
RagDyer
 
Posts: n/a
Default

Say that you designate two cells to contain the date and the string, so that
they can be easily changed without having to revise the formula.

D1 = date
D2 = string

=SUMPRODUCT((ISNUMBER(SEARCH(D2,A1:A100))*(B1:B100 <D1)))
--
HTH,

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


"rbdude" wrote in message
...
I have the following matrix and I want to count the number of rows where

the
string "DOG" occurs anywhere within column A cells and the date in column

B
is less than today's date (assume it is 6/7/05). In this example, I would
expect the result to be 2 (for matches in Row 1 and row 4.

Row 1 DOG 1/1/05
Row 2 DOG, CAT 9/1/06
Row 3 CAT 1/1/05
Row 4 DOG 4/1/05
Row 5 DOG 10/1/05

I tried somthing like
{=SUM(ISNUMBER((SEARCH("dog",A1:A5,1)))*TODAY()<B1 :B5}, but it doesn't

work.
I did enter Ctl+Shift+Enter after entering the formula.

Does anyone know how I can correct this forumula? Thanks in advance.



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
Using sumproduct to count number by date JerryS Excel Worksheet Functions 2 June 6th 05 10:37 PM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM
How do I count cells in a column of dates between date ranges? Andrew82 Excel Worksheet Functions 2 April 14th 05 09:59 AM
Count the occurances of a month in a range of date fields Keith Brown Excel Worksheet Functions 8 March 14th 05 11:24 AM
I have a list of dates that I need to count based on a date range ejb030353 Excel Worksheet Functions 4 November 24th 04 02:27 PM


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