Chart Line Color - Blue when increasing and Red when decreasing

LAAdams17

Board Regular
Joined
Oct 23, 2009
Messages
73
I'm trying for find a way to show line chart in a manner that when the values are equal to or greater than the prior day the line color is blue and when the values are decreasing the line color is red. I've gotten part of the way there by overlaying two lines. Is there a simpler way to do this in Excel 365? If not, can anyone help get rid of the lines when my values are ""? Thanks in advance.

Riding the Waves development 230421.xlsx
ABCDEF
1DateyTwoDate.UpDown
212/12/22170.7112/12/22170.7125
312/13/22168.9912/13/22168.9943
412/14/22167.4312/14/22167.4271
512/15/22165.8012/15/22165.8003
612/16/22163.6812/16/22163.6842
712/19/22161.1412/19/22161.1445
812/20/22157.8412/20/22157.8355
912/21/22154.4512/21/22154.4506
1012/22/22150.3312/22/22150.3322
1112/23/22146.4412/23/22146.4384
1212/27/22141.0212/27/22141.0163
1312/28/22136.6712/28/22136.6746
1412/29/22133.3212/29/22133.3248
1512/30/22130.3912/30/22130.386
1601/03/23125.9201/03/23125.9185
1701/04/23122.4001/04/23122.4009
1801/05/23118.7401/05/23118.7367
1901/06/23115.9701/06/23115.968
2001/09/23114.0701/09/23114.0663
2101/10/23112.3601/10/23112.358
2201/11/23111.3801/11/23111.3761
2301/12/23110.6301/12/23110.6293
2401/13/23110.0501/13/23110.0482
2501/17/23109.9101/17/23109.9074
2601/18/23109.7701/18/23109.7658
2701/19/23109.3901/19/23109.3892
2801/20/23109.2701/20/23109.2712
2901/23/23109.8701/23/23109.8739
3001/24/23110.0501/24/23110.0509
3101/25/23110.8701/25/23110.8744
3201/26/23113.2501/26/23113.2468
3301/27/23116.8701/27/23116.8712
3401/30/23119.7901/30/23119.7924
3501/31/23122.9901/31/23122.9883
3602/01/23126.7002/01/23126.7023
3702/02/23130.8302/02/23130.834
3802/03/23134.5902/03/23134.5866
3902/06/23138.7402/06/23138.7399
4002/07/23143.5302/07/23143.5256
4102/08/23148.6102/08/23148.6135
4202/09/23154.1302/09/23154.1286
4302/10/23158.6902/10/23158.6928
4402/13/23163.6002/13/23163.5994
4502/14/23169.6402/14/23169.6405
4602/15/23176.0402/15/23176.0413
4702/16/23180.9502/16/23180.9528
4802/17/23186.2002/17/23186.1998
4902/21/23190.3002/21/23190.2991
5002/22/23194.5902/22/23194.5905
5102/23/23199.1402/23/23199.1357
5202/24/23202.7702/24/23202.7746
5302/27/23206.9102/27/23206.9051
5402/28/23210.6102/28/23210.6106
5503/01/23214.0103/01/23214.0075
5603/02/23216.0803/02/23216.0791
5703/03/23218.5803/03/23218.5755
5803/06/23220.1703/06/23220.1674
5903/07/23221.1403/07/23221.1446
6003/08/23221.0703/08/23221.0717
6103/09/23220.0703/09/23220.0724
6203/10/23218.4303/10/23218.4344
6303/13/23216.8703/13/23216.8702
6403/14/23216.2103/14/23216.2068
6503/15/23215.2403/15/23215.2351
6603/16/23213.8103/16/23213.8111
6703/17/23212.1203/17/23212.1192
6803/20/23210.3803/20/23210.3812
6903/21/23209.6903/21/23209.6931
7003/22/23208.5803/22/23208.5752
7103/23/23207.3403/23/23207.3357
7203/24/23205.9603/24/23205.9578
7303/27/23204.5403/27/23204.5441
7403/28/23202.7203/28/23202.72
7503/29/23201.4703/29/23201.4664
7603/30/23200.0703/30/23200.0664
7703/31/23199.3903/31/23199.3913
7804/03/23197.7904/03/23197.7919
7904/04/23196.2904/04/23196.2913
8004/05/23194.1304/05/23194.1333
8104/06/23191.8604/06/23191.8631
8204/10/23190.0904/10/23190.0883
8304/11/23189.1404/11/23189.1386
8404/12/23187.2304/12/23187.2332
8504/13/23185.9704/13/23185.9736
8604/14/23184.9404/14/23184.942
8704/17/23184.3304/17/23184.3347
8804/18/23183.5904/18/23183.5867
8904/19/23182.7504/19/23182.7544
Sheet3


ChartingImage2.jpg
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
this is definitely doable. You need to create two data series, one for the red, one for the blue. when a value changes direction from you need to put the value as NA() so it does not chart. Then format the two series with the different line color.
 
Upvote 0
this is without a repeating value at the inflection point which would make the line continuous:
1682382486093.png
 
Upvote 0
Here is the up down formulas with lines continuous::
mr excel questions 27.xlsm
ABCDHIJ
1DateyTwoDate.updown
244907170.71249362022-12-12170.7125170.7125
344908168.99430492022-12-13#N/A168.9943
444909167.42712872022-12-14#N/A167.4271
544910165.80028132022-12-15#N/A165.8003
644911163.68416352022-12-16#N/A163.6842
744914161.14451632022-12-19#N/A161.1445
844915157.83550512022-12-20#N/A157.8355
944916154.45061152022-12-21#N/A154.4506
1044917150.3321882022-12-22#N/A150.3322
1144918146.4383532022-12-23#N/A146.4384
1244922141.0163062022-12-27#N/A141.0163
1344923136.67458852022-12-28#N/A136.6746
1444924133.32475332022-12-29#N/A133.3248
1544925130.38597662022-12-30#N/A130.386
1644929125.91849412023-01-03#N/A125.9185
1744930122.40094122023-01-04#N/A122.4009
1844931118.73672922023-01-05#N/A118.7367
1944932115.96795252023-01-06#N/A115.968
2044935114.06630522023-01-09#N/A114.0663
2144936112.35797562023-01-10#N/A112.358
2244937111.37614062023-01-11#N/A111.3761
2344938110.62926962023-01-12#N/A110.6293
2444939110.04818772023-01-13#N/A110.0482
2544943109.90736452023-01-17#N/A109.9074
2644944109.76576442023-01-18#N/A109.7658
2744945109.38915252023-01-19#N/A109.3892
2844946109.2711762023-01-20109.2712109.2712
2944949109.87388212023-01-23109.8739#N/A
3044950110.05094072023-01-24110.0509#N/A
3144951110.87442262023-01-25110.8744#N/A
3244952113.24675252023-01-26113.2468#N/A
3344953116.8711992023-01-27116.8712#N/A
3444956119.79239932023-01-30119.7924#N/A
3544957122.98828172023-01-31122.9883#N/A
3644958126.7023292023-02-01126.7023#N/A
3744959130.83397652023-02-02130.834#N/A
3844960134.58658782023-02-03134.5866#N/A
3944963138.73992882023-02-06138.7399#N/A
4044964143.52557562023-02-07143.5256#N/A
4144965148.61345752023-02-08148.6135#N/A
4244966154.12858752023-02-09154.1286#N/A
4344967158.69284632023-02-10158.6928#N/A
4444970163.59941092023-02-13163.5994#N/A
4544971169.64054022023-02-14169.6405#N/A
4644972176.04129362023-02-15176.0413#N/A
4744973180.95275182023-02-16180.9528#N/A
4844974186.19976382023-02-17186.1998#N/A
4944978190.29908082023-02-21190.2991#N/A
5044979194.59049282023-02-22194.5905#N/A
5144980199.13574062023-02-23199.1357#N/A
5244981202.77463542023-02-24202.7746#N/A
5344984206.90505922023-02-27206.9051#N/A
5444985210.61056582023-02-28210.6106#N/A
5544986214.00750732023-03-01214.0075#N/A
5644987216.07905962023-03-02216.0791#N/A
5744988218.57550592023-03-03218.5755#N/A
5844991220.16736472023-03-06220.1674#N/A
5944992221.14458912023-03-07221.1446221.1446
6044993221.07167142023-03-08#N/A221.0717
6144994220.07242432023-03-09#N/A220.0724
6244995218.4344482023-03-10#N/A218.4344
6344998216.87023592023-03-13#N/A216.8702
6444999216.20682372023-03-14#N/A216.2068
6545000215.23505892023-03-15#N/A215.2351
6645001213.81108272023-03-16#N/A213.8111
6745002212.11922432023-03-17#N/A212.1192
6845005210.38117712023-03-20#N/A210.3812
6945006209.69305962023-03-21#N/A209.6931
7045007208.57520022023-03-22#N/A208.5752
7145008207.33567082023-03-23#N/A207.3357
7245009205.95776522023-03-24#N/A205.9578
7345012204.54407092023-03-27#N/A204.5441
7445013202.71995352023-03-28#N/A202.72
7545014201.46644822023-03-29#N/A201.4664
7645015200.0664482023-03-30#N/A200.0664
7745016199.39131912023-03-31#N/A199.3913
7845019197.79193112023-04-03#N/A197.7919
7945020196.29134292023-04-04#N/A196.2913
8045021194.13327262023-04-05#N/A194.1333
8145022191.86313092023-04-06#N/A191.8631
8245026190.08828362023-04-10#N/A190.0883
8345027189.13863572023-04-11#N/A189.1386
8445028187.23317642023-04-12#N/A187.2332
8545029185.97364662023-04-13#N/A185.9736
8645030184.94199972023-04-14#N/A184.942
8745033184.33470522023-04-17#N/A184.3347
8845034183.58672842023-04-18#N/A183.5867
8945035182.75444562023-04-19#N/A182.7544
90
LLAdams17
Cell Formulas
RangeFormula
H2:H89H2=IF(AND($B2<$B1,$B2<$B3,$B2),$B2, IF($B2>N($B1),$B2,NA()))
I2:I89I2=IF(AND($B2>=N($B1),$B2>=$B3),$B2, IF($B2<=N($B1),$B2,NA()))


and here is the chart:
1682383726080.png
 
Upvote 0
Solution
My pleasure. I am happy you found a solution.

Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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