Can datevalue convert "April 30, 1789" to a date value?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,691
Office Version
  1. 365
Platform
  1. Windows
As I read the DateValue explanation, it should convert text dates to numbers. In the mini-sheet below, I am getting a value error when trying to covert the dates I copied from a website.

What am I doing wrong?

President Rankings.xlsx
BCDEFGH
4#NameBornDiedTerm StartTerm EndYears
51George Washington17321799April 30, 1789March 4, 1801#VALUE!
62John Adams17351826March 4, 1801March 4, 1817#VALUE!
73Thomas Jefferson17431826March 4, 1817March 4, 1829#VALUE!
Sheet2 (2)
Cell Formulas
RangeFormula
H5:H7H5=DATEVALUE([@[Term End]]) - DATEVALUE([@[Term Start]])
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Have a look at this, maybe it's your system settings are different to the date format in the cell

If your system date and time settings follow the mm/dd/yyyy format, then a formula such as =DATEVALUE(“22/6/2000”) will result in a #VALUE! error. But the same formula will display the correct value when the system's date and time is set to dd/mm/yyyy format.
 
Upvote 0
Excel stores the dates as values & it starts from 1-Jan-1900 (which equals =1) and today's date (25-Feb-2024) is stored as 45347. You're getting the errors due to old dates that excel can't recognize. If you change the year in your date April 30, 1789 to April 30, 1989 it should work
 
Upvote 0
From DATEVALUE help

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.
 
Upvote 0
Excel stores the dates as values & it starts from 1-Jan-1900 (which equals =1) and today's date (25-Feb-2024) is stored as 45347. You're getting the errors due to old dates that excel can't recognize. If you change the year in your date April 30, 1789 to April 30, 1989 it should work
Aha! So is there any way I can convert those older dates to numbers?

I found this macro. It looks kinda complicated.


I think it's way past time for M$FT to add a DateValueX (for extended) that goes back at least a couple of thousand years or to whenever reliable dates were being recorded.
 
Upvote 0
@JenniferMurphy various suggestions in the thread in the link below from the other day.

 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top