View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pecoflyer[_222_] Pecoflyer[_222_] is offline
external usenet poster
 
Posts: 1
Default How to set the function - countif?


Hi,
Try =SUMPRODUCT((MONTH(A7:A10)=MONTH(b1))*(DAY(A7:A10) =DAY(b1)))


Eric;268242 Wrote:
Does anyone have any suggestions on how to set the function - countif?
There is a list of date under column A, and there is a given date in
cell B1,
I would like to count the date only match the month and day without
concerning the year, and return the number in cell B2.
For example,
Under column A,
11-Dec-2008
13-Jun-2007
14-Apr-2008
14-Apr-2006
The given date is 14-Apr-2003 in cell B1, and it should return 2 in
cell B2,
because
14-Apr-2008 and 14-Apr-2006 match the given date 14-Apr-2003 in term of
month and day.
Does anyone have any suggestions on how to set the formula?
Thanks in advance for any suggestions
Eric




Adapt the range to your needs ( ranges like B:B are not possible in xl
versions before 2007)


--
Pecoflyer

Cheers -
*'Membership is free' (http://www.thecodecage.com)* & allows file
upload -faster and better answers

*Adding your XL version* to your post helps finding solution faster
------------------------------------------------------------------------
Pecoflyer's Profile: http://www.thecodecage.com/forumz/member.php?userid=14
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=74851