Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 57
Default non-integer scrollbar

I have an x-y (scatter) graph with non-integer, all positive x values and a
scrollbar set with an upper and lower limit. As I scroll, a vertical cursor
is moved through the chart but only to integer values. I'd like the vertical
cursor bar to move to each of the actual non-integer x values in my data as
I move the scrollbar.

Can anyone point me to VBA code or a formula solution to alter the scrollbar
so that it can handle non-integers?

My thanks in advance for any suggestions.

Cheers! Brad


  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 560
Default non-integer scrollbar

On Mon, 5 Nov 2007, in microsoft.public.excel.charting,
Brad said:

I have an x-y (scatter) graph with non-integer, all positive x values and a
scrollbar set with an upper and lower limit. As I scroll, a vertical cursor
is moved through the chart but only to integer values. I'd like the vertical
cursor bar to move to each of the actual non-integer x values in my data as
I move the scrollbar.


Try using the integer values to feed a formula like INDEX(), to choose
the nth X value in the data. If the X values are not in order, try using
RANK() instead.

--
Del Cotter
NB Personal replies to this post will send email to ,
which goes to a spam folder-- please send your email to del3 instead.
  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 235
Default non-integer scrollbar

Assuming your scrollbar is named "Scrollbar1", you could divide the scrollbar
value by an integer to return non-integer data. For example, the code below
divides the integer value returned by the scrollbar by 1000 and then places
that value into cell A1. If the scrollbar value were 15, the code would
return 0.015 in cell A1.

Private Sub ScrollBar1_Change()
Range("A1").Value = ScrollBar1.Value / 1000
ScrollBar1.Max = 100
ScrollBar1.Min = -100
End Sub

Private Sub ScrollBar1_Scroll()
Range("A1").Value = ScrollBar1.Value / 1000
ScrollBar1.Max = 100
ScrollBar1.Min = -100
End Sub

You could also do so by performing the division in another cell. If the
number returned in cell A1 were 15, in cell A2 you could divide it by 1000 to
get 0.015. You could then use that cell as your source value.

--
John Mansfield
http://cellmatrix.net





"Brad" wrote:

I have an x-y (scatter) graph with non-integer, all positive x values and a
scrollbar set with an upper and lower limit. As I scroll, a vertical cursor
is moved through the chart but only to integer values. I'd like the vertical
cursor bar to move to each of the actual non-integer x values in my data as
I move the scrollbar.

Can anyone point me to VBA code or a formula solution to alter the scrollbar
so that it can handle non-integers?

My thanks in advance for any suggestions.

Cheers! Brad



  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 61
Default non-integer scrollbar

Hi,

This might work.

Let's imagine that the x- and y- data are in columns A and B, and the
scrollbar is linked to C2. Set the lower and upper limits of the scrollbar
to the lowest and highest row numbers of your data-range. In another cell,
say C3, enter the formula =INDIRECT("A"&C2). Link the cursor-bar to C3.

Now as you move the scrollbar, C2 and C3 will step through the row numbers
and the corresponding x-values respectively. Since the cursor is linked to
C3, it will step through the data-points on the graph.

With regards,
B. R. Ramachandran



"Brad" wrote:

I have an x-y (scatter) graph with non-integer, all positive x values and a
scrollbar set with an upper and lower limit. As I scroll, a vertical cursor
is moved through the chart but only to integer values. I'd like the vertical
cursor bar to move to each of the actual non-integer x values in my data as
I move the scrollbar.

Can anyone point me to VBA code or a formula solution to alter the scrollbar
so that it can handle non-integers?

My thanks in advance for any suggestions.

Cheers! Brad



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
Scrollbar help [email protected] Excel Discussion (Misc queries) 1 January 19th 07 10:48 PM
Horizontal Scrollbar tikchye_oldLearner57 New Users to Excel 2 March 27th 06 06:42 PM
ScrollBar property Ben Excel Discussion (Misc queries) 1 October 31st 05 06:25 AM
Excel ActiveX Scrollbar - change from integer to decimal Tonette Excel Discussion (Misc queries) 2 October 15th 05 03:41 PM
scrollbar reslut makes another scrollbar to show Patrik Excel Discussion (Misc queries) 0 April 18th 05 03:11 PM


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

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

About Us

"It's about Microsoft Excel"