Line Chart Issue

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Hi

I'm attempting to show the last value in column D (cell D5 in this case) as an output in D9 (D9 needs to capture the last value in the column).

Obviously the #N/A from cells D6 to D8 are causing the result however, I need the #N/A to be there when there is no value in column A. The reason for the #N/A in column D (cells 1 to 8) is that it is driving a line chart on another worksheet and the #N/A is required to cutoff the line in the chart with the last value because if column D did not show #N/A and instead showed a blank or zero, the chart line would dip abruptly from its last value to zero. I am trying to avoid this abrupt dip in the chart at the last value by showing #N/A in column D but unfortunately it also destroys the last value output that I need to also show in cell D9.

Two objectives required - 1) Last value of column D to be shown in cell D9 and 2) column D able to drive a line chart but not show an abrupt dip in the line when there is a null value.

Thanks and open to suggestions.

Book1
ABCD
122/06/20232016320
223/06/20232317391
324/06/20232518450
425/06/202327621674
526/06/202329421218
6#N/A
7#N/A
8#N/A
9#N/A
Sheet5
Cell Formulas
RangeFormula
D1:D8D1=IF(A1="",#N/A,(B1*C1))
D9D9=INDEX(D1:D8,MAX(ROW(D1:D8)*(D1:D8<>"")))
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
How about
Excel Formula:
=LOOKUP(2,1/(D1:D8<>"#N/A"),D1:D8)
 
Upvote 0
Solution
Hi Fluff

Brilliant !!! Thanks very much - works fine.

Have a good day.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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