+ Reply to Thread
Results 1 to 4 of 4

Sheet scroll based on variable

  1. #1
    Biff
    Guest

    Sheet scroll based on variable

    Hi Folks!

    Need some help with a macro.

    I want to use a data validation drop down to select a variable and based on
    that variable have the worksheet scroll down a set amount of rows. The
    number of rows to scroll has not yet been determined. I'll have to
    experiment to find the exact number. There will be a total of 17 variables
    named Week1, Week2, Week3 ....... Week17

    Say cell A1 has the drop down. From the drop down I select Week12. I click a
    button that the macro is assigned to and the sheet scrolls down X number of
    rows. The number of rows to scroll is dependant on which variable is
    selected and as I said, I'll need to experiement to find the exact number.

    The logic would be something like:

    If A1 = Week1 scroll down X number of rows
    If A1 = Week2 scroll down X number of rows
    etc

    Thanks for any help.

    Biff



  2. #2
    Stefi
    Guest

    RE: Sheet scroll based on variable

    scr_row = 5
    ActiveWindow.SmallScroll Down:=scr_row

    But if you know in what row your week1,week2, ... data begin (say 50 for
    week2) then
    Range("A50").Select

    will scroll automatically to row 50 that is week2.

    Regards,
    Stefi



    „Biff” ezt *rta:

    > Hi Folks!
    >
    > Need some help with a macro.
    >
    > I want to use a data validation drop down to select a variable and based on
    > that variable have the worksheet scroll down a set amount of rows. The
    > number of rows to scroll has not yet been determined. I'll have to
    > experiment to find the exact number. There will be a total of 17 variables
    > named Week1, Week2, Week3 ....... Week17
    >
    > Say cell A1 has the drop down. From the drop down I select Week12. I click a
    > button that the macro is assigned to and the sheet scrolls down X number of
    > rows. The number of rows to scroll is dependant on which variable is
    > selected and as I said, I'll need to experiement to find the exact number.
    >
    > The logic would be something like:
    >
    > If A1 = Week1 scroll down X number of rows
    > If A1 = Week2 scroll down X number of rows
    > etc
    >
    > Thanks for any help.
    >
    > Biff
    >
    >
    >


  3. #3
    Biff
    Guest

    Re: Sheet scroll based on variable

    Hi!

    Thanks for the reply but I don't know how to use your suggestion!

    How do I implement this based on the variable in cell A1?

    IF A1 = Week2 scroll down X number of rows
    IF A1 = Week10 scroll down X number of rows

    ???

    Biff

    "Stefi" <[email protected]> wrote in message
    news:[email protected]...
    > scr_row = 5
    > ActiveWindow.SmallScroll Down:=scr_row
    >
    > But if you know in what row your week1,week2, ... data begin (say 50 for
    > week2) then
    > Range("A50").Select
    >
    > will scroll automatically to row 50 that is week2.
    >
    > Regards,
    > Stefi
    >
    >
    >
    > "Biff" ezt rta:
    >
    >> Hi Folks!
    >>
    >> Need some help with a macro.
    >>
    >> I want to use a data validation drop down to select a variable and based
    >> on
    >> that variable have the worksheet scroll down a set amount of rows. The
    >> number of rows to scroll has not yet been determined. I'll have to
    >> experiment to find the exact number. There will be a total of 17
    >> variables
    >> named Week1, Week2, Week3 ....... Week17
    >>
    >> Say cell A1 has the drop down. From the drop down I select Week12. I
    >> click a
    >> button that the macro is assigned to and the sheet scrolls down X number
    >> of
    >> rows. The number of rows to scroll is dependant on which variable is
    >> selected and as I said, I'll need to experiement to find the exact
    >> number.
    >>
    >> The logic would be something like:
    >>
    >> If A1 = Week1 scroll down X number of rows
    >> If A1 = Week2 scroll down X number of rows
    >> etc
    >>
    >> Thanks for any help.
    >>
    >> Biff
    >>
    >>
    >>




  4. #4
    Biff
    Guest

    Re: Sheet scroll based on variable

    Hi!

    Just discovered something that I didn't know was possible!

    Using F5 to go to a specific location on a sheet, this will accept a
    reference such as:

    =INDIRECT(A1)

    Using this, I should be able to figure out what how to do what I want.

    Biff

    "Biff" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi!
    >
    > Thanks for the reply but I don't know how to use your suggestion!
    >
    > How do I implement this based on the variable in cell A1?
    >
    > IF A1 = Week2 scroll down X number of rows
    > IF A1 = Week10 scroll down X number of rows
    >
    > ???
    >
    > Biff
    >
    > "Stefi" <[email protected]> wrote in message
    > news:[email protected]...
    >> scr_row = 5
    >> ActiveWindow.SmallScroll Down:=scr_row
    >>
    >> But if you know in what row your week1,week2, ... data begin (say 50 for
    >> week2) then
    >> Range("A50").Select
    >>
    >> will scroll automatically to row 50 that is week2.
    >>
    >> Regards,
    >> Stefi
    >>
    >>
    >>
    >> "Biff" ezt rta:
    >>
    >>> Hi Folks!
    >>>
    >>> Need some help with a macro.
    >>>
    >>> I want to use a data validation drop down to select a variable and based
    >>> on
    >>> that variable have the worksheet scroll down a set amount of rows. The
    >>> number of rows to scroll has not yet been determined. I'll have to
    >>> experiment to find the exact number. There will be a total of 17
    >>> variables
    >>> named Week1, Week2, Week3 ....... Week17
    >>>
    >>> Say cell A1 has the drop down. From the drop down I select Week12. I
    >>> click a
    >>> button that the macro is assigned to and the sheet scrolls down X number
    >>> of
    >>> rows. The number of rows to scroll is dependant on which variable is
    >>> selected and as I said, I'll need to experiement to find the exact
    >>> number.
    >>>
    >>> The logic would be something like:
    >>>
    >>> If A1 = Week1 scroll down X number of rows
    >>> If A1 = Week2 scroll down X number of rows
    >>> etc
    >>>
    >>> Thanks for any help.
    >>>
    >>> Biff
    >>>
    >>>
    >>>

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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