ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to scroll data in a chart? (https://www.excelbanter.com/excel-programming/332618-how-scroll-data-chart.html)

Bubo101

How to scroll data in a chart?
 

Say I have a sheet with 10,000 rows of data. I could chart this data a
a whole but the data would be too bunched up for me to pick anythin
out, so say I want to only show 1000 rows worth on the chart, but hav
the ability to scroll forwards and backwards 1000 rows at a tim
without having to go into the source data dialog and manualy change th
specified range.

Could someone give me tips on how to go about doing this? I presume yo
could have some kind of script with a couple of buttons marked "forward
and "back" which would change the range the chart is using and refres
the display. Be advised I am very new to excel though do have some V
experience

--
Bubo10
-----------------------------------------------------------------------
Bubo101's Profile: http://www.excelforum.com/member.php...fo&userid=2456
View this thread: http://www.excelforum.com/showthread.php?threadid=38153


mangesh_yadav[_356_]

How to scroll data in a chart?
 

This worked nicely for me.

Private Sub SpinButton1_Change()

SpinButton1.Max = 9000
SpinButton1.Min = 0
SpinButton1.SmallChange = 1000

rng = "A" & 1 + SpinButton1.Value & ":B" & 1000
SpinButton1.Value
Sheet1.ChartObjects(1).Select
ActiveChart.SetSourceData Source:=Sheets("Sheet3").Range(rng)
Range("A1").Select

End Sub


Your range is A1:B10000
I plotted the chart in sheet1 itself. And I used the spinbutton fro
the control toolbox menu

Manges

--
mangesh_yada
-----------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047
View this thread: http://www.excelforum.com/showthread.php?threadid=38153



All times are GMT +1. The time now is 01:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com