format help

juster21

Well-known Member
Joined
Jun 3, 2005
Messages
867
I have dates as yyyymmdd stored as text. I'm trying to convert them to mmddyyyy using =text(datevalue(A1),"mmddyyyy") but I get an error (#value!).

Can anybody help?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Select the column with the dates.

Goto Data>Text to columns...

On the 3rd step chose Date for Column data format and YMD from the dropdown.

You should now have 'real' dates which you can format as you like.
 
Upvote 0
does it matter if these cells start out with the "numbers stored as text" warning?
 
Upvote 0
I don't know that one, I'm on 2000.

Did you try my suggestion?

I'm assuming you've got dates that Excel isn't recognising as such and wish to change them to 'real' dates.
 
Upvote 0
I've got a number such as 20051213 with the green flag in the corner which says "the number in this cell is formatted as text". I tried your suggestion which does change it to the computer recognized number as a date (35694) but then the conversion doesn't work.
 
Upvote 0
What do you mean 'the conversion doesn't work'?

Do you mean when you try the formula you posted?

If you do, why do you need the formula? You now have a 'real' date value which you can format as you like with Cells>Format...
 
Upvote 0
Thanks Norie.

Have you ever tried something once and it didn't work and then try it again and it does? Well, it worked the second time so, no, I don't need to use my formula. Thanks again!!
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,688
Members
448,978
Latest member
rrauni

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