Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / July 2007

Tip: Looking for answers? Try searching our database.

VBA to draw lines of SPC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 31 Jul 2007 18:12 GMT
Hi
I need a simple sub VBA to draw 3 red lines of mean, upper/lower control
limits (3 sigma).  How can I do that?
Thnks for your help.
Daniel
Andy Pope - 31 Jul 2007 18:30 GMT
Hi

No need for VBA. See here for suggestions on how to add datum lines to
charts.
http://peltiertech.com/Excel/Charts/RunChtLines.html

Cheers
Andy

> Hi
>  I need a simple sub VBA to draw 3 red lines of mean, upper/lower control
> limits (3 sigma).  How can I do that?
> Thnks for your help.
> Daniel
Daniel - 31 Jul 2007 18:42 GMT
Thanks Andy
But I need a dynamic chart when data grow the SPC lines expand too.
I just need a macro to draw lines of mean and upper/lower 3 sigma control
lines
Thnks
Daniel

> Hi
>
[quoted text clipped - 10 lines]
> > Thnks for your help.
> > Daniel
Andy Pope - 31 Jul 2007 19:15 GMT
And.
The lines are based on the charted data so the values will change when
the data changes.

If you draw lines you will need to run vba each time.

Jon has pages for dynamic data in charts
http://peltiertech.com/Excel/Charts/Dynamics.html

But if you really must draw over the chart this may help.
http://peltiertech.com/Excel/Charts/VBAdraw.html

Cheers
Andy

> Thanks Andy
>  But I need a dynamic chart when data grow the SPC lines expand too.
[quoted text clipped - 17 lines]
>>>Thnks for your help.
>>>Daniel
Jon Peltier - 31 Jul 2007 20:44 GMT
I guess you didn't read the article too closely. The error bars that account
for the lines stretch as the number of points in the chart increases, and
the points for the Y values of the three lines also move as the data
changes. You can make the chart series dynamic using an approach like this:

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

Using a macro is not generally the easier way to do anything involving
charts. Using a macro is less tedious to use if you have to do things
frequently, but constructing such a macro is not such a trivial exercise.

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

> Thanks Andy
> But I need a dynamic chart when data grow the SPC lines expand too.
[quoted text clipped - 18 lines]
>> > Thnks for your help.
>> > Daniel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.