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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
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.
 

juster21

Well-known Member
Joined
Jun 3, 2005
Messages
867
does it matter if these cells start out with the "numbers stored as text" warning?
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
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.
 

juster21

Well-known Member
Joined
Jun 3, 2005
Messages
867

ADVERTISEMENT

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.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
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...
 

juster21

Well-known Member
Joined
Jun 3, 2005
Messages
867
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!!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,022
Messages
5,834,994
Members
430,331
Latest member
Syed Yasir Hannan

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
Top