Hello...
How would I set up an Excel worksheet to clear designated fields automatically on a specific day of the week -- Sunday for example ?
Thanks !!
what exactly do you mean ?
The fields (cells) will simply have either numbers or dollar values that will be input by users once a week and saved on the server.
Suppose the range of fields you want to clear is B2:B3 for instance, and you want to have it clear on Sunday when the workbook is opened but not on the other days, a possible solution is as follows.
[1] Create a macro named Autpen(). The name as such is a requirement.
[2] Edit the macro :
Sub Autpen()
If WeekDay(Now()) = 1 Then '1 for Sunday
Range("B2:B3".ClearContents
End If
End Sub
[3] Range ("B2:B3" and day-of-week (1 for Sunday, 2 for Monday etc) are parameters you have to adapt to your worksheet structures and timing requirement.
[4] The macro will be auto-executed once the workbook is open and does the job as described.
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.