View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default calendar date calculation

If your data is limited to one year:

=SUMPRODUCT(--(B2:B12="m"))

=SUMPRODUCT(--(B2:B12="f"))

If you want all above for a given calendar year:

=SUMPRODUCT(--(B2:B366="f"),--(YEAR(A2:A366)=2007))

For specific date ranges (1st to 10th Jan 2007):

=SUMPRODUCT(--($B$2:$B$366="f"),--($A$2:$A$366=DATE(2007,1,1)),--($A$2:$A$366<=DATE(2007,1,10)))

HTH

"bk" wrote:

In custody dispute. Want to calculate number of overnights child spends with
me. Also want to put future custody schedule on worksheet calendar to
calculate number of future overnights. Want to add certain holidays and
vacation schedule to custody cal. Is there a template for calendars that can
calculate sum? I use Excel 2000. Is there an add in to excel that can
help.? Now I have year of dates in column A and Colum B has letter m for
mother and f for father. Next step is to get summ of each letter over 365
days. Then next step is to add an occasional odd holiday like school winter
and spring break and thanksgiving. Thanks.