+ Reply to Thread
Results 1 to 5 of 5

Select range of data dynamic

  1. #1
    Registered User
    Join Date
    01-12-2016
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Select range of data dynamic

    Hi, i have a problem on VBA. I'm really new to this.

    The program need to do the following steps :

    Select data from B2 to O3 (Those cells are merged and there is a title centered to the left).
    Add P2 to P3 to the selection
    Merge P2:P3 to B2:O3 (the previous selection)

    And i need to do it dynamically : If executed again, the macro need to select data from B2 to P3
    Add Q2 to Q3 to the selection
    Merge Q2:Q3 to B2:P3

    Etc...

    Note that the data is not in a table but in cells.

    Can i have help?

    Thank you

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Select range of data dynamic

    How exactly are you merging?

    If you merge an entire range like B2:O3 you will lose all the data apart from the value in B2.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-12-2016
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Select range of data dynamic

    Hi,
    I merge the data with the option : merge in excel (i dont center them).
    Its letters that i merge (it's a title with blue font) so they dont disappear.
    The title should extend with the table, everytime i add a column.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Select range of data dynamic

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  5. #5
    Registered User
    Join Date
    01-12-2016
    Location
    Montreal
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Select range of data dynamic

    Here it is
    Attached Files Attached Files

+ 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. Dynamic graph range - only want to select certain data
    By mullenmg1986 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2015, 10:10 AM
  2. Select last row of a dynamic range
    By Angelfish13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 07:28 AM
  3. VBA Select Dynamic Range
    By Laylow in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-05-2011, 02:37 PM
  4. Select dynamic range.
    By JapanDave in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-30-2011, 03:12 AM
  5. Select a dynamic range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2009, 07:24 PM
  6. How to select a dynamic (?) range?
    By HelenW in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-11-2008, 06:54 AM
  7. select dynamic range with dynamic start point
    By Juli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-30-2005, 08:05 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