Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
Wal Wal is offline
external usenet poster
 
Posts: 2
Default How to do a dynamic plot in Excel via VBA?

Hi I want to write a code in VBA in which a dynamic set of rows ( the
number of columns is fixed to 4) in excel are to be read and a plot
type: " xlXYScatterSmooth" Could someone help me figure out how to
write this one? thanks

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default How to do a dynamic plot in Excel via VBA?

How is the number of rows specified?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Wal" wrote in message
ps.com...
Hi I want to write a code in VBA in which a dynamic set of rows ( the
number of columns is fixed to 4) in excel are to be read and a plot
type: " xlXYScatterSmooth" Could someone help me figure out how to
write this one? thanks



  #3   Report Post  
Posted to microsoft.public.excel.charting
Wal Wal is offline
external usenet poster
 
Posts: 2
Default How to do a dynamic plot in Excel via VBA?

Hi Jon
The number of rows is dynamic. The data will be grabbed from somewhere
else and pasted in the spreadsheet in which the number of column is
alwasy the same but the number of rows will change. So I want a VBA
that can grab the data i paste in excel and produce automatically a
chart.

Thanks

Jon Peltier wrote:
How is the number of rows specified?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Wal" wrote in message
ps.com...
Hi I want to write a code in VBA in which a dynamic set of rows ( the
number of columns is fixed to 4) in excel are to be read and a plot
type: " xlXYScatterSmooth" Could someone help me figure out how to
write this one? thanks


  #4   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 6,582
Default How to do a dynamic plot in Excel via VBA?

New chart each time, or reusing the same chart?

If the data is properly shaped*, you need only select one cell in the range
and Excel will create a new chart using the whole block of data. For an
existing chart, you could grab this region and apply it to the chart:

ActiveSheet.ChartObjects(1).Chart.SetSourceData _
Source:=ActiveSheet.Range("A1").CurrentRegion

Or you might consider the non-VBA dynamic chart approach:

http://peltiertech.com/Excel/Charts/Dynamics.html

*Properly-shaped data:
- Series in columns
- No empty columns or rows
- Surrounded by empty columns and rows
(or butted against top and left edges of sheet)
- First column = X values (category labels)
- First row = series names
- Top left cell blank

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Wal" wrote in message
oups.com...
Hi Jon
The number of rows is dynamic. The data will be grabbed from somewhere
else and pasted in the spreadsheet in which the number of column is
alwasy the same but the number of rows will change. So I want a VBA
that can grab the data i paste in excel and produce automatically a
chart.

Thanks

Jon Peltier wrote:
How is the number of rows specified?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Wal" wrote in message
ps.com...
Hi I want to write a code in VBA in which a dynamic set of rows ( the
number of columns is fixed to 4) in excel are to be read and a plot
type: " xlXYScatterSmooth" Could someone help me figure out how to
write this one? thanks




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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
How to plot semi log graph in Excel? Omkar Charts and Charting in Excel 4 April 10th 06 08:47 AM
Excel 2003 does not display all of plot y axis label. What's up? byrdman Charts and Charting in Excel 0 December 14th 05 10:25 PM
how do I create a 3-d plot in Excel? Clay Madden Charts and Charting in Excel 2 October 15th 05 01:57 PM
BUG?: Excel scatter chart: will not plot x-values Bob Excel Discussion (Misc queries) 2 December 31st 04 12:19 AM


All times are GMT +1. The time now is 11:30 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"