I came across a strange Excel book at work. When I retrieved a date value from any sheet in that Excel book, that value didn't match the date that it is supposed to represent.
However, the value 42978 doesn't represent 9/1/2021, but 8/31/2017. In fact, if you copied that cell to any cell in any sheet in another book, you would see 8/31/2017 in that cell. On the other hand, that value would always go 9/1/2021 in any cell in the original book. As seen, even though the macros have been disabled, I don't know how it can do that. I can't continue to work with that. Can someone please help me?
I would like to upload that Excel book, but probably can't contractually. And all macros in the book are password protected from editing and deletion, so I can't even see the contents of the macros.
CodePudding user response:
There is an option within Excel which makes use of different date-systems: see https://docs.microsoft.com/en-us/office/troubleshoot/excel/1900-and-1904-date-system
- Open Excel Options
- Goto Advanced
- Scroll down to When calculating this workbook and check/uncheck Use 1904 data system
This should fix your problem.