![]() |
Non-contiguous selection
In the recent, cancelled question I asked Dave Peterson
how to select the range for later defining SeriesCollection in the xy-chart: With ActiveSheet Set Rng1 = .Range(.Range(.Cells(1, 2), .Cells(N, 2)), _ .Range(.Cells(1, 6), .Cells(N, 6))) End With It really worked well as far as the columns were contiguous. As soon as the columns were distant (as in the example), all the area was selected, and a number of excessive curves appeared. The problem is how to adapt the range definition so that only two relevant columns are taken. Many thanks to any adviser. Petr |
Non-contiguous selection
Hi
you can use Union in VBA for this to combine to non contingenous ranges -- Regards Frank Kabel Frankfurt, Germany PBezucha wrote: In the recent, cancelled question I asked Dave Peterson how to select the range for later defining SeriesCollection in the xy-chart: With ActiveSheet Set Rng1 = .Range(.Range(.Cells(1, 2), .Cells(N, 2)), _ .Range(.Cells(1, 6), .Cells(N, 6))) End With It really worked well as far as the columns were contiguous. As soon as the columns were distant (as in the example), all the area was selected, and a number of excessive curves appeared. The problem is how to adapt the range definition so that only two relevant columns are taken. Many thanks to any adviser. Petr |
All times are GMT +1. The time now is 02:06 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com