Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default How to find the number of matched date?

Does anyone have any suggestions on how to find the number of matched date?
There are 2 lists of date under column A & B, and there is a given number 2
in cell C1. I would like to determine how many date under column A matched
with the date under column B within a range of error for 2 days, which is
given in cell C1.
For example,

In column A
5 Jan 2007, 8 Jan 2007, 13 Jan, 2007, 20 Jan, 2007, 26 Jan 2007, 29 Jan 2007

In column B
6 Jan 2007, 11 Jan 2007, 16 Jan, 2007, 25 Jan

The matched date under column A within a range of error for 2 days
5 Jan 2007, 8 Jan 2007, 13 Jan, 2007, 26 Jan 2007
There are 4 matched date, then return 4 in cell D1.

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default How to find the number of matched date?

You can add an auxilary column that computers the difference between the 2
dates. Use absolute to make the fomula simpler. Then you can use countif to
sum the appropriate cells

Cell C1 =ABS(A1-B1)
Cell C2 = Abs(A2-B2)
Cell C3 = ABS(A3-B3)


=countif(C1:C3,"<=2")


or something a little bit more fancy for C1
=IF(ABS(B1-A1)<=2,"within 2 days","Not within 2 day")

=countif(C1:C3,"within 2 days")

"Eric" wrote:

Does anyone have any suggestions on how to find the number of matched date?
There are 2 lists of date under column A & B, and there is a given number 2
in cell C1. I would like to determine how many date under column A matched
with the date under column B within a range of error for 2 days, which is
given in cell C1.
For example,

In column A
5 Jan 2007, 8 Jan 2007, 13 Jan, 2007, 20 Jan, 2007, 26 Jan 2007, 29 Jan 2007

In column B
6 Jan 2007, 11 Jan 2007, 16 Jan, 2007, 25 Jan

The matched date under column A within a range of error for 2 days
5 Jan 2007, 8 Jan 2007, 13 Jan, 2007, 26 Jan 2007
There are 4 matched date, then return 4 in cell D1.

Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

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
Find number of unique entries within a date range Gayla Excel Worksheet Functions 2 April 27th 07 02:58 AM
Find number of unique entries within a date range Gayla Excel Worksheet Functions 1 April 25th 07 11:42 PM
Find the row number with a date in it [email protected] Excel Worksheet Functions 3 January 11th 07 07:01 PM
countif formula to find the occurances of a number that is greater than one number but less than another steveo Excel Discussion (Misc queries) 3 July 8th 06 02:04 AM
How do I find total number workdays from a range of date faisalm Excel Worksheet Functions 3 July 4th 06 11:30 PM


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