Learn how to a build a cloud-first strategyRegister Now

x
Solved

# Fill an area between two lines in a chart in Excel

Posted on 2014-07-11
Medium Priority
7,229 Views
Hi Experts,

On the website below, it shows how to fill an area between two lines in a chart in Excel.
http: //superuser.com/questions/233027/fill-an-area-between-two-lines-in-a-chart-in-excel

I'm trying to use the above example to plot a graph of Revenue vs. Expenses on a monthly basis, and I'd like to colour the area between the lines to show the gap.

Is it possible to have two different colours for the areas between the lines though?

If Revenue line is greater than Expense line, I'd like to have the area coloured green.  If Revenue line is less than the Expense line, I'd like to have the area coloured red.

Thanks
0
Question by:rav_rav
• 2

LVL 50

Expert Comment

ID: 40190420
Hello,

Jon Peltier has two articles that might be helpful to find your optimal approach:

Fill under or between series in an XY chart
http://peltiertech.com/WordPress/fill-under-between-series-in-excel-chart/

and

Area Chart – Invert if Negative
http://peltiertech.com/WordPress/area-chart-invert-if-negative/

For your scenario, the second option might be a better fit.

The articles are a bit too long to quote here. Suffice it to say that in both approaches a stacked area chart is used to create the illusion of a fill color between two lines.

Let me know how you get on and if you need more help with the approach.

cheers, teylyn
0

Accepted Solution

rav_rav earned 0 total points
ID: 40191484
Thanks Teyln.  The first article is similar to the website I referenced on superuser.  The second article uses an approximation technique which I'm not sure would give me the accuracy I want.

By chance, do you have a sample Excel file already with the inverted graph?  I'd like to see how well it mirrors my existing data points?

Thanks
0

Author Closing Comment

ID: 40221176
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month21 days, 1 hour left to enroll