Alt+Enter character
Hi,
Am Mon, 8 Dec 2014 10:38:06 -0800 (PST) schrieb GWC:
What do I type in the REPLACE WITH: box so each right parenthesis is replaced with a right parenthesis followed by a carriage-return character so the result is:
PROD.FTPLIB(CRTUPL01)
PROD.FTPLIB(CRTUPL02)
PROD.FTPLIB(CRTUPL03)
if you replace ")" with ")" Alt0010 you have a new line behind the
string.
Try it with a macro:
Sub Test()
Dim len1 As Long, len2 As Long
With Range("A1")
len1 = InStr(.Value, ")")
len2 = InStr(len1 + 1, .Value, ")")
.Value = Left(.Value, len1) & Chr(10) & _
Mid(.Value, len1 + 1, len2 - len1) & Chr(10) & _
Mid(.Value, len2 + 1)
.WrapText = True
.EntireRow.AutoFit
.EntireColumn.AutoFit
End With
End Sub
Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
|