thank you, but I'm not sure how to explain it. I'll try:
1st row has a heading with yes/no answer in next column. Dependant upon the
answer is whether or not the next rows are applicable. If the answer is no
then the next wouldn't be applicable and need to be hidden to enable the
person to continue with the next question etc.
The heading is in C19 and the yes/no box is in G19 - if G19 is "no" then I
need to hide row 20. It would then go to C21 and if the answer in G21 was
"no" I would need to hide rows 22-25.
Anne
I take it that you want this to happen at the time that the user enters
a "No" in the Column G cell. I'll also assume that all this is applicable
to all Column G cells from Row 5 to Row 1000. You can change these things
in the macro below. Note that the case of the "No" that is entered does not
matter.
Note that this macro is a sheet macro and must be placed in the sheet module
of the sheet in which are doing the "No" thing. To access that module,
right click on the sheet tab, select View Code, and paste this macro into
that module. Click on the "X" at the top right of the module to return to
your sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
If IsEmpty(Target.Value) Then Exit Sub
If Target.Column = 7 And _
Target.Row >= 5 And _
Target.Row <= 1000 And _
UCase(Target.Value) = "NO" Then _
Target.Offset(1).EntireRow.Hidden = True
End Sub
Anne
Ignore the response and macro I just gave you. I reread your last post
and just now realized that the number of rows to be hidden varies with the
Column G cell that received the "No". So I need to get more info from you.
I need a list of the pertinent Column G cells (the cells that could get
a "No") and the number of rows you want hidden for each Column G cell.
Something like :
G19 1
G21 4
G26 2
Etc.
Otto
Anne
I'll be out of town 29 Mar - 2 Apr and will work on this during that
time. But I will not have access to the newsgroup, so if you wish, email
the list I asked for and I'll respond to you via email or after I get back.
My email address is [email protected]. Remove the "nop" from this
address.
Otherwise I'll respond again when I get back. Otto