Hide Row

  • Thread starter Thread starter Craig
  • Start date Start date
C

Craig

I have a sheet that requires individuals to input data in columns and I sum
the inforamtion in column M. I would like to create a macor/code that when I
enter the word "Hide" in Cell A1, it hides all the rows that sum to 0 and
just leaves visable the rows with data in them.

Thanks for your help!
 
Why not just use
data>filter>autofilter>filter on col M.
Record a macro if desired. Post back with your attempts if you can't figure
it out, after trying.
 
I have some individuals who are very inexperienced in Excel, and if I had the
data filter option up on the screen, they would go in to panic mode seeing
something differenton the screen.

I will try to write a macro to just hid the rows.
 
Just a thought...

If you hide the built in features from the users, then they'll never learn
them. I bet if you showed the feature to them all, a few would remember it and
find uses in other workbooks.

But I do remember a manager type who went berserk over a teleconference call
when almost all his data was gone. (It was actually just filtered.) But even
he became dangerous, er, more proficient in excel.
 
Assign the refined macro to a button or shape that when clicked will
fire.Change printPREVIEW to printOUT

Sub Macro1() 'Recorded
'
' Macro1 Macro
' Macro recorded 3/6/2009 by Donald B. Guillett
'

'
Range("A1:M10").Select
Selection.AutoFilter
Selection.AutoFilter Field:=13, Criteria1:="<>0", Operator:=xlAnd
ActiveWindow.SelectedSheets.PrintPreview
Selection.AutoFilter
End Sub

Sub filtercolM()'Refined
lr = Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Row
'MsgBox lr
With Range("A1:M" & lr)
.AutoFilter Field:=13, Criteria1:="<>0"
ActiveWindow.SelectedSheets.PrintPreview
.AutoFilter
End With
End Sub
 
Back
Top