+ Reply to Thread
Results 1 to 9 of 9

Input box select range in excel then split range

  1. #1
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Input box select range in excel then split range

    Right, so here is a bit of a challanging one for me.

    I would like a user to select a range from an input box, then a sub needs to split the range.

    For example, a sub runs, the user selects range:

    B2:D19

    Then I need the range to be split into:

    B3:B19
    C2:D2
    C3:D19

    Thus B2 is actually a dead cell...

    Is this possible? and How?
    Last edited by Jacques Grobler; 01-04-2012 at 05:36 AM.
    Jacques


  2. #2
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Input box select range in excel then split range

    For the clever people?

  3. #3
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Input box select range in excel then split range

    Ok, if there is a better way than this, please inform me...

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,459

    Re: Input box select range in excel then split range

    You could try the following,

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Input box select range in excel then split range

    Hi Andy,

    Thanks for the reply but I'm not sure what this code does so I'm not sure of how to implement it.

    Can you please briefly explain what it does?

    Thank you

  6. #6
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Input box select range in excel then split range

    Bump it up...

  7. #7
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Input box select range in excel then split range

    Although I do not understand what you mean with a 'dead' cell...

    Please Login or Register  to view this content.
    Last edited by snb; 01-04-2012 at 05:08 AM.



  8. #8
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Input box select range in excel then split range

    Hi snb,

    Where the row and column meets: Cell (1,1), in this cell there is nothing to be used, except that it indicates where the range starts.
    That is what I mean by dead cell.

    I just had to change your code slightly to work:

    Please Login or Register  to view this content.
    But it works like a charm, thanks

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,459

    Re: Input box select range in excel then split range

    I thought you just wanted the range of cells excluding the dead cell in top left corner.

    This will give you the 3 ranges excluding the dead cell.
    Please Login or Register  to view this content.

+ 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