ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Cell with a certain value to go to... (https://www.excelbanter.com/excel-discussion-misc-queries/153748-cell-certain-value-go.html)

Wanna Learn

Cell with a certain value to go to...
 
Hello
I need a code to do the following
This is for a form I created
If the value in cell N39 is YES then go to cell q36
If the value is something else besides Yes then it should do nothing
Thank you


bj

Cell with a certain value to go to...
 
when is this to take place?
When you open it?
when you print it?
When you close it?
etc.
do you want it to stay at Q36 from then on?
How does N39 get changed?

"Wanna Learn" wrote:

Hello
I need a code to do the following
This is for a form I created
If the value in cell N39 is YES then go to cell q36
If the value is something else besides Yes then it should do nothing
Thank you


Wanna Learn

Cell with a certain value to go to...
 
bj thanks
This is a protected form (Below are the correct cell numbers)
This is to take place when the person completing the form gets to cell N29
and from the dropdown list (created in validation -List- source =indirect
(B29) selects yes or Lab without (there are only 4 choices in the dropdown
list (Yes , No, lab with, lab without)

If the person selects Yes or lab without then it should go to O31 (that is
skip Q29)
One thing O31 is an option button (created from the forms toolbar) = yes
or no which answers a question on row 31 ) . After that person should be
able to complete the rest of the form

IF the person selects No or Lab with it should go to Q29 then after that O31
. After that person should be able to complete the rest of the form
Thanks BJ Hope this is clear

"bj" wrote:

when is this to take place?
When you open it?
when you print it?
When you close it?
etc.
do you want it to stay at Q36 from then on?
How does N39 get changed?

"Wanna Learn" wrote:

Hello
I need a code to do the following
This is for a form I created
If the value in cell N39 is YES then go to cell q36
If the value is something else besides Yes then it should do nothing
Thank you


Tevuna

Cell with a certain value to go to...
 
a) Open VB Editor
b) Find your project in the Explorer pane
c) Double click to open the worksheet where your form is
d) Paste this:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = Range("N29").Address Then
If Target = "Yes" Or Target = "Lab with" Then
Range("O32").Select
Else
Range("Q29").Select
End If
End If

End Sub

"Wanna Learn" wrote:

bj thanks
This is a protected form (Below are the correct cell numbers)
This is to take place when the person completing the form gets to cell N29
and from the dropdown list (created in validation -List- source =indirect
(B29) selects yes or Lab without (there are only 4 choices in the dropdown
list (Yes , No, lab with, lab without)

If the person selects Yes or lab without then it should go to O31 (that is
skip Q29)
One thing O31 is an option button (created from the forms toolbar) = yes
or no which answers a question on row 31 ) . After that person should be
able to complete the rest of the form

IF the person selects No or Lab with it should go to Q29 then after that O31
. After that person should be able to complete the rest of the form
Thanks BJ Hope this is clear

"bj" wrote:

when is this to take place?
When you open it?
when you print it?
When you close it?
etc.
do you want it to stay at Q36 from then on?
How does N39 get changed?

"Wanna Learn" wrote:

Hello
I need a code to do the following
This is for a form I created
If the value in cell N39 is YES then go to cell q36
If the value is something else besides Yes then it should do nothing
Thank you


Wanna Learn

Cell with a certain value to go to...
 
Tevuna Awesome PERFECT thanks!

"Tevuna" wrote:

a) Open VB Editor
b) Find your project in the Explorer pane
c) Double click to open the worksheet where your form is
d) Paste this:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = Range("N29").Address Then
If Target = "Yes" Or Target = "Lab with" Then
Range("O32").Select
Else
Range("Q29").Select
End If
End If

End Sub

"Wanna Learn" wrote:

bj thanks
This is a protected form (Below are the correct cell numbers)
This is to take place when the person completing the form gets to cell N29
and from the dropdown list (created in validation -List- source =indirect
(B29) selects yes or Lab without (there are only 4 choices in the dropdown
list (Yes , No, lab with, lab without)

If the person selects Yes or lab without then it should go to O31 (that is
skip Q29)
One thing O31 is an option button (created from the forms toolbar) = yes
or no which answers a question on row 31 ) . After that person should be
able to complete the rest of the form

IF the person selects No or Lab with it should go to Q29 then after that O31
. After that person should be able to complete the rest of the form
Thanks BJ Hope this is clear

"bj" wrote:

when is this to take place?
When you open it?
when you print it?
When you close it?
etc.
do you want it to stay at Q36 from then on?
How does N39 get changed?

"Wanna Learn" wrote:

Hello
I need a code to do the following
This is for a form I created
If the value in cell N39 is YES then go to cell q36
If the value is something else besides Yes then it should do nothing
Thank you



All times are GMT +1. The time now is 05:36 PM.

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