Thursday, October 2, 2014

Week Number of a month

=IF(MONTH(F2)=1,WEEKNUM(F2),IF(WEEKDAY(EOMONTH(F2, -1)+1) = 1, WEEKNUM(F2)-WEEKNUM(EOMONTH(F2,-1)), WEEKNUM(F2)-WEEKNUM(EOMONTH(F2,-1))+1))

Assumption:

  1. Sunday is the first day of a week
  2. Week days are represented by Sun = 1 ... Sat = 7
If Sunday is not the first day of a week, change the number 1 in red to desired day number.
I tried this in MSExcel 2013.

No comments: