|
或者
Private Sub Worksheet_Change(ByVal Target As Range)
Dim zhs As Long
Dim zls As Long
Dim hh As Long
Dim aa As Range
Dim bb As Range
Dim mc As String
Application.ScreenUpdating = False
zhs = ActiveSheet.Range("A65536").End(xlUp).Row
mc = ActiveSheet.Range("IV1").End(xlToLeft).Address
mc = Mid(mc, 2, InStrRev(mc, "$", -1, vbTextCompare) - 2)
Set aa = ActiveSheet.Range("A1:" & mc & zhs)
For Each bb In aa
If IsNumeric(bb.Value) = True Then
If bb.Value = 0 Then
hh = bb.Row
ActiveSheet.Range(hh & ":" & hh).EntireRow.Hidden = True
End If
End If
Next
Application.ScreenUpdating = True
End Sub |
|