HOW TO AUTOMATICALLY HIDE A LINE

M

Mike H

Hi,

Yes that's possible but it's best to ask how with the caps lock turned
off. It's considered to be shouting and makes the post difficult to
read.

This looks at column A1 to A10 and if the text "A certain value" is
entered the row becomes hidden

Right click your sheet tab, view code and paste the code in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
Application.EnableEvents = False
If Target.Value = "A certain value" Then
Target.EntireRow.Hidden = True
End If
Application.EnableEvents = True
End If
End Sub

Mike
 
S

SHADOW

IS IT POSIBLE IN AN EXCEL WORK SHEET
TO ARRANGE WHETHER A LINE WILL BE AUTOMATICALY HIDDEN OR UNHIDDEN
BASED ON THE VALUE OF A CERTAIN CELL?
 
G

Gord Dibben

Yes, it is possible using event code or a macro.

How is the value of the "certain cell" derived?

By calculation or by manual input?

Drop the Caps Lock and post back with details...........certain cell
address, which row to hide and answer to questions above.


Gord Dibben MS Excel MVP
 

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