我试图清理我的spreedsheet。有很多空白单元正在抛弃计数。我试过使用这段代码,但它给我一个运行时错误。Excel错误1004 - 运行时错误'1004'应用程序定义或对象定义的错误
Sub ClearAll()
Dim c As Range, MyRange As Range
Set MyRange = Range("A1:JS87")
For Each c In MyRange
If Len(c) = 0 Then c.ClearContents
Next c
End Sub
试试'对于MyRange.Cells中的每个c? –