VBA:修改单元 格的值 删除行

Sub CheckTableCells()
Application.DisplayAlerts = False
Dim sht As Worksheet
   Dim i, j As Integer

For i = 1 To 10000

If (Range("e" & i).Value = "") Then
  If (Range("a" & (i + 1)).Value = "") Then
  If (Range("b" & (i + 1)).Value <> "") Then
  If (Range("c" & (i + 1)).Value = "") Then
   Range("e" & i).Value = Range("b" & (i + 1)).Value
   Rows(i + 1).Delete
   End If
   End If
   End If
   End If
Next
   


End Sub

 

posted @ 2023-02-15 07:43  myrj  阅读(41)  评论(0编辑  收藏  举报