View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Hiding row base on cell content

Sub HideRows()
Dim cell As Range
For Each cell In Selection
cell.EntireRow.Hidden = cell.Offset(0, 1 -
cell.Column).Interior.ColorIndex = 15 ' Gray-25%
Next cell
End Sub

You should be able to figure the other one yourself.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"brownti via OfficeKB.com" <u31540@uwe wrote in message
news:6dcac80c7b5d9@uwe...
I did a search and came up with some things, but nothing quite like i want.
I want to have a macro linked to a button that when clicked will hide all
rows that have a gray background in column A of that row. And then i will
have another button that will unhide all those rows. Thanks,

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200702/1