Hide Row

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!
 
D

Don Guillett

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.
 
C

Craig

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.
 
D

Dave Peterson

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.
 
D

Don Guillett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top