Formula that returns values to a scatterplot

karnor

New Member
Joined
Feb 24, 2017
Messages
2
Hi,

I have a series of values for a scatter plot. For some of the values I have created this formula to return values: =IF(LEFT(D43;4)="-N/A";"";D43)

When a cell is -N/A the value for the scatter plot is blank but it doesn't work with with the diagram. All I can do now is to delete the formula and the diagram works. Is there a workaound for this?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
When a cell is -N/A the value for the scatter plot is blank but it doesn't work with with the diagram. All I can do now is to delete the formula and the diagram works. Is there a workaound for this?

Hi
Welcome to the board

"it doesn't work with with the diagram"

What do you mean by this? What happens now and what would you like to happen differently?
 
Last edited:
Upvote 0
Ok, so let's say that cell D43 is -N/A then the formula returns a blank cell (""). However, this still enters a value to the scatter plot even though the cell is blank and distorts the diagram. But if I delete the formula the diagram works fine.
 
Upvote 0
Hi

So you want a gap in the line if the cell does not have a valid value.

This is not possible with just native formulas. Unless the a cell is empty, excel does not break the line.

Solutions:
- you empty those cells where you want the gaps in the line
- you use a udf to adjust the chart input to replace those cells with empty ones

You can also use vba and build a custom solution.

The simplest way, IMO, is to use a udf to replace in the series input ranges those cells that do not have a value with an empty cell.

Jon Peltier posted a small udf that does just that here:

Another approach to plotting gaps in Excel charts - Peltier Tech Blog

Applying a udf like this one to the series input will give you gaps in the line when a cell does not have a valid value.

Does this help?
 
Upvote 0

Forum statistics

Threads
1,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

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