excel 2016搜索并替换换行符

时间:2016-05-08 11:10:05

标签: excel replace excel-2016

我正在寻找一个解决方案如何在excel 2016中搜索和替换中断。我尝试搜索

\n

以及

ctrl + j

这对我不起作用。

1 个答案:

答案 0 :(得分:0)

Excel中有两个硬回车,请尝试:

Sub ThePointOfNoReturn()
    Dim s1 As String, s2 As String, s3 As String

    s1 = Chr(10)
    s2 = Chr(13)
    s3 = "whatever"
    Cells.Replace What:=s1, Replacement:=s3
    Cells.Replace What:=s2, Replacement:=s3
End Sub

修改#1:

查找"其他" 的回复由Chris Neilsen在此处回答:HERE