Re: Separating text and dates.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You could use a couple of helper columns:

With that info in B1, you could get the text portion with:
=LEFT(B1,LEN(B1)-11)

And the date portion with:
=DATE(RIGHT(B1,4),MID(RIGHT(B1,10),4,2),MID(RIGHT(B1,10),1,2))



Mark K wrote:

Hi all.

I have data imported from a csv file where one column (B) contains
cells with text and date in the format of "XXXX dd/mm/yyyy". Originally
was using text to columns to split these without a problem, using the
space as the separator. But recently I've been coming across some where
there is a space inside the text which is causing problems.

My current solution is to first search and replace the space in the
text with a hyphen then do the text to columns. So far I have the macro
seaching for and replacing 15 different text entries.

Just wondering if anyone had an easier way to do this?

I used to count back a fixed number of characters from the right (can't
remember exactly how I did it) but then I found it was reversing the day
and the month when separated.

NOTE: My current method works, just looking for a more efficient way of
doing it.

TIA

--
Mark K
------------------------------------------------------------------------
Mark K's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=14117
View this thread: http://www.excelforum.com/showthread.php?threadid=573763

--

Dave Peterson
.



Relevant Pages

  • cut editing with virtualdub?
    ... Virtualdub allows user to mark the start and ending of a video clip and ... output only that portion. ... Is it possible to mark several sections to NOT output, ...
    (rec.video.desktop)
  • Re: DVR Edit help
    ... > DVR Edit will mark in and mark out, ... My copy has, on the upper right, segment arrows, a 0, and an ... > a commercial or something else unwanted, and delete that portion only. ... > I not understanding/using DVR edit correctly? ...
    (microsoft.public.windows.mediacenter)
  • vi question, file marking
    ... I want to mark a portion of text, ... will delete the next five lines and place them in to named buffer a. ... got about 50 lines i want to move, and counting them line by line is getting ...
    (comp.unix.bsd.freebsd.misc)
  • Re: vi question, file marking
    ... dave wrote: ... I want to mark a portion of text, ... that register rather than in the anonymous register. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Nested IF statements - simplify?
    ... portion. ... "Mark K." ... Do Until Trim) = theRunner ... Dave Peterson ...
    (microsoft.public.excel.programming)