Macro to hide rows based on criteria
Mike is right
an empty cell will been as '0', so I have to adjust my macro
Sub hideeeee()
On Error Resume Next
For Each cell In Selection
If IsNumeric(cell) And cell.Offset(0, 4) = 0 And cell.Offset(0, 5) = 0
_
And Len(cell.Offset(0, 4)) 0 And Len(cell.Offset(0, 5) 0 Then
cell.Rows.EntireRow.Hidden = True
End If
Next cell
End Sub
sorry
|