#VALUE! Error when using DateValue function

MarkVMcCullagh

Board Regular
Joined
Oct 22, 2002
Messages
72
Hi there

The function in use is:
=DATEVALUE(D5)
and it returns #VALUE!

Cell D5 Contains:
3/19/2005

My suspicion is that this occurs because the file originated in the US where the date format is M/D/YYYY whereas here in the UK our date format is D/M/YYYY. The data I receive in the

I can create a workaround but frankly I'd rather it was fixed permanently. My workaround is rather cumbersome and I have lots of spreadsheets to update:
=DATEVALUE(MID(D5,FIND("/",D5)+1,FIND("/",D5,FIND("/",D5)+1)-FIND("/",D5)-1)&"/"&LEFT(D5,FIND("/",D5)-1)&"/"&RIGHT(D5,4))
:roll:

The reason the above is so cumbersome is that the number of digits in the days and months vary.

Maybe someone can tell of an easier solution :-?

I'm using Microsoft Excel 2000 (9.0.7616 SP-3) set up for British date formats.

Thanks
 

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
It appears to be an international issue as I found a date of "7/7/2005" and tested the DATEVALUE function on it and it worked but for other dates which were obviously American format eg 9/13/2005 in the same file the #VALUE! continues to appear.
 
Upvote 0

Forum statistics

Threads
1,224,351
Messages
6,178,060
Members
452,822
Latest member
MtC

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