View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Daminc[_41_] Daminc[_41_] is offline
external usenet poster
 
Posts: 1
Default Need help parsing a string


Solved it :)

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


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))
ActiveCell.Value = WorksheetFunction. _
Substitute(ActiveCell.Value, Chr(13), Chr(0))
Next i

End Sub
--------------------


and then applied what you said and it works now.

Thanks Mike.


--
Daminc
------------------------------------------------------------------------
Daminc's Profile: http://www.excelforum.com/member.php...o&userid=27074
View this thread: http://www.excelforum.com/showthread...hreadid=505254