EXCEL中如何使用VBA清除特定行内容
答案:3 悬赏:50 手机版
解决时间 2021-03-16 19:26
- 提问者网友:十年饮冰
- 2021-03-16 15:49
EXCEL中如何使用VBA清除特定行内容
最佳答案
- 五星知识达人网友:洎扰庸人
- 2021-03-16 16:55
Sub 清除()
For k = 1000 To 60 Step -1
If (Cells(k, 1) = -5 And Cells(k, 2) = 80) Or (Cells(k, 1) = 25 And Cells(k, 2) = 64) Then
Cells(k, 1).EntireRow.ClearContents
End If
Next
End Sub功能区域为第60-1000行。
For k = 1000 To 60 Step -1
If (Cells(k, 1) = -5 And Cells(k, 2) = 80) Or (Cells(k, 1) = 25 And Cells(k, 2) = 64) Then
Cells(k, 1).EntireRow.ClearContents
End If
Next
End Sub功能区域为第60-1000行。
全部回答
- 1楼网友:青尢
- 2021-03-16 17:34
同行啊哥,weimin档?
- 2楼网友:胯下狙击手
- 2021-03-16 17:09
Sub aa()
For i = 1 To 1000
If Cells(i, 1) = -5 And Cells(i, 2) = 80 Or Cells(i, 1) = 25 And Cells(i, 2) = 64 Then Rows(i)=""
Next
End Sub
For i = 1 To 1000
If Cells(i, 1) = -5 And Cells(i, 2) = 80 Or Cells(i, 1) = 25 And Cells(i, 2) = 64 Then Rows(i)=""
Next
End Sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯