我需要一个代码,如果列中有任何数字需要替换为空格或空白,如果该列中包含任何单词不应替换 例如:
A A
1411000509
1411000990
1511000242
1606000059
1763104606
1711001701
1711001703
1763103223
1711001722
1763100137
ADDITION ADDITION
DELETION DELETION
答案 0 :(得分:2)
在B1 Cell中
=IF(ISNUMBER(A1),"",A1)
向下拖动公式。
使用编码
Sub ClearNumericData()
Dim r As Range
Application.ScreenUpdating = False
For Each r In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row)
If IsNumeric(r.Value) Then r.ClearContents
Next r
Application.ScreenUpdating = True
End Sub