Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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
Posted to microsoft.public.excel.charting
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Scrollbar help | Excel Discussion (Misc queries) | |||
Horizontal Scrollbar | New Users to Excel | |||
ScrollBar property | Excel Discussion (Misc queries) | |||
Excel ActiveX Scrollbar - change from integer to decimal | Excel Discussion (Misc queries) | |||
scrollbar reslut makes another scrollbar to show | Excel Discussion (Misc queries) |