阅: 700 | 回: 3
发表于2023/8/4 16:25:46
楼主
等级:初学者
- 积分:2
- 财富值:2
- 身份:普通用户
Sub 删除不可见字符和空格()
Dim ws As Worksheet
Dim rng As Range
Dim cell As Range
Set ws = ThisWorkbook.Worksheets("Sheet1") '根据实际情况修改工作表名称
Set rng = ws.Range("U2:U200")
For Each cell In rng
cell.Value = Replace(cell.Value, " ", "") '删除空格
cell.Value = Replace(cell.Value, Chr(160), "") '删除不可见字符
Next cell
End Sub
我的个性签名