Hide whole row when cel C3 is 0 (zero)
Hi Berry,
You can try this:
Private Sub Worksheet_Calculate()
Dim lRowLoop As Long
For lRowLoop = 1 To UsedRange.Rows.Count
If Cells(lRowLoop, 3).Value = 0 Then
Cells(lRowLoop, 3).EntireRow.Hidden = True
ElseIf Cells(lRowLoop, 3).Value = "C" Then
Cells(lRowLoop, 3).EntireRow.Hidden = True
Else
Cells(lRowLoop, 3).EntireRow.Hidden = False
End If
Next
End Sub
This code will be executed each time the sheet is recalculated.
HTH,
Executor
Berry wrote:
Actually this is how the sheet looks:
Colum C Colum D
T T0601CFI
C C0651CFI
H H0602CFI
0 0
0 0
Now I want to automaticly hide the rows with a zero in colum C and also
the ones with a "C"
Who can help me with this code??
Greets
|