+ Reply to Thread
Results 1 to 7 of 7

If answer Yes on a dropdown box, jump to a specific cell?

  1. #1
    Registered User
    Join Date
    08-26-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    26

    If answer Yes on a dropdown box, jump to a specific cell?

    Hello, I have found myself stuck again and would appreciate any help!

    My worksheet asks a series of questions and has dropdown boxes next them it to select an answer. For example Cell E6: "Are you aged 18-65?" with possible answers next to it in F6 "Yes" or "No"

    What I want is if they answer "Yes", to then jump to the next question which is several rows down (Cell E20). Or if they answer No to jump to Cell E30

    I tried the following where AA:1 has a value of "Yes" and AA:2 as "No"


    Dim st3 As String
    st3 = Sheet5.Range("AA:1").Value

    Dim st4 as String
    St4 = sheet5.Range("AA:2").Value

    If Sheet5.Range("f:6") = st3 Then
    Activesheetrange("E:20").Select Or
    If sheet5.range("F:6") = st4 Then
    Activesheetrange("E:30").Select


    End If


    but it doesn't work! Any help would be appreciated, thank you

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: If answer Yes on a dropdown box, jump to a specific cell?

    The'res no colon between the letter and number
    Frob first, tweak later

  3. #3
    Registered User
    Join Date
    08-26-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    26

    Re: If answer Yes on a dropdown box, jump to a specific cell?

    Thank you for the response!

    I have changed to:

    Dim st3 As String
    st3 = Sheet5.Range("AA1").Value

    Dim st4 as String
    St4 = sheet5.Range("AA2").Value

    If Sheet5.Range("f6") = st3 Then
    Activesheetrange("E20").Select Or
    If sheet5.range("F6") = st4 Then
    Activesheetrange("E30").Select


    but unfortunately when I select Yes, it still does not jump to E20. Any thoughts? Thank you

  4. #4
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: If answer Yes on a dropdown box, jump to a specific cell?

    It's all bad code.
    you can't have an 'Or' between 'Ifs' like that.
    You don't have an 'End If' at the end of the statements.
    You're not using [Code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/Code] tags around your code when posting your question so we can't see where the line breaks are. (see Forum rules 3. Use code tags around code. )
    You're not posting the full sub so I can't see what event you're using to trigger the code.
    Last edited by Neil_; 10-26-2016 at 10:44 AM.

  5. #5
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: If answer Yes on a dropdown box, jump to a specific cell?

    He're's how I'd do it.
    Please Login or Register  to view this content.
    Last edited by Neil_; 10-26-2016 at 10:38 AM.

  6. #6
    Registered User
    Join Date
    08-26-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    26

    Re: If answer Yes on a dropdown box, jump to a specific cell?

    Thanks so much! I will post using [code] in future. Thanks

  7. #7
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: If answer Yes on a dropdown box, jump to a specific cell?

    You're welcome. Be sure to mark the thread as SOLVED using the tools on your original post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to jump into a specific cell
    By excelrio in forum Excel - New Users/Basics
    Replies: 10
    Last Post: 08-07-2016, 10:18 PM
  2. [SOLVED] Macro to jump to a cell that matches the text selected from a dropdown list.
    By agalvan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2014, 06:28 PM
  3. [SOLVED] Getting multiple Dropdown menus to give an answer in a specified cell.
    By Mcullin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2013, 12:41 AM
  4. Need macro to jump to specific cell determined by date.
    By mhelmers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2012, 06:19 PM
  5. jump to specific date in cell-range based on last opening of workbook
    By wamp in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-20-2008, 09:06 AM
  6. Can Drop Down Boxes jump to the answer as you type?
    By rrucksdashel in forum Excel General
    Replies: 4
    Last Post: 11-02-2005, 06:17 PM
  7. Dropdown with a "jump to" cell name. Like a Go button..
    By thom hoyle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-27-2005, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1