Sub 删除表格内容及数据()
Dim S As Long, D As Long
For S = 2 To 4 Step 2
For D = 1 To Range("D65536").End(xlUp).Row
If Cells(D, S) = 0 Then
Cells(D, S).Clear
Cells(D, S - 1).Clear
Else
End If
Next
Next
Sheets(1).Select
Range("a1").Select
End Sub
使用以上代码,
然后创建宏按钮
选择第一个控件,然后指定这个宏就行了。
有用请采纳!