hidding rows depending on content cells

B

Bob Phillips

Paul,

Can be done with worksheet event VBA code

Here's an example that tests for Y in A1:A100

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then
If Target.Value = "Y" Then
Target.EntireRow.Hidden = True
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

As worksheet cod, it goes in the appropriate worksheet code mosule.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
K

Ken Wright

Rows can be easily hidden by selecting your data, headings included, and then
using Data / Filter / Autofilter / Custom / Not equal to..........
 

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