PC Review


Reply
Thread Tools Rate Thread

Charting data generagted by a Sub. Urgent please.

 
 
BEETAL
Guest
Posts: n/a
 
      24th Dec 2008
How to create a chart by using the data generated by a Sub.

I don't want to paste the data on a spreadsheet. I want to plot the data
after it is calculated without pasting it.

Is it possible.


--
beetal
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      26th Dec 2008
It's possible. Create the chart, remove any series it contains by default,
then use this to add and populate each series from arrays of data you've
calculated:

With ActiveChart.SeriesCollection.NewSeries
.Values = MyYArray
.XValues = MyXArray
End With

Note that you are limited to how many characters it takes to represent an
array as a string of the form ={1.234567890,2.345678901,3.456789012}. You
can reduce the length of this string somewhat (see
http://peltiertech.com/Excel/ChartsH...ChartData.html).

It's also difficult to debug the code when you're dealing with arrays you
cannot see.

Charts work better with worksheet data. It's easier and better to use
worksheet ranges as chart source data. Put the data into a hidden sheet if
necessary.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______



"BEETAL" <(E-Mail Removed)> wrote in message
news:EAD4999A-8029-48DF-B3B3-(E-Mail Removed)...
> How to create a chart by using the data generated by a Sub.
>
> I don't want to paste the data on a spreadsheet. I want to plot the data
> after it is calculated without pasting it.
>
> Is it possible.
>
>
> --
> beetal



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Including data in data table but not charting as a series or point =?Utf-8?B?cGVwcGVyNzY=?= Microsoft Excel Charting 4 2nd Aug 2006 03:20 AM
Charting Data Series vs. Data Points? =?Utf-8?B?VG9tbXkgWi4=?= Microsoft Excel Charting 4 29th Nov 2005 11:23 PM
Help with Charting My Data -- DavidM Microsoft Excel Discussion 4 5th Jan 2005 02:33 AM
Scatterplot Duplicate Values Charting Help (URGENT!!!) GMAIL invite offer inside kevinL Microsoft Excel Charting 1 26th Aug 2004 10:36 PM
Scatterplot Duplicate Values Charting Help (URGENT!!!) GMAIL invite offer inside kevinL Microsoft Excel Misc 1 26th Aug 2004 10:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:46 PM.