Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,688
Default 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" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Scroll through the sheet S New Users to Excel 3 April 3rd 07 12:38 AM
variable in a link where the variable is the name of the sheet darrelly Excel Worksheet Functions 1 October 7th 05 08:24 AM
Sum cells based on a row variable and seperate column variable CheeseHeadTransplant Excel Worksheet Functions 10 September 23rd 05 06:59 PM
Total a Variable Based on Another Variable Please Paul Black[_2_] Excel Programming 3 March 31st 05 03:37 PM
open & scroll to specific location based on value paul[_8_] Excel Programming 4 September 5th 03 02:23 PM


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"