I made a script allowing to automatically add the stats of the week, but I have an issue to display the date of the Monday of the current week.
Given 2017-06-26
, on my laptop I get 2017-06-26
which is correct, but on the other laptop I get 2017-06-03
...
How to solve this? I tried to put the same language on both machines, but same problem. Furthermore, when I use TODAY
and WEEKDAY
independently, the values of the 2nd computer are the same as for the first computer, its only occurs when I want to calculate the date of the first day of the current week.
Here is the relevant code:
Range("A" & i + 5).Formula = "=TODAY()-WEEKDAY(TODAY(),2)+1" '"week "[$-en-US]mmmm jj"th"
Range("A" & i + 5).NumberFormat = """week ""[$-en-US]mmmm dd""th"""