View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
pub pub is offline
external usenet poster
 
Posts: 29
Default sumproduct and weekday?

Ron Rosenfeld wrote in
:



I just noticed something and we need to change this formula.
Otherwise we will wind up with different sized arrays in the month vs
the columns, which will return an error.

For simplicity, I assumed that A1 would always contain the FIRST day
of the month in question. Given that, this **array** formula should
do the trick:

=SUM(TRANSPOSE(WEEKDAY(ROW(INDIRECT(A1&":"&A1+32-DAY(A1+32))))<6)*
(OFFSET(D1,0,0,1,DAY(A1+32-DAY(A1+32)))12)*(OFFSET(D1,0,0,1,DAY(A1+32-
DAY(A1+32)))-12))

--ron


followup
its July and its working awesome.
thanks