Thread: auto hide
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
chad chad is offline
external usenet poster
 
Posts: 273
Default auto hide



"Gord Dibben" wrote:

Private Sub Worksheet_Calculate()
'Hide rows with formulas that return negatives
Dim cell As Range
On Error GoTo endit
Application.EnableEvents = False
Application.ScreenUpdating = False
With Me.UsedRange
.Rows.Hidden = False
For Each cell In .Columns(1).SpecialCells(xlCellTypeFormulas)
If cell.Value < 0 Then cell.EntireRow.Hidden = True
Next cell
End With
endit:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub



Ok I think this is the macro I need to run however I am just now learning
macros and when I copy and pasted of course it did not work for the fact you
do not have the names of the sheets in my file. Is there anyway I can get you
to repost this macro with each part I need to replace with file specific info
being follow by a set of (). For example if something on here needs the name
of a certain sheet follow it with like (sheet1) or something like that or
link me a site to teach me macros. /VR