G
Guest
To All
The code below is copied from a reply (by Frank Kabel) to a previous post. It hides all rows with a zero in column D
Sub hide_rows(
Dim RowNdx As Lon
Dim LastRow As Lon
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Ro
For RowNdx = LastRow To 1 Step -
If Cells(RowNdx, "D").Value = 0 The
Rows(RowNdx).Hidden = Tru
End I
Next RowNd
End Su
Does anyone know how to re-write the code to hide row 5 if a zero is in cell D5
Thanks,
btk
The code below is copied from a reply (by Frank Kabel) to a previous post. It hides all rows with a zero in column D
Sub hide_rows(
Dim RowNdx As Lon
Dim LastRow As Lon
LastRow = ActiveSheet.Cells(Rows.Count, "D").End(xlUp).Ro
For RowNdx = LastRow To 1 Step -
If Cells(RowNdx, "D").Value = 0 The
Rows(RowNdx).Hidden = Tru
End I
Next RowNd
End Su
Does anyone know how to re-write the code to hide row 5 if a zero is in cell D5
Thanks,
btk