'运行以下过程,清除当前工作簿中所有工作表中小于12且大于30000的数据,只是清除单元格内容,运行前请备份文件,以免出错Sub DelCell() '若要删除单元格刚将C.ClearContents改为C.Delete即可 Dim C As Range Dim Sht As Worksheet For Each Sht In ThisWorkbook.Sheets For Each C In Sht.UsedRange If IsNumeric(C.Value) And C.Value < 12 Or C.Value > 30000 Then C.ClearContents Next NextEnd Sub


- 相关评论
- 我要评论
-