+ Reply to Thread
Results 1 to 7 of 7

Selecting Non Contiguous Cell Ranges using a macro

  1. #1
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Selecting Non Contiguous Cell Ranges using a macro

    I can select non contiguous cells using

    Please Login or Register  to view this content.
    with no problem

    I can further select to the end of one column data with:

    Please Login or Register  to view this content.
    with no problem


    however when I try to put these together I using the following:

    Please Login or Register  to view this content.

    I get the error:

    Run-time error '1004':
    Method 'Range' of object '_Global' failed

    I searched in vba help for what this may mean but no results found.
    Last edited by capnhud; 06-16-2010 at 03:10 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Selecting Non Contiguous Cell Ranges using a macro

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Selecting Non Contiguous Cell Ranges using a macro

    @sht

    this results in a compile error

    Expected: identifier or bracketed expression

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Selecting Non Contiguous Cell Ranges using a macro

    Those three dots are where you put in the other range, just as in the first two.

  5. #5
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Selecting Non Contiguous Cell Ranges using a macro

    I had put in like this:

    Please Login or Register  to view this content.
    and still a compile error

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Selecting Non Contiguous Cell Ranges using a macro

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-04-2007
    MS-Off Ver
    Excel 2007
    Posts
    94

    Re: Selecting Non Contiguous Cell Ranges using a macro

    I thought I had to duplicate exactly what had been done previously. This works perfectly.

+ 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