Counting Occurences Between Dates
If you're always counting occurrences for an entire month...
try something like this:
A1:A20 contains Customer Names
B1:B20 contains dates
C1: (a customer to search for)
D1: (a date)
This formula counts the occurrences of the customer in C1 where the Col_B date is in the same year and month as the date in D1:
=SUMPRODUCT((A1:A20=C1)*(TEXT(B1:B20,"yyyymm")=TEX T(D1,"yyyymm")))
or if you prefer this method:
=SUMPRODUCT(--(A1:A20=C1),--(TEXT(B1:B20,"yyyymm")=TEXT(D1,"yyyymm")))
Is that something you can work with?
--------------------------
Regards,
Ron (XL2003, Win XP)
Microsoft MVP (Excel)
"Blddrgn700" wrote in message ...
Hi All:
I have data that contains a variety of dates that I have sorted by date. I
am trying to count the nuber of occurences in a given month. EI:
Customer x 1/1/07
Customer x 1/1/07
Customer x 1/4/07
Customer x 1/5/07
Curtomer x 1/31/07
Total occurences for this customer would equal 5.
I have been trying Countif function but it is not returning any value other
than 0 or 1, so I believe that I am missing a step. I have looked through
some of the previous posts but did not see anything that may pertain to what
I am looking for. Thank you in advance for any advice you may offer.
Blddrgn
|