Oct 09 2022 10:45 AM
I'v tried setting cell format to Text, any thoughts?
Oct 09 2022 11:17 AM
From the help article.
Date_text Required. Text that represents a date in an Excel date format, or a reference to a cell that contains text that represents a date in an Excel date format. For example, "1/30/2008" or "30-Jan-2008" are text strings within quotation marks that represent dates.
Using the default date system in Microsoft Excel for Windows, the date_text argument must represent a date between January 1, 1900 and December 31, 9999. The DATEVALUE function returns the #VALUE! error value if the value of the date_text argument falls outside of this range.
Oct 09 2022 11:28 AM
What are you using ar argument for the DATEVALUE function?
And what is your system date format? M/D/Y as in the USA, D/M/Y as in many European countries, or Y/M/D as in the ISO date format?
Oct 09 2022 11:56 AM
Oct 09 2022 12:03 PM
If the cell used as argument already contains a "real" date, there is no point in using DATEVALUE.
DATEVALUE expects a text string that looks like a date as argument.
If A1 contains the date 10/09/22, =DATEVALUE(A1) will return #VALUE!
If A1 contains a text value that looks like 10/09/22, =DATEVALUE(A1) will return the date 10/09/22.
Oct 09 2022 12:09 PM
Oct 09 2022 12:17 PM
Oct 09 2022 12:17 PM
Excel stores dates as numbers, so you can sort them directly, without converting them to numbers.
For example:
10/09/2022 is stored as 44843
10/10/2022 is stored as 44844
10/11/2022 is stored as 44845
etc.
You can check this by setting the number format of a range with dates temporarily to General.
(Don't forget to restore the date format afterwards)
Jul 16 2023 11:26 AM
@Jonathan_2112 - this is utterly stupid but the only way to fix this (for me, in canada) is to change regional language and date settings (on the PC) to English (USA).
#microsoftbugs