Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
Non-contiguous selection Kay Excel Discussion (Misc queries) 3 May 9th 08 05:20 AM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Help : Code for selection non-contiguous cells Majeed Excel Programming 1 November 24th 03 06:49 PM


All times are GMT +1. The time now is 09:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"