Prevent a dynamic line chart from interpreting formula output of "" as 0?

wrecclesham

Board Regular
Joined
Jul 24, 2019
Messages
52
Office Version
  1. 365
Platform
  1. Windows
I have a formula in a table that uses an IF function. The output of the formula dynamically plots a line chart.

The problem I'm experiencing is that if the output of the IF function is False, then the "" value output is interpreted by the dynamic line chart as a zero instead of a blank cell, and a line is plotted at 0.

What is supposed to happen is that nothing should be plotted at all where the formula outputs "".

How can my formula output a blank cell output in such a way as to prevent the corresponding dynamic line chart from treating it as a "0" and plotting a line through zero?
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Re: How to prevent a dynamic line chart from interpreting forumula output of "" as 0?

Have you tried replacing the "" result of the formula with NA()

Code:
=IF(Test,Positive,NA())
 
Upvote 0
Re: How to prevent a dynamic line chart from interpreting forumula output of "" as 0?

Great. Thank you.

I was initially trying to get the table to show a blank cell but I now realize that that wasn't important and it's fine if it shows #N/A. The only thing that matters is that the graph plots the right lines and that it plots nothing at all where it's not supposed to.

Your solution looked different to what I was expecting but actually does exactly what I wanted! Very cool.
 
Upvote 0
Re: How to prevent a dynamic line chart from interpreting forumula output of "" as 0?

No worries, glad to help.

If you want the appearance of a blank cell then you can always use Conditional Formatting to hide it.

'Conditional Formatting > New Rule > Use a Formula to determine...'

Using A1 as an example, use;

Code:
=ISNA(A1)

As your formula.

Format the condition so that it appears "blank" (white on white text, etc.)

Hope that helps :)
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,117
Members
453,021
Latest member
Justyna P

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