View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Discontinuous Range via VBA using R1C1?

In line -

"(PeteCresswell)" wrote in message
...
Per Jon Peltier:
.Rows.Count and .Columns.Count only look at the first area of a
discontiguous range. You can do a loop:


I think I'm trying to fool Mother Nature on this one.... with the

discontinuous
range.

Seems like a more direct approach would be for me to just pick apart the

larger
range cell-by-cell and grab what I need.


Why doesn't Jon's advice work for you.

But that means that I'd need to store that range address somewhere in the
chart object.


Isn't the range defined and hence stored in the series formula(s)

The series behind the chart won't do because it's just a subset of the
larger range. But when I create the chart, I know what the larger range

is.

Tried .Chart.Name (after massaging the range, replacing ":" with "-") but

it
didn't take.


Chart names are more restricted than shape names in terms of allowable
punctuation characters. Replace ":" in the formula with something,
underscore is good.

Looked for something like .Tag, but didn't find it.


There's no tag or Alternative text property. Some text box perhaps, made not
visible.

Can you think of some chart or shape property that I could use to squirrel

away
a range address like "R3C02:R25C17"?


Why R1C1 and not A1, look at app.ConvertFormula. What happens if the
harcoded range is moved !


Even if I could make .Name stick, it would seem a dicey in that two charts

with
the same macro data range would break my little scheme.
--
PeteCresswell


Regards,
Peter T