How to get a chart to ignore blank cells in data?

leojez

Board Regular
Joined
Apr 12, 2022
Messages
51
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a chart which includes blank cells for the series data of the line. I'd like the chart to ignore the blanks completely - as you can see, it currently pots those blank cells at zero:

1656415090852.png


The formula I have in the blank cells is

Code:
=IF(L17<>"",IFERROR(N17/J17,"0%"),"")

I'd like the chart only to plot data that is not blank. Any ideas please?

Thank you!
 
I want the chart to start at the first date when there is data. So it should look like this:
Actually, your chart starts from 0% so it is actually starting at the last date that does not have data isn't it?

Then I think that you may have to set up a different range to get the chart data for that chart and use that, with a few tricks, to get the chart.
This is how I did it
  • New formula in column O (& it is deliberate that there is a reference to row 7 in the row 8 formula)
  • New section with dynamic array formulas for the week ending dates and ROI2 percentages. Mine is in N23:O23 and below.
  • The trick to using spill ranges via named ranges is described in this video.
Mini-Sheet

leojez.xlsm
BIJKLMNO
7Week endingColumn2Capital2Close ($)2Close2Wkly profit2Cum profit2ROI2
822-Jul-223000030000360000600020%
915-Jul-223000030000360000600020%
1008-Jul-2230000300003600036000600020%
1101-Jul-22  0%
1224-Jun-22   
1317-Jun-22   
1410-Jun-22   
1503-Jun-22   
1627-May-22   
1720-May-22   
1813-May-22   
1906-May-22   
2029-Apr-22   
2122-Apr-22   
22
23WEROI2
2401-Jul-220%
2508-Jul-2220%
2615-Jul-2220%
2722-Jul-2220%
28
Sheet3
Cell Formulas
RangeFormula
M8:M21M8=IF(L8<>"",(L8-L9),"")
N8:N21N8=IF(L8<>"",(L8-J8),"")
O8:O21O8=IF(L8<>"",N8/J8,IF(L7<>"",0,""))
B8:B20B8=IFERROR((B9+7),"")
N24:N27N24=LET(t,FILTER(B8:B21,O8:O21<>""),rws,ROWS(t),INDEX(t,SEQUENCE(rws,,rws,-1)))
O24:O27O24=LET(t,FILTER(O8:O21,O8:O21<>""),rws,ROWS(t),INDEX(t,SEQUENCE(rws,,rws,-1)))
Dynamic array formulas.


Image

1656724655477.png
 
Last edited:
Upvote 0
Solution

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
You're welcome. Thanks for the follow-up. :)
 
Upvote 0
Your problem is that you are plotting actual dates against cells which may have #N/A (upper data range and chart in image below). There is no point for these cells, but there are still dates, so the axis shows them.

But if the value in the date column and the value in the ROI column are both #N/A, then there will be no points for that data pair, no dates, and no space along the axis.

In the second data range and chart below, I've inserted another column for the dates in the specific chart. The formula in cell C14 is:
.
Excel Formula:
=IF(ISNA(D14),NA(),B14)

The second chart uses this inserted column as its X values.

NA_Dates.png
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,982
Members
449,201
Latest member
Lunzwe73

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