Sub 按钮1_单击()
a = Selection.Row
a1 = Selection.Rows.Count
b = Selection.Column
b1 = Selection.Columns.Count
For i = a To a + a1 - 1
For j = b To b + b1 - 1
Cells(i, j) = Replace(Cells(i, j), "aaaa", "")
'Cells(i, j) = Replace(Cells(i, j), Range("a1"), "")
Next j
Next i
End Sub
先选择区域
必须是连续的区域哦