ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sunday Function (https://www.excelbanter.com/excel-worksheet-functions/92561-sunday-function.html)

Sunday Function

Sunday Function
 
Please help me with formula to count : Sundays or Weeks per Month (Year 2006) ?

Ardus Petus

Sunday Function
 
Assuming you have Month no. (1-12) in A2 thru A13,
=INT((DATE(2006,A2+1,0)-DATE(2006,A2,1)-(6-WEEKDAY(DATE(2006,A2,1),3)))/7)+1
and copy down

HTH
--
AP

"Sunday Function" <Sunday a écrit dans
le message de news:
...
Please help me with formula to count : Sundays or Weeks per Month (Year
2006) ?




Bob Phillips

Sunday Function
 
With the month number in A1

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(TODAY()),A1,1)&":" &DATE(YEAR(T
ODAY()),A1+1,0))))=1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sunday Function" <Sunday wrote in
message ...
Please help me with formula to count : Sundays or Weeks per Month (Year

2006) ?



Bob Phillips

Sunday Function
 
If you have a date in A1, you can have a simpler formula

=4+(DAY(A1-DAY(A1)+35)<WEEKDAY(A1-DAY(A1)-1))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Sunday Function" <Sunday wrote in
message ...
Please help me with formula to count : Sundays or Weeks per Month (Year

2006) ?




All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com