Forum Discussion
Anonymous
Jun 12, 2019Setting one fixed format of date in Excel Cells
Hello there, I'm trying to set only one format of date acceptable into excel cells. In no instance a user shall feed in a different format of a date or even if he/she does, Excel sheet must be ab...
- Jun 13, 2019
Deleted Here's en example using this code.
JKPieterse
Jun 12, 2019Silver Contributor
This is far from simple to make absolutely 100% secure, as it is easy to break a conditional formatting rule by a simple copy and paste.
One way to make pasting harder is by merging two cells next to each other before setting up the Validation on the merged cells, unlocking the merged cell (and setting a date format) and then protecting the worksheet.
One way to make pasting harder is by merging two cells next to each other before setting up the Validation on the merged cells, unlocking the merged cell (and setting a date format) and then protecting the worksheet.
Anonymous
Jun 12, 2019Thanks, firstly, is t.hat even achievable in Excel? I mean a standard date format set for a column and users entering data whatsoever ways will be autocorrected to the fixed format.
- JKPieterseJun 12, 2019Silver ContributorMore or less, if it is entered in a form Excel can turn into a date it will do so, but you risk Excel getting it wrong of people type dates in the wrong day/month order. There is no fool-proof way to avoid that other than by using VBA I think. Even then there are always ways around it. Database applications are much better equipped for a task like this.
- AnonymousJun 12, 2019
So it looks like I'll have to depend on VBA for this. Any idea what the code would probably look like?
- JKPieterseJun 13, 2019Silver Contributor
Deleted Here's en example using this code.