Hello.
I try to convert the date 2007-01-01 in cell E3 with datevalue(E3).
It does return a #Value! error. Any ideas about what can be wrong?
Cell E3 is formatet as a date.
/Anders
Hello.
I try to convert the date 2007-01-01 in cell E3 with datevalue(E3).
It does return a #Value! error. Any ideas about what can be wrong?
Cell E3 is formatet as a date.
/Anders
Datevalue() converts a date entered as a text string to a numeric date.
So if E3 is already formatted as a date, then you don't need datevalue()
What are you trying to accomplish?
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Hello.
I need to convert 2007-01-01 to a numeric value that excel uses to determain which date it is.
2007-01-01 - -> 39083
How do I do that?
/Anders
Excel already uses those 5 digit numbers when dealing with dates. If you change the format of the cell to General you will see that it displays that 5-dig number. So adding 2 cells with dates in them will add correctly.....
Still not sure if your original date is true date or a text string...try =E3+0 this will definitely ensure it is converted to a true date value. Then go to Format|Cells and pick General.
I would try this formula
=DATEVALUE(MONTH(E3) & "/" & DAY(E3) & "/" & YEAR(E3))
Denis![]()
Please always attach the sample workbook without sensitive information when asking for help
To add a module
Press Alt + F11 (this is the Visual Basic Environment)
Insert Menu, select Module
Past code there
Close Visual Basic Environment (X)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks