Dim c As Range, w As Range, rr As Integer, ll As Integer, cutleft As String, cutright As String, x As String
x = Application.InputBox("指定範圍,如:A1:B12", "指定範圍")
For Each c In Range(x)
Set w = c
ll = (InStr(w, "("))
If ll 0 Then
cutleft = Right(w.Value, Len(w.Value) - ll)
rr = (InStr(cutleft, ")"))
cutright = Left(cutleft, rr - 1)
c = cutright
Else
GoTo t
End If
t: Next c
MsgBox ("操作已完成")
End Sub
Dim c As Range, w As Range, rr As Integer, ll As Integer, cutleft As String, cutright As String, x As String
x = Application.InputBox("指定範圍,如:A1:B12", "指定範圍")
For Each c In Range(x)
Set w = c
ll = (InStr(w, "("))
If ll 0 Then
cutleft = Right(w.Value, Len(w.Value) - ll)
rr = (InStr(cutleft, ")"))
cutright = Left(cutleft, rr - 1)
c = cutright
Else
GoTo t
End If
t: Next c
MsgBox ("操作已完成")
End Sub