dates arent working properly

bigdan

Well-known Member
Joined
Oct 5, 2009
Messages
840
Office Version
  1. 2013
Platform
  1. Windows
I have a number of dates in col A.
If I copy the cell and paste value I get a number like 43566, which I'd expect.

But if I write a formula in col B such as =datevalue(A1) I get a #VALUE ! error. Can anyone advise why this might be happening and if I can fix it?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Well, from Excel's built in help on the DATEVALUE function . . .
The DATEVALUE function has one argument, Date_text, and this must be "Text that represents a date in an Excel date format, or a reference to a cell that contains text that represents . . . "
The numeric value 43566 is not text in this context.

Why are you using DATAVALUE in this context ?
Why not just use your calculated value, and format as a date ?

If there is a possibility that the formula that is producing this value may return a date in text format, how about something like
=if(istext([YOUR FORMULA RESULT],DATEVALUE([YOUR FORMULA RESULT]),[YOUR FORMULA RESULT])
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,569
Members
449,038
Latest member
Guest1337

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