View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.charting
kippers kippers is offline
external usenet poster
 
Posts: 51
Default Data label doesn't match data point!

Hi,

Thanks very much for the responses- really helpful.

I've changed the source string to reflect the new worksheet and the graphics
within the chart have updated fine to reflect the new data. However, the
data label (category name and value) still reflects the old data (even though
the actual bar graphic on the bar chart points to the new data value). If I
deselect the data values and then reselect them they do update, but this will
take me ages to do for 10-12 data points on 50-60 graphs!

Does anyone know if there is there any way round this?

Any help gratefully appreciated!

R

"PBezucha" wrote:

... or automatize the second method proposed by Bernard with the following
macro:

Sub CurveToActiveSheet()
'Sub transfers the selected series from a chart that has been copied
'from another workbook/worksheet to the data source in the same position
'as they were in the original worksheet.
'PBezucha, 2007
Dim F As String, P1 As Long, P2 As Long, Ser As Variant
Set Ser = Selection
On Error GoTo ErrExit
F = Ser.Formula
P1 = InStrRev(F, ",", -1)
P2 = InStrRev(F, "'", P1)
If P2 = 0 Then P2 = InStrRev(F, "!", P1)
P1 = InStrRev(F, "'", P2 - 1)
If P1 = 0 Then P1 = InStrRev(F, ",", P2)
Ser.Formula = Replace(F, Mid(F, P1 + 1, P2 - P1 - 1), _
ActiveSheet.Name, 1, 3)
On Error GoTo 0
Exit Sub
ErrExit:
MsgBox "No chart series has been selected"
End Sub

Regards
--
Petr Bezucha


"kippers" wrote:

Hi,

I currently have a number of graphs (10-12) that I need to replicate (for
different data obviously) across 14 worksheets (approx 140-150 graphs in
total). I am copying the relevant worksheet into the different work books
and amending the source range, however, I have noticed that the data values
do not automatically update (even when the rest of the graph does). So I can
have a bar chart showing one figure and the data label saying another.

Does anyone know of updating the data values automatically i.e. to reflect
the data point that the data value is representing? If not, Ill have to go
through each graph individually which probably wont be feasible.

Any help much appreciated!

R