我这样做是为了清除特定行之后的所有内容,但我希望它可以使用列而不是行。X在这种情况下应该是6
With Sheets("Sheet1")
.Rows( X & ":" & .Rows.Count).ClearContents
End With
With Sheets("Sheet1")
.Range(.Cells(1,X).Address & ":" & .Cells(1,.Columns.Count).Address).Columns.ClearContents
End With
其中X是您希望以其开头的列号或字母。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句