#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))
:rolleyes:

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 :confused:

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

Thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,214,981
Messages
6,122,565
Members
449,089
Latest member
Motoracer88

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