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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

mart37

Well-known Member
Joined
Aug 4, 2017
Messages
1,094
Office Version
  1. 2016
Platform
  1. Windows
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
 
Solution

MrAWilks

New Member
Joined
Mar 23, 2021
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2013
Platform
  1. Windows
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?
 

Watch MrExcel Video

Forum statistics

Threads
1,133,270
Messages
5,657,756
Members
418,411
Latest member
Excellency

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
Top