View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Testing the results of a formula for zero

Sub test()
If ActiveCell.Value <= 0 Or ActiveCell.Value = "" Then
Selection.EntireRow.Hidden = True
End If
End Sub


Gord Dibben MS Excel MVP

On Mon, 16 Apr 2007 14:23:49 -0700, "JEFF" wrote:

I want to test the results of a formula to see if it is zero (or null) and
then hide the row if it is. Can someone show me the best way to do that?
Below is what I am trying...

If ActiveCell.Value <= 0 Then
Selection.EntireRow.Hidden = True
End If

Thanks and best regards,
Jeff