see NETWORKDAYS function in XL Help, eg
B2: =NETWORKDAYS(EOMONTH(A2,-1)+1,A2,holidays)
copied down
where holidays is a named range containing public holidays to be excluded in addition to weekends - if not required omit.
If you're working the other way around, which in hindsight I think you are, then see WORKDAY function (works along similar lines to above)
A2: =WORKDAY(DATE(2009,12,0),B2,holidays)
copied down
where B2 contains your workday flag - use of named range as before and optional as before
Bookmarks