+ Reply to Thread
Results 1 to 6 of 6

How can I expand selection of multiple non contiguous cells by certain number of columns?

  1. #1
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    How can I expand selection of multiple non contiguous cells by certain number of columns?

    Say I have multiple non contiguous cells selected (A1, A3, A5, etc etc..) all in the same column and I want to expand them by say 10 columns. So my result will be to have selection as A1:J1, A3:J3, A5:J5 ETC..

    Is there a slick way to accomplish this? I wish vba's .offset would work like it does in excel so I could say offset(0,0,0,10).

    Any ideas or suggestions?

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: How can I expand selection of multiple non contiguous cells by certain number of colum

    It won't let you do them all at once but you can do something like this.

    Please Login or Register  to view this content.
    Last edited by JLGWhiz; 04-03-2019 at 09:58 AM.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: How can I expand selection of multiple non contiguous cells by certain number of colum

    I tweaked to

    Please Login or Register  to view this content.
    But how do I retain each in selection as it loops through?

    Incorporate union someway?

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

    Re: How can I expand selection of multiple non contiguous cells by certain number of colum

    How about
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100
    Quote Originally Posted by Fluff13 View Post
    How about
    Please Login or Register  to view this content.
    That works thankyou!

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

    Re: How can I expand selection of multiple non contiguous cells by certain number of colum

    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. [SOLVED] Loop thru non-contiguous selection of cells
    By btmtdk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2014, 05:52 PM
  2. [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
  3. Copy Cells from non-contiguous selection
    By amartino44 in forum Excel General
    Replies: 4
    Last Post: 09-13-2013, 02:54 PM
  4. [SOLVED] Expand selection to multiple cells
    By bobbybill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-09-2012, 10:53 AM
  5. Replies: 0
    Last Post: 08-03-2012, 04:31 PM
  6. Non contiguous cells selection in a Range in Excel for Emailing with Outlook 2007
    By nuttycongo123 in forum Outlook Programming / VBA / Macros
    Replies: 11
    Last Post: 03-02-2011, 08:44 PM
  7. [SOLVED] Is there a maximum number of non-contiguous columns that can be h.
    By Harold in forum Excel General
    Replies: 6
    Last Post: 03-01-2005, 06:06 PM

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