假设您的评论看起来像这样

你可以试试这个
Sub RemoveEmptyLinesInComments()
Dim c As Comment
For Each c In ActiveSheet.Comments
c.Text Text:=Replace(c.Text, vbLf, Chr(32))
Next c
End Sub
实现

更新
好的,在您编辑问题并使用提供的详细信息更改含义后,我想出了另一个代码作为解决方案。尝试
Sub RemoveEmptiesFromComments()
Dim c As Comment
For Each c In ActiveSheet.Comments
Dim v As Variant
v = Split(c.Text, Chr(32))
Dim i As Long, s As String
For i = LBound(v) To UBound(v) - 1
s = s & Chr(32) & v(i)
Next i
Dim rng As Range
Set rng = c.Parent
c.Delete
rng.AddComment Text:=s
rng.Comment.Shape.TextFrame.AutoSize = True
Next c
End Sub