converting string of numbers into date

spacecaptainsuperguy

Board Regular
Joined
Dec 30, 2004
Messages
202
Office Version
  1. 365
Platform
  1. Windows
I have a report that dumps into excel with the date in this format:

20060919

for Sept 19, 2006.

I'm trying to create a quick macro to convert this column of data into a usable date format.

I've tried a few different things but I can't seem to make excel understand that I'm trying to get a DATE format out of it.

Any ideas?

thanks in advance
SpaceCap
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
No need for a macro.

Highlight your range and goto Data-->Text to Columns-->Next-->Next-->Column Data Format-->Date-->YMD-->Finish.

HTH,

Smitty
 
Upvote 0
Thanks a lot. those are both very easy solutions. I knew I had to be missing something easy.

I had tried the text to columns, but did not try the YMD formatting option.

thanks again.

SpaceCap
 
Upvote 0

Forum statistics

Threads
1,214,262
Messages
6,118,551
Members
448,835
Latest member
Profast123

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