Line graph - change colour if number decreases

MrAWilks

New Member
Joined
Mar 23, 2021
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
Good afternoon,

I have some data already in a combo chart, a mixture of stacked columns and a line.

The data for the line predominantly goes up in order, e.g. 1,2,3,4,5

However their may be some instances where the data will decrease, e.g. 1,2,3,2,1

I would like the line for the data where it decreases to be changed to a different colour than the rest of the line automatically, without having to manually go in and change it, as it could be at a different data point each time.

Any help would be greatly appreciated.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
You can do a workaround with a double line.
Map6
ABCDE
1Col2Col3Col4col5
2item220101010
3item322151111
4item424201515
5item5262511#N/B
6item6283010#N/B
7item7303599
8item832402020
Sheet11
Cell Formulas
RangeFormula
E2:E8E2=IF(OR(D2>D1,D3>D2),D2,NA())

1616509099886.png
 
Upvote 0
Solution
Thank you for this, appreciate the reply.

It kind of did what I was looking for, however found it tricky getting the right line to take priority if that makes sense. Think it may be something I was missing with the Gaps, Zero, Connect option?
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top