![如何删除Excel表格中的所有空格](https://linux22.com/image/1483574/%E5%A6%82%E4%BD%95%E5%88%A0%E9%99%A4Excel%E8%A1%A8%E6%A0%BC%E4%B8%AD%E7%9A%84%E6%89%80%E6%9C%89%E7%A9%BA%E6%A0%BC.png)
答案1
答案2
尝试这个简短的宏:
Sub NoSpace()
Dim rng As Range, r As Range
Set rng = Intersect(ActiveSheet.UsedRange, Range("B:B"))
For Each r In rng
If Left(r.Text, 1) = " " Then
r.Value = Mid(r.Text, 2)
End If
Next r
End Sub
答案3
如果您不想使用宏,您只需执行一次此操作,您不想再有另一列,并且您的日期都来自一两年:
- 选择列,
- 查找替换
“2016-” 改为“2016-”(当然没有引号)