Thread: Hiding rows
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Hiding rows

Why not use the Autofilter under the data menu.

as Frank Said

For a = 1 To 14
Range("hide").Value = a
Range("hidestart").Offset(a - 1, 0).Select
If cell.Value = 0 Then
Selection.EntireRow.Hidden = True
End If
Next a

Cell is undefined, so I believe you mean activeCell

For a = 1 To 14
Range("hide").Value = a
Range("hidestart").Offset(a - 1, 0).Select
If Activecell.Value = 0 Then
Selection.EntireRow.Hidden = True
End If
Next a



--
Regards,
Tom Ogilvy

"trickdos " wrote in message
...
I am trying to hide rows based on a value of a sum formula. If the sum
fo the row is 0, i want to hide that row. I think this should work, For

a = 1 To 14
Range("hide").Value = a
Range("hidestart").Offset(a - 1, 0).Select
If cell.Value = 0 Then
Selection.EntireRow.Hidden = True

Next a


but it is imbedded under other for...next statements. I dont know if
this is a problem, but I get a Next without For error.

Thanks for your help in advance....




---
Message posted from http://www.ExcelForum.com/