Seperate date from text

D

dnr

Hello!

I really appreciate any help on this. I am sent files weekly that contain a
column with the a date and text and I need to seperate them into two columns.
Examples of values in the columns are:
05/04/2008 day
05/05/2008 night
05/07/2008 day
05/08/2008 day

etc.

The text values are always only day or night but the dates are constantly
changing. I already have a macro that will put day or night in a column next
to it based on the cell value but the original column remains the same. Any
suggestions on how to write a macro to do this?

Thanks
 
D

Don Guillett

Have you tried
Data>text to columns>fixed width (if all dates are the same length)
 
T

TomPl

If you want to do it in code you could use language like this:

Sub testit()

ActiveCell = CDate(Left(ActiveCell, 10))

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top