Forum Discussion
JChapman-Cohen
Mar 29, 2023Copper Contributor
Formulas with apostrophe
Hi, I am doing an excel training course and literally copying the formula word for word. Any formula that involves apostrophe comes back as an error. Why is this when it matches what is in my ex...
JoeUser2004
Mar 29, 2023Bronze Contributor
JChapman-Cohen wrote: =DATEVALUE(''12-3-1987'')
But it is even better to use DATE(1987, 12, 3) or DATE(1987, 3, 12), whichever you mean.
And that's the point: 12-3-1987 is ambiguous. Is that Dec 3 or Mar 12?
Moreover, if you "share" (e.g. email) the workbook with someone that uses a different date form, the DATEVALUE formula will either return an error (e.g. if the date is 12-29-1987) or, worse, it will return an unintended date.
JChapman-Cohen
Mar 30, 2023Copper Contributor
Thank you, that's really helpful, i didn't appreciate how the formulas may not work correctly wither when sharing a workbook.