View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Tracy Tracy is offline
external usenet poster
 
Posts: 70
Default Automatically Hide Rows

Hi Mike, I tried that, but it didn't seem to work. The row needs to
disappear if there is a 0 in a certain cell. There are only two choices a
"0" or a "1". I can change those numbers to 1/2 or 3/4 if that helps.
Also when I paste the information does it need to be on Worksheet at the top
or anything else I may be missing?
--
Tracy


"Mike H" wrote:

Hi,

Not with a format but you can do it with event code like this. Right click
your sheet tab, view code and paste the code below in. As soon as a value
10 is entered in column D then the row is hidden.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("D:D")) Is Nothing Then
If IsNumeric(Target) And Target.Value 10 Then
Target.EntireRow.Hidden = True
End If
End If
End Sub

Mike

"Tracy" wrote:

Is there a way to format a worksheet to automatically hide rows if a certain
cell = a certain number?
--
Tracy