ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I set up if an answer is No then following row is hidden (https://www.excelbanter.com/excel-worksheet-functions/79936-how-do-i-set-up-if-answer-no-then-following-row-hidden.html)

AP

how do I set up if an answer is No then following row is hidden
 
I am trying to create a form wherby if the answer to say Q1 is no then I need
to make the following rows in that section hidden

Otto Moehrbach

how do I set up if an answer is No then following row is hidden
 
You would need VBA for that. Post back with more detail about what you have
and what rows you want hidden when what question gets a Yes/No. HTH Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no then I
need
to make the following rows in that section hidden




Anne

how do I set up if an answer is No then following row is hidde
 
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.

"Otto Moehrbach" wrote:

You would need VBA for that. Post back with more detail about what you have
and what rows you want hidden when what question gets a Yes/No. HTH Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no then I
need
to make the following rows in that section hidden





Fred Smith

how do I set up if an answer is No then following row is hidde
 
You'll need to provide more details. Try providing specific example, as in:

I have a heading in row 1. In cell c1, there is "yes" or "no". If c1 is "no", I
need to hide row 2.

Given this kind of detail, you'll have no problem getting someone to show you
the code required.

--
Regards,
Fred


"Anne" wrote in message
...
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.

"Otto Moehrbach" wrote:

You would need VBA for that. Post back with more detail about what you have
and what rows you want hidden when what question gets a Yes/No. HTH Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no then I
need
to make the following rows in that section hidden







Anne

how do I set up if an answer is No then following row is hidde
 
Fred,

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.

Regards
Anne

"Fred Smith" wrote:

You'll need to provide more details. Try providing specific example, as in:

I have a heading in row 1. In cell c1, there is "yes" or "no". If c1 is "no", I
need to hide row 2.

Given this kind of detail, you'll have no problem getting someone to show you
the code required.

--
Regards,
Fred


"Anne" wrote in message
...
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.

"Otto Moehrbach" wrote:

You would need VBA for that. Post back with more detail about what you have
and what rows you want hidden when what question gets a Yes/No. HTH Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no then I
need
to make the following rows in that section hidden







Otto Moehrbach

how do I set up if an answer is No then following row is hidde
 
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" wrote in message
...
Fred,

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.

Regards
Anne

"Fred Smith" wrote:

You'll need to provide more details. Try providing specific example, as
in:

I have a heading in row 1. In cell c1, there is "yes" or "no". If c1 is
"no", I
need to hide row 2.

Given this kind of detail, you'll have no problem getting someone to show
you
the code required.

--
Regards,
Fred


"Anne" wrote in message
...
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.

"Otto Moehrbach" wrote:

You would need VBA for that. Post back with more detail about what
you have
and what rows you want hidden when what question gets a Yes/No. HTH
Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no
then I
need
to make the following rows in that section hidden









Otto Moehrbach

how do I set up if an answer is No then following row is hidde
 
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" wrote in message
...
Fred,

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.

Regards
Anne

"Fred Smith" wrote:

You'll need to provide more details. Try providing specific example, as
in:

I have a heading in row 1. In cell c1, there is "yes" or "no". If c1 is
"no", I
need to hide row 2.

Given this kind of detail, you'll have no problem getting someone to show
you
the code required.

--
Regards,
Fred


"Anne" wrote in message
...
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.

"Otto Moehrbach" wrote:

You would need VBA for that. Post back with more detail about what
you have
and what rows you want hidden when what question gets a Yes/No. HTH
Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no
then I
need
to make the following rows in that section hidden









Anne

how do I set up if an answer is No then following row is hidde
 
Otto has been incredibly helpful, I couldn't have asked for better help.
He's really good at this. Thank you

"Otto Moehrbach" wrote:

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 . Remove the "nop" from this
address.
Otherwise I'll respond again when I get back. Otto
"Otto Moehrbach" wrote in message
...
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" wrote in message
...
Fred,

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.

Regards
Anne

"Fred Smith" wrote:

You'll need to provide more details. Try providing specific example, as
in:

I have a heading in row 1. In cell c1, there is "yes" or "no". If c1 is
"no", I
need to hide row 2.

Given this kind of detail, you'll have no problem getting someone to
show you
the code required.

--
Regards,
Fred


"Anne" wrote in message
...
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.

"Otto Moehrbach" wrote:

You would need VBA for that. Post back with more detail about what
you have
and what rows you want hidden when what question gets a Yes/No. HTH
Otto
"AP" wrote in message
...
I am trying to create a form wherby if the answer to say Q1 is no
then I
need
to make the following rows in that section hidden













All times are GMT +1. The time now is 05:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com