+ Reply to Thread
Results 1 to 3 of 3

Cells used in Non-Contiguous Range?

  1. #1
    Registered User
    Join Date
    11-02-2004
    Location
    Slovenia, LJ
    MS-Off Ver
    2007
    Posts
    40

    Cells used in Non-Contiguous Range?

    Hello,

    I want to select the non-contiguous Range with Cells property, but I don't know if it's possible? I know that's possible for contiguous range:

    Range(Cells(1,1), Cells(2,2)).Select

    This will select range A1:B2! But, I want to select just A1 and B2 (non-contiguous Range) and I want to do it with cells property (good for looping).
    Is this possible?

    Thanx

    Dr.Ile

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Dr.Ile,

    To select non contiguous cells you have to use the Union method.

    Select Both "A1" and "B2" Example:
    Union(ActiveSheet.Cells(1, 1), ActiveSheet.Cells(2, 2)).Select

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-02-2004
    Location
    Slovenia, LJ
    MS-Off Ver
    2007
    Posts
    40
    Thank you Ross

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1