这是我创建的:
Option Explicit
Sub TestMe()
Dim myCell As Range
Dim myText As String
For Each myCell In Worksheets(1).Range("A1:A10")
If InStr(myCell.Text, "ab") > 0 Then
myText = myCell.Text
myCell = Replace(myText, "ab", "x")
myCell.Value = myText
End If
Next myCell
End Sub
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句