+ Reply to Thread
Results 1 to 4 of 4

Need help parsing a string

  1. #1
    Forum Contributor
    Join Date
    09-08-2005
    Location
    UK
    MS-Off Ver
    2010
    Posts
    107

    Need help parsing a string

    I've exported a file from Outlook into excel and used this code:

    Please Login or Register  to view this content.
    To get rid of any line spaces and I'm left with:

    Please Login or Register  to view this content.
    I would like to be able to parse this into 3 different columns if I could.

    Can anyone help me with this please?

  2. #2
    Mike Fogleman
    Guest

    Re: Need help parsing a string

    Under the Data menu use Text to Columns. You will want Delimited and then
    select Other and type in #. Click Finish.
    Very similar to the text import wizard except your text is already imported.
    Mike F
    "Daminc" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I've exported a file from Outlook into excel and used this code:
    >
    >
    > Code:
    > --------------------
    > Sub removelinebreaks()
    >
    > Dim lastrow As Long, i As Long
    > Dim first As String, second As String
    >
    > lastrow = Cells(Rows.Count, 2).End(xlUp).Row
    > For i = 2 To lastrow
    >
    > first = Cells(i, "B").Select
    > ActiveCell.Value = WorksheetFunction. _
    > Substitute(ActiveCell.Value, Chr(10), Chr(0))
    > Next i
    >
    > End Sub
    > --------------------
    >
    >
    > To get rid of any line spaces and I'm left with:
    >
    >
    > Code:
    > --------------------
    > 35084#http://www.asite.co.uk#[email protected]
    > --------------------
    >
    >
    > I would like to be able to parse this into 3 different columns if I
    > could.
    >
    > Can anyone help me with this please?
    >
    >
    > --
    > Daminc
    > ------------------------------------------------------------------------
    > Daminc's Profile:
    > http://www.excelforum.com/member.php...o&userid=27074
    > View this thread: http://www.excelforum.com/showthread...hreadid=505254
    >




  3. #3
    Forum Contributor
    Join Date
    09-08-2005
    Location
    UK
    MS-Off Ver
    2010
    Posts
    107
    I followed that but it didn't work as I expected.

    There are nearly 2500 rows.

    I selected them all and followed the instructions.
    All it did was delete everything apart from the 3 numbers on lines 6,7 and 8.
    I thought the formatting might interfere so I formatted all the cells to text but still no joy.

    It even shows this in the preview panel.

    What am I missing

  4. #4
    Forum Contributor
    Join Date
    09-08-2005
    Location
    UK
    MS-Off Ver
    2010
    Posts
    107
    Solved it

    I had deleted the 'new lines' but for some reason it was reading a 'carriage return' so I created this little macro:

    Please Login or Register  to view this content.
    and then applied what you said and it works now.

    Thanks Mike.
    Last edited by Daminc; 01-26-2006 at 11:16 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1