Blank cells in graph

K

Kirsty W

I have a a line graph that displays customer behaviour in a number of
categories. The data source for the graph is a table that refreshes every
time a different 'customer' is selected from a macro drop-down list above the
table, drawing data from another table.

All the blank cells from the table are plotted as zero on the line graph,
and I can't seem to change it so that the blank cells are not plotted on the
line graph at all. I've tried going to Tools>Options>Chart, but the 'Plot
empty cells as' options are all greyed out except for the 'Zero' option-
which I don't want!

Can anyone help......

Thanks
 
D

David Biddulph

Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
 
K

Kirsty W

Hiya

Vlookup is getting the data into the table that feeds the line graph.

=VLOOKUP($B$2,ebookings!$A$4:H31,'Overview - by Cust'!H$99,FALSE)

Even if I put NA() in the cells that the Vlookup is using to get data, which
means NA() is appearing in the table from which the graph feeds, the options
to 'Plot Empty Cells' are still greyed out.

David Biddulph said:
Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
--
David Biddulph

Kirsty W said:
I have a a line graph that displays customer behaviour in a number of
categories. The data source for the graph is a table that refreshes every
time a different 'customer' is selected from a macro drop-down list above
the
table, drawing data from another table.

All the blank cells from the table are plotted as zero on the line graph,
and I can't seem to change it so that the blank cells are not plotted on
the
line graph at all. I've tried going to Tools>Options>Chart, but the 'Plot
empty cells as' options are all greyed out except for the 'Zero' option-
which I don't want!

Can anyone help......

Thanks
 
J

Jon Peltier

If the cell contains a formula, it's not an empty cell. There's no way for a
formula to make Excel think it's an empty cell. The NA() is a trick that
works for line and XY charts, because it suppresses plotting of a point. It
is the equivalent of the Interpolate option of the Plot Empty Cells setting,
so a line connecting points passes across the gap.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


Kirsty W said:
Hiya

Vlookup is getting the data into the table that feeds the line graph.

=VLOOKUP($B$2,ebookings!$A$4:H31,'Overview - by Cust'!H$99,FALSE)

Even if I put NA() in the cells that the Vlookup is using to get data,
which
means NA() is appearing in the table from which the graph feeds, the
options
to 'Plot Empty Cells' are still greyed out.

David Biddulph said:
Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If
you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
--
David Biddulph

Kirsty W said:
I have a a line graph that displays customer behaviour in a number of
categories. The data source for the graph is a table that refreshes
every
time a different 'customer' is selected from a macro drop-down list
above
the
table, drawing data from another table.

All the blank cells from the table are plotted as zero on the line
graph,
and I can't seem to change it so that the blank cells are not plotted
on
the
line graph at all. I've tried going to Tools>Options>Chart, but the
'Plot
empty cells as' options are all greyed out except for the 'Zero'
option-
which I don't want!

Can anyone help......

Thanks
 
K

Kirsty W

Thanks David and Jon,

I've now got it to work!
How should I use the conditional formatting to make the #N/A cells look empty?

Thanks,

David Biddulph said:
Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
--
David Biddulph

Kirsty W said:
I have a a line graph that displays customer behaviour in a number of
categories. The data source for the graph is a table that refreshes every
time a different 'customer' is selected from a macro drop-down list above
the
table, drawing data from another table.

All the blank cells from the table are plotted as zero on the line graph,
and I can't seem to change it so that the blank cells are not plotted on
the
line graph at all. I've tried going to Tools>Options>Chart, but the 'Plot
empty cells as' options are all greyed out except for the 'Zero' option-
which I don't want!

Can anyone help......

Thanks
 
D

David Biddulph

Formula is: =ISNA(A1)
--
David Biddulph

Kirsty W said:
Thanks David and Jon,

I've now got it to work!
How should I use the conditional formatting to make the #N/A cells look
empty?
David Biddulph said:
Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If
you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
....
 
D

David Biddulph

David Biddulph said:
Formula is: =ISNA(A1)

.... and at this point I should have added:
make the font colour white (or whatever your cell background is).

--
David Biddulph
Kirsty W said:
Thanks David and Jon,

I've now got it to work!
How should I use the conditional formatting to make the #N/A cells look
empty?
David Biddulph said:
Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If
you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
...
 
L

linda

and soon if the data is available,it cannot be seen;-)
--
Regards,
Linda


David Biddulph said:
David Biddulph said:
Formula is: =ISNA(A1)

.... and at this point I should have added:
make the font colour white (or whatever your cell background is).

--
David Biddulph
Kirsty W said:
Thanks David and Jon,

I've now got it to work!
How should I use the conditional formatting to make the #N/A cells look
empty?
:

Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead. [If
you
then also want to use conditional formatting to make the N/A# cells look
empty, you can do so.]
...
 
D

David Biddulph

Yes, perhaps (for the benefit of those not familiar with this use of CF) I
should have made it clear that the font colour white advice was meant to go
with the CF ISNA() condition, and not to be applied as the basic format for
the cell. :)
--
David Biddulph

linda said:
and soon if the data is available,it cannot be seen;-)
David Biddulph said:
David Biddulph said:
Formula is: =ISNA(A1)

.... and at this point I should have added:
make the font colour white (or whatever your cell background is).
Thanks David and Jon,

I've now got it to work!
How should I use the conditional formatting to make the #N/A cells
look
empty?
:

Whatever formula you're using to generate your cell contents, if it's
currently setting the result to "", get it to set to NA() instead.
[If
you
then also want to use conditional formatting to make the N/A# cells
look
empty, you can do so.]
...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top