View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Can I get no of Sundays and working days of the month?

On Mon, 13 Apr 2009 11:33:13 -0700, Narnimar
wrote:

I have a date in a1 as 13/04/2009. Can I get a formula to return total no of
Sundays in this month of the date? Also Can I get total no of days except
Sundays?
Thanks,
Narnimar


Total number of Sundays:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1-DAY(A1)+1
&":"& A1-DAY(A1)+32-DAY(A1-DAY(A1)+32))))=1))

Number of days except Sundays:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1-DAY(A1)+1
&":"& A1-DAY(A1)+32-DAY(A1-DAY(A1)+32))))<1))

--ron