+ Reply to Thread
Results 1 to 8 of 8

Turn static RANGE to dynamic

  1. #1
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32

    Turn static RANGE to dynamic

    I have following code with static range.
    The letter "D" in the range must be a letter of last right column.
    Please Login or Register  to view this content.
    How can I change this code to dynamic range. I tryed using XlToRight, but I have confused with that.
    Any idea?

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Turn static RANGE to dynamic

    One way to do this is to define the chart data as a named range and then make that range dynamic. Some examples can be found at

    http://www.ozgrid.com/Excel/DynamicRanges.htm
    Martin

  3. #3
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32

    Re: Turn static RANGE to dynamic

    That's not good enough , I need something in VBA code with RANGE...XlToRight...
    Any idea?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Turn static RANGE to dynamic

    Nice polite reply
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Turn static RANGE to dynamic

    Try again...

    It's difficult to advise without knowing how the data is laid out on the sheet but somelike the following might help.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32

    Re: Turn static RANGE to dynamic

    I attached original file, hope now it will be more clear. CurrentRegion is not working correct.
    Attached Files Attached Files

  7. #7
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Turn static RANGE to dynamic

    Try

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32

    Re: Turn static RANGE to dynamic

    Now that's exact what I need.
    Great, thanks!

+ 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