W
wolfteeth
Location:
Posts: 1
Limitation of Find and Replace Text in Excel
I am trying to reformat some data in Excel to make some downloade
information more easily readable. The information to be manipulated i
a. In the download the different items of History are joined togethe
with a | delimiter to produce a long wrap around string.
I have an Excel macro which finds the | delimiter in the string an
converts this to a line break (i.e. vbLF or Alt+Enter). The expecte
result is that wherever | occurs, subsequent text is pushed to a ne
line.
I have found that the macro worked perfectly if the length of th
string does not exceed 911 characters. It failed if the length of th
string exceeded 911 characters.
would appreciate it if you could help investigate this further t
determine if there is something in our macro which has triggered th
lower limits.
I attach the following:
Sub Macro1()
ActiveWindow.ActivateNext
Cells.Select
Selection.Replace What:="|", Replacement:=vbLf, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Look forward to your advice after testing
Best regard
Attachment filename: reformatter2.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=69731
Posts: 1
Limitation of Find and Replace Text in Excel
I am trying to reformat some data in Excel to make some downloade
information more easily readable. The information to be manipulated i
a. In the download the different items of History are joined togethe
with a | delimiter to produce a long wrap around string.
I have an Excel macro which finds the | delimiter in the string an
converts this to a line break (i.e. vbLF or Alt+Enter). The expecte
result is that wherever | occurs, subsequent text is pushed to a ne
line.
I have found that the macro worked perfectly if the length of th
string does not exceed 911 characters. It failed if the length of th
string exceeded 911 characters.
would appreciate it if you could help investigate this further t
determine if there is something in our macro which has triggered th
lower limits.
I attach the following:
Sub Macro1()
ActiveWindow.ActivateNext
Cells.Select
Selection.Replace What:="|", Replacement:=vbLf, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub
Look forward to your advice after testing
Best regard
Attachment filename: reformatter2.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=69731