Don't plot non-values on a chart

G

Guest

I have some line graph charts where the the first data point in drawing a line from zero. Thi coul imply the first value is zero but its not.

Example data would be A1 = , A2 = , A3 = 5, A4 = 6, A5 =

The line graph in my mind should plot the values 5,6 and 7 however it is assuming A2 = 0 and is drawing this line. To shed a little more light on this the data source is derived from a custom function where I have told it to return "" if in error. Is this the problem? Is there a way to return nothing from a function so the cell is really empty

Another consideration is that the solution cannot ingore zeros as there are cases these need to be plotted. Essentually I believe I nee to know how to deal with a non-result...

Brian
 
L

LeninVMS

Try returning the worksheet function

na()

This will prevent non-values from being assumed as zeros.

If you return "", the chart will most certainly assume it as a zero.

- Leni
 
G

Guest

Lenin

I tried this but somethings not right. If I enter =na() directly into the cell it does not plot zero (which is what I want

However I want to do this from code as tried the following and test1 returns #VALUE! and test2 return #N/A as a string but excel treats this as 0 (not what I want

Want have I missed

Bria

Function test1(

test1 = Application.WorksheetFunction.na(

End Functio

Function test2(

test2 = "#N/A
End Functio
 

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