I have a bunch of graphs that every now and then I have to change the location
of the source data. This is easy. I can use this code in a for loop using
arrays:
For i= 1 to UBound(GrfArray) 'GrfArray and RngArray same size
ActiveSheet.ChartObjects(GrfArray(i)).Activate 'array of graphnames
ActiveChart.SetSourceData Source:=Sheets("GraphData").Range(RngArray(i))
Next i
'array of dataranges
But what if I want to find out what the source data is? (do the above operation
in reverse) as in pseudo code here:
SourceData = ActiveSheet.ChartObjects("Chart 1").DataRange
I have tried using a variant variable, a range variable, but no luck.
Essentially, I want to get the following string (from the graph's DataSource
View on the Graph)
Data Range =Sheet1!$M$55:$N$59
through code. Does anyone know if there is syntax for doing this and what that
syntax would be?
Thanks very much,
Rich
http://www.j-walk.com/ss/excel/tips/tip83.htm
David Hager
MVP - Microsoft Excel
Baton Rouge, La.
RICHIETOO wrote in message <19990830161149...@ng-ch1.aol.com>...
I am out of order on the problem according to:
I try to format automatically cells according to their contents. My
knowledge in VB for Excel is insufficient, has anybody solution?
Thank you beforehand.
Michel MOREAU
P.S. further information:
I leave of a data base ( FoxPro), I create sheet XLS which is of use of
"draft" to another sheet. In this one some cells or lines have to appear in
fat according to the contents. In fact I am incapable to look for a
character string in a sheet to create a conditional formatting.
Check out the ADDRESS function.
Tim
Essentially, I want to get the following string (from the graph's
DataSource
> View on the Graph)
>
> Data Range =Sheet1!$M$55:$N$59
>
> through code.
In article <19990830161149...@ng-ch1.aol.com>,
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
In a result set that has column G with state abbreviations, this code makes
all the entries with WA turn bold:
Sub Macro2()
Columns("G:G").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=""WA"""
With Selection.FormatConditions(1).Font
.Bold = True
End With
End Sub
-Jim
----------
In article <7qh6f8$4hk$1...@wanadoo.fr>, "michel.moreau11"