PC Review


Reply
Thread Tools Rate Thread

Bar graph w/ no value (#N/A)

 
 
Aimee
Guest
Posts: n/a
 
      16th Jul 2003
I am creating a graph using bars and would like to include
the values on the bar. However, if the value is #N/A, an
extraneous "#N/A" is displayed on the graph. Is there any
way to suppress this?
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      16th Jul 2003
Aimee -

This macro removes #N/A and zero from the datalabels in the active chart:

Sub OutNA()
Dim mySrs As Series
Dim myPt As Point
Dim myLbl As DataLabel
Dim iPtIx As Integer
Dim iPtCt As Integer
For Each mySrs In ActiveChart.SeriesCollection
iPtCt = mySrs.Points.Count
For iPtIx = iPtCt To 1 Step -1
If mySrs.DataLabels(iPtIx).Text = "#N/A" Then
mySrs.DataLabels(iPtIx).Text = ""
ElseIf mySrs.Values(iPtIx) = 0 Then
mySrs.DataLabels(iPtIx).Text = ""
End If
Next
Next
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Aimee wrote:
> I am creating a graph using bars and would like to include
> the values on the bar. However, if the value is #N/A, an
> extraneous "#N/A" is displayed on the graph. Is there any
> way to suppress this?


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
display dots inside a cell in graph form but without Excel graph? Rich Microsoft Excel Programming 8 25th Nov 2009 05:21 AM
Hyperlinkage of one graph with another graph or Drill down graph =?Utf-8?B?U2FuamF5IEt1bWFyIFNpbmdo?= Microsoft Excel Charting 1 3rd Jan 2006 12:22 PM
My Graph in access keeps on showing North Wind graph and not data. =?Utf-8?B?ZHVkbGV5?= Microsoft Access Database Table Design 0 28th Sep 2004 03:03 AM
Graph Feature is reinstalled each time I open graph on existing database Louis Microsoft Access Getting Started 0 16th Oct 2003 06:17 PM
Graph Feature is reinstalled each time I open graph on existing database Louis Microsoft Access Form Coding 0 16th Oct 2003 06:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:04 AM.