|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
代码如下:
- Sub 去除不可见字符() '//2024.3.11
- Dim ar, i
- r = Cells(Rows.Count, 1).End(3).Row
- For i = 2 To r
- Cells(i, 1) = "|" & Cells(i, 1)
- Next
- Set rng = ActiveSheet.UsedRange
- rng.NumberFormatLocal = "@"
- ar = Array(9, 10, 13, 28, 29, 30, 31, 32, 127)
- For i = 0 To UBound(ar)
- rng.Replace ChrW(ar(i)), ""
- Next
- For i = 129 To 254
- rng.Replace ChrW(i), ""
- Next
- rng.Replace " ", ""
- For i = 2 To r
- st = Cells(i, 1)
- Cells(i, 1) = Replace(st, "|", "")
- Next
- MsgBox "OK!"
- End Sub
复制代码
|
|