ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Fill an area between 2 curves in an Excell chart? (https://www.excelbanter.com/charts-charting-excel/40487-fill-area-between-2-curves-excell-chart.html)

syseng

Fill an area between 2 curves in an Excell chart?
 
I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?

Jon Peltier

You can do it with an area chart, or by adapting this VBA technique:

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

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


syseng wrote:

I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?


Ali Baba

Hi Jon

I used your technique and it worked but how do I clear the shapes if I want
to plot something else. I know this can be done by selecting the shapes then
delete but is there a way to write VBA to clear them with a click of a
button??

thanks

"Jon Peltier" wrote:

You can do it with an area chart, or by adapting this VBA technique:

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

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


syseng wrote:

I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?



Andy Pope

Hi,

2 ways,

activechart.Shapes.SelectAll
selection.delete

do while activechart.Shapes.Count 0
activechart.Shapes(activechart.Shapes.Count).Delet e
loop

Cheers
Andy

Ali Baba wrote:
Hi Jon

I used your technique and it worked but how do I clear the shapes if I want
to plot something else. I know this can be done by selecting the shapes then
delete but is there a way to write VBA to clear them with a click of a
button??

thanks

"Jon Peltier" wrote:


You can do it with an area chart, or by adapting this VBA technique:

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

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


syseng wrote:


I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?



--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

Ali Baba

Thank you Andy



"Andy Pope" wrote:

Hi,

2 ways,

activechart.Shapes.SelectAll
selection.delete

do while activechart.Shapes.Count 0
activechart.Shapes(activechart.Shapes.Count).Delet e
loop

Cheers
Andy

Ali Baba wrote:
Hi Jon

I used your technique and it worked but how do I clear the shapes if I want
to plot something else. I know this can be done by selecting the shapes then
delete but is there a way to write VBA to clear them with a click of a
button??

thanks

"Jon Peltier" wrote:


You can do it with an area chart, or by adapting this VBA technique:

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

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


syseng wrote:


I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


syseng

Thanks Jon,

I will give this a try.

syseng

"Jon Peltier" wrote:

You can do it with an area chart, or by adapting this VBA technique:

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

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


syseng wrote:

I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?



syseng

Thanks Jon!

syseng

"Jon Peltier" wrote:

You can do it with an area chart, or by adapting this VBA technique:

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

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


syseng wrote:

I created an excell x-y chart that has 4 curves on it. Is it possible to
select 2 of the curves and shade the area between them?




All times are GMT +1. The time now is 10:05 PM.

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