Sub test()
Application.ScreenUpdating = False
For Each rg In Selection
If Len(rg) = 3 Then rg.Value = Left(rg, 1) & "*" & Right(rg, 1)
If rg Like "*#*" Then For i = 0 To 9: rg.Value = Replace(rg, i, "*"): Next
Next
End Sub作者: coldedge 時間: 2020-7-23 09:54
Sub test111()
With Selection
For i = 0 To 9
.Replace i, "*", Lookat:=xlPart
.Replace StrConv(i, vbWide), "*"
Next i
For Each rg In .Columns(1).Cells
If rg <> "" Then rg.Value = Application.Replace(rg, 2, 1, "*")
Next
End With
End Sub