+ Reply to Thread
Results 1 to 8 of 8

How To Refer To A Range Of Non-Contiguous Cells as in example

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    How To Refer To A Range Of Non-Contiguous Cells as in example

    With only being able to have two arguments when using the "Range" property, how would be the best way to handle this?
    I am thinking break it apart into five separate lines?
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    What makes you think that won't work?
    It works for me.

  3. #3
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    From what I've been reading about the Range property, but yes, it does seem to work, which has me puzzled.

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    There's certainly nothing wrong with using a range in that way, so not sure what you have seen

  5. #5
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    This website for example, http://excelmatters.com/referring-to-ranges-in-vba/ and on another webpage, https://docs.microsoft.com/en-us/pre...6(v=office.11) they showed this as an example, Range.PNG. But great news that this is ok and I don't have to change anything. Wonder where does this rule come into play where you can only have two arguments?
    Last edited by thecdnmole; 02-02-2019 at 05:46 PM.

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    Ok, I understand.
    In your code whilst you are using a number of different addresses, as they are all included inside the same set of quotes it is only 1 argument.
    using 2 arguments would be like
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    524

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    Ok, thanks Fluff13.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: How To Refer To A Range Of Non-Contiguous Cells as in example

    You're welcome & thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Set an array to range of non-contiguous cells
    By cn198 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-18-2015, 06:53 AM
  2. [SOLVED] Using scripting dictionary to add contiguous group of items from non contiguous range
    By stnkynts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2014, 06:12 PM
  3. [SOLVED] copy and paste from contiguous cells to non-contiguous cells using the = function
    By shameus in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-05-2013, 06:48 PM
  4. [SOLVED] How to sum non-contiguous columns applied as a formula on contiguous cells
    By figo12 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-09-2013, 01:07 PM
  5. How to count a contiguous range of cells and sum them exactly
    By Ace of Clubs in forum Excel General
    Replies: 1
    Last Post: 07-19-2009, 10:34 PM
  6. [SOLVED] Range holding non-contiguous cells
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 07-27-2005, 10:05 AM
  7. Cells used in Non-Contiguous Range?
    By Dr.Ile in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2005, 04:00 AM

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