ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Can Line Chart Overlaps be Highlighted? (https://www.excelbanter.com/charts-charting-excel/231943-can-line-chart-overlaps-highlighted.html)

Michael B.

Can Line Chart Overlaps be Highlighted?
 
Can the overlap portion(s) of two lines in a chart be shown in a different
color, without having to manually draw a shape? I would like to show the
areas where Line A is above Line B as red, and the areas where it crosses
below in blue - is it possible to do this without manually drawing in shapes?

Andy Pope

Can Line Chart Overlaps be Highlighted?
 
Hi,

To some extent it depends how many times the lines cross. If it's just the
once then you can use area charts to provide the shading.
http://www.andypope.info/ngs/ng21.htm
http://pubs.logicalexpressions.com/P...cle.asp?ID=590

This may help if the used one line as a base line.
http://peltiertech.com/WordPress/are...t-if-negative/

More complex lines may require a coded solution.
http://peltiertech.com/Excel/Charts/VBAdraw.html

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Michael B." wrote in message
...
Can the overlap portion(s) of two lines in a chart be shown in a different
color, without having to manually draw a shape? I would like to show the
areas where Line A is above Line B as red, and the areas where it crosses
below in blue - is it possible to do this without manually drawing in
shapes?



Michael B.

Can Line Chart Overlaps be Highlighted?
 
Andy:
Thanks for that information - with regard to the first solution, the lines
do cross more than once, so that won't do the trick.
The second solution doesn't work since one line is not a baseline, and the
values aren't negative, so the "invert if negative" option doesn't apply.

I'm not sure about the third, I have no experience with VBA, but I will look
at the examples closely and see if anything will work.

Thank you very much for your quick response, and for the great information
that I can use in many other situations I've come across!

"Andy Pope" wrote:

Hi,

To some extent it depends how many times the lines cross. If it's just the
once then you can use area charts to provide the shading.
http://www.andypope.info/ngs/ng21.htm
http://pubs.logicalexpressions.com/P...cle.asp?ID=590

This may help if the used one line as a base line.
http://peltiertech.com/WordPress/are...t-if-negative/

More complex lines may require a coded solution.
http://peltiertech.com/Excel/Charts/VBAdraw.html

Cheers
Andy
--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Michael B." wrote in message
...
Can the overlap portion(s) of two lines in a chart be shown in a different
color, without having to manually draw a shape? I would like to show the
areas where Line A is above Line B as red, and the areas where it crosses
below in blue - is it possible to do this without manually drawing in
shapes?





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

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