You can't clear the Office clipboard with that vba code. It works for another kind of clipboard.
I'm not entirely sure you can clear it via vba. The simplest solution would be to disable it altogether.
Cell A1 contains the date
Here is the formula in another cell
=ROUNDUP((DAY(A1)+WEEKDAY(DATE(YEAR(A1),MONTH(A1),0)))/7,0)
This assumes Sunday is first day of the week (which is how Excel calendar works).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.