Identifying data points in chart

pholt33

Board Regular
Joined
Jan 4, 2005
Messages
206
Office Version
  1. 365
Platform
  1. Windows
Hi,
I am having trouble making a chart do what I want it to do. I have an XY scatter of dollar values, with one range for negative values so I can format the line red and another range for positive values that I can format as green. So far, so good. I have added a 3rd range of values (blue markers in pic) to identify the profit level for each 1,000 increment in revenue and the breakeven) and then I added error bars.

What I have....

DropLines.jpg



Here, I started manually drawing in lines to show what I am trying to accomplish.

1683135924345.jpeg


How can I make this happen?

Thanks!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
please post your data in a table or xl2bb miniworkbook (preferred, link below).
This can probably be done.
 
Upvote 0
Let's see if this works....

Lines.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1Interval200
2
3RevenueProfitNegPosNegPosXY
4-(1,852)(1,852)#N/A-3.636047(4)#N/ABreakeven-0--
5200(1,698)(1,698)#N/A-(1,852)#N/AOther intervals1,000(1,082)1,000(1,082)
6400(1,544)(1,544)#N/A150#N/A1502,000(312)2,000(312)
7600(1,390)(1,390)#N/A200(1,698)#N/A3,0004583,000458
8800(1,236)(1,236)#N/A400(1,544)#N/A4,0001,2284,0001,228
91,000(1,082)(1,082)#N/A600(1,390)#N/A5,0001,9985,0001,998
101,200(928)(928)#N/A800(1,236)#N/A6,0002,7686,0002,768
111,400(774)(774)#N/A1,000(1,082)#N/A7,0003,5387,0003,538
121,600(620)(620)#N/A1,200(928)#N/A8,0004,3088,0004,308
131,800(466)(466)#N/A1,400(774)#N/A
142,000(312)(312)#N/A1,600(620)#N/A
152,200(158)(158)#N/A1,800(466)#N/A
162,400(4)(4)#N/A2,000(312)#N/A
172,600150#N/A1502,200(158)#N/A
182,800304#N/A3042,400(4)#N/A
193,000458#N/A4582,600#N/A150
203,200612#N/A6122,800#N/A304
213,400766#N/A7663,000#N/A458
223,600920#N/A9203,200#N/A612
233,8001,074#N/A1,0743,400#N/A766
244,0001,228#N/A1,2283,600#N/A920
254,2001,382#N/A1,3823,800#N/A1,074
264,4001,536#N/A1,5364,000#N/A1,228
274,6001,690#N/A1,6904,200#N/A1,382
284,8001,844#N/A1,8444,400#N/A1,536
295,0001,998#N/A1,9984,600#N/A1,690
305,2002,152#N/A2,1524,800#N/A1,844
315,4002,306#N/A2,3065,000#N/A1,998
325,6002,460#N/A2,4605,200#N/A2,152
335,8002,614#N/A2,6145,400#N/A2,306
346,0002,768#N/A2,7685,600#N/A2,460
356,2002,922#N/A2,9225,800#N/A2,614
366,4003,076#N/A3,0766,000#N/A2,768
376,6003,230#N/A3,2306,200#N/A2,922
386,8003,384#N/A3,3846,400#N/A3,076
397,0003,538#N/A3,5386,600#N/A3,230
407,2003,692#N/A3,6926,800#N/A3,384
417,4003,846#N/A3,8467,000#N/A3,538
427,6004,000#N/A4,0007,200#N/A3,692
437,8004,154#N/A4,1547,400#N/A3,846
448,0004,308#N/A4,3087,600#N/A4,000
45Max < 0(4)(4)(4)#N/A7,800#N/A4,154
46-0--8,000
47Min > 0150150#N/A150
48
Scenarios
Cell Formulas
RangeFormula
E4:E47E4=IF($D4<=0,$D4,NA())
F4:F47F4=IF($D4>=0,$D4,NA())
H4:H46H4=UNIQUE(SORT(C4:C47))
I4:I45I4=XLOOKUP($H4,$C$4:$C$47,$E$4:$E$47,,0)
J4:J45J4=XLOOKUP($H4,$C$4:$C$47,$F$4:$F$47,,0)
N4:O4N4=C46
Q4:R12Q4=SORT(N4:O12)
O5:O12O5=XLOOKUP(N5,$C$4:$C$44,$D$4:$D$44,,0)
N6:N12N6=N5+1000
D45D45=AGGREGATE(4,6,E4:E44)
C45,C47C45=INDIRECT("D"&MATCH(D45,D:D,0))
C46C46=C45 + (D46-D45) * (C47-C45) / (D47-D45)
D47D47=AGGREGATE(5,6,F4:F44)
Dynamic array formulas.
 
Upvote 0
Let's see if this works....

Lines.xlsx
ABCDEFGHIJKLMNOPQRSTUV
1Interval200
2
3RevenueProfitNegPosNegPosXY
4-(1,852)(1,852)#N/A-3.636047(4)#N/ABreakeven-0--
5200(1,698)(1,698)#N/A-(1,852)#N/AOther intervals1,000(1,082)1,000(1,082)
6400(1,544)(1,544)#N/A150#N/A1502,000(312)2,000(312)
7600(1,390)(1,390)#N/A200(1,698)#N/A3,0004583,000458
8800(1,236)(1,236)#N/A400(1,544)#N/A4,0001,2284,0001,228
91,000(1,082)(1,082)#N/A600(1,390)#N/A5,0001,9985,0001,998
101,200(928)(928)#N/A800(1,236)#N/A6,0002,7686,0002,768
111,400(774)(774)#N/A1,000(1,082)#N/A7,0003,5387,0003,538
121,600(620)(620)#N/A1,200(928)#N/A8,0004,3088,0004,308
131,800(466)(466)#N/A1,400(774)#N/A
142,000(312)(312)#N/A1,600(620)#N/A
152,200(158)(158)#N/A1,800(466)#N/A
162,400(4)(4)#N/A2,000(312)#N/A
172,600150#N/A1502,200(158)#N/A
182,800304#N/A3042,400(4)#N/A
193,000458#N/A4582,600#N/A150
203,200612#N/A6122,800#N/A304
213,400766#N/A7663,000#N/A458
223,600920#N/A9203,200#N/A612
233,8001,074#N/A1,0743,400#N/A766
244,0001,228#N/A1,2283,600#N/A920
254,2001,382#N/A1,3823,800#N/A1,074
264,4001,536#N/A1,5364,000#N/A1,228
274,6001,690#N/A1,6904,200#N/A1,382
284,8001,844#N/A1,8444,400#N/A1,536
295,0001,998#N/A1,9984,600#N/A1,690
305,2002,152#N/A2,1524,800#N/A1,844
315,4002,306#N/A2,3065,000#N/A1,998
325,6002,460#N/A2,4605,200#N/A2,152
335,8002,614#N/A2,6145,400#N/A2,306
346,0002,768#N/A2,7685,600#N/A2,460
356,2002,922#N/A2,9225,800#N/A2,614
366,4003,076#N/A3,0766,000#N/A2,768
376,6003,230#N/A3,2306,200#N/A2,922
386,8003,384#N/A3,3846,400#N/A3,076
397,0003,538#N/A3,5386,600#N/A3,230
407,2003,692#N/A3,6926,800#N/A3,384
417,4003,846#N/A3,8467,000#N/A3,538
427,6004,000#N/A4,0007,200#N/A3,692
437,8004,154#N/A4,1547,400#N/A3,846
448,0004,308#N/A4,3087,600#N/A4,000
45Max < 0(4)(4)(4)#N/A7,800#N/A4,154
46-0--8,000
47Min > 0150150#N/A150
48
Scenarios
Cell Formulas
RangeFormula
E4:E47E4=IF($D4<=0,$D4,NA())
F4:F47F4=IF($D4>=0,$D4,NA())
H4:H46H4=UNIQUE(SORT(C4:C47))
I4:I45I4=XLOOKUP($H4,$C$4:$C$47,$E$4:$E$47,,0)
J4:J45J4=XLOOKUP($H4,$C$4:$C$47,$F$4:$F$47,,0)
N4:O4N4=C46
Q4:R12Q4=SORT(N4:O12)
O5:O12O5=XLOOKUP(N5,$C$4:$C$44,$D$4:$D$44,,0)
N6:N12N6=N5+1000
D45D45=AGGREGATE(4,6,E4:E44)
C45,C47C45=INDIRECT("D"&MATCH(D45,D:D,0))
C46C46=C45 + (D46-D45) * (C47-C45) / (D47-D45)
D47D47=AGGREGATE(5,6,F4:F44)
Dynamic array formulas.
which is the section you want charted?
 
Upvote 0
H:J are the red and green lines. Q:R are the blue dots with error bars.
 
Upvote 0
H:J are the red and green lines. Q:R are the blue dots with error bars.
im confused. where did error bars and blue dots come from? I thought you were plotting revenue vs profit.
I took profit and split it up in to loss/gain, plotted against revenue.

But, my problem is I can't get x axis to be numerical. It looks numerical but the spacing is not. Strange.
 
Last edited:
Upvote 0
I've adjusted your data to have both values at switch over show up on the POS/NEG lines to ensure line connectivity.
mr excel questions 34.xlsm
HIJK
1
2
3RentCashflowNegPos
40-1851.636047-1851.636047#N/A
5200-1697.636047-1697.636047#N/A
6400-1543.636047-1543.636047#N/A
7600-1389.636047-1389.636047#N/A
8800-1235.636047-1235.636047#N/A
91000-1081.636047-1081.636047#N/A
101200-927.636047-927.636047#N/A
111400-773.636047-773.636047#N/A
121600-619.636047-619.636047#N/A
131800-465.636047-465.636047#N/A
142000-311.636047-311.636047#N/A
152200-157.636047-157.636047#N/A
162400-3.636046986-3.636046986-3.636046986
172600150.363953150.363953150.363953
182800304.363953#N/A304.363953
193000458.363953#N/A458.363953
203200612.363953#N/A612.363953
213400766.363953#N/A766.363953
223600920.363953#N/A920.363953
2338001074.363953#N/A1074.363953
2440001228.363953#N/A1228.363953
2542001382.363953#N/A1382.363953
2644001536.363953#N/A1536.363953
2746001690.363953#N/A1690.363953
2848001844.363953#N/A1844.363953
2950001998.363953#N/A1998.363953
3052002152.363953#N/A2152.363953
3154002306.363953#N/A2306.363953
3256002460.363953#N/A2460.363953
3358002614.363953#N/A2614.363953
3460002768.363953#N/A2768.363953
3562002922.363953#N/A2922.363953
3664003076.363953#N/A3076.363953
3766003230.363953#N/A3230.363953
3868003384.363953#N/A3384.363953
3970003538.363953#N/A3538.363953
4072003692.363953#N/A3692.363953
4174003846.363953#N/A3846.363953
4276004000.363953#N/A4000.363953
4378004154.363953#N/A4154.363953
4480004308.363953#N/A4308.363953
pholt33_2
Cell Formulas
RangeFormula
J4:J44J4=IF($D4<0,$D4,IF(AND(D4>=0,N(D3)<=0),D4,NA()))
K4:K44K4=IF(OR($D4>0,AND($D4<0,$D5>=0)),$D4,NA())




1683139899317.png
 

Attachments

  • 1683139842050.png
    1683139842050.png
    14.3 KB · Views: 10
Upvote 0
im confused. where did error bars and blue dots come from? I thought you were plotting revenue vs profit.
I too profit and split it up in to loss/gain, plotted against revenue.

But, my problem is I can't get x axis to be numerical. Strange.
The blue dots are from Q4:R12, which is a subset of the full data but only for 1,000 increments plus the breakeven amount. Those plot on top of the red and green lines. I did that so it would (theoretically) be easier to do the lines I want.

1683140119433.png
 
Upvote 0
The blue dots are from Q4:R12, which is a subset of the full data but only for 1,000 increments plus the breakeven amount. Those plot on top of the red and green lines. I did that so it would (theoretically) be easier to do the lines I want.

View attachment 90891
then do the same for those as with neg/pos... put a value of NA() in the cells that are not in the number intervals you want.

for the dots, you can add markers and change their size in any of the series options. I don't think you need to create a new series just for that..

but I was also looking into "drop" and "High Low" Lines but those don't seem to work as I think you want.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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