+ Reply to Thread
Results 1 to 8 of 8

how do you select (or copy) a dynamic range

  1. #1
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    how do you select (or copy) a dynamic range

    I have a column of cells that have a formula in them to return a value or "" (blank)

    how would I write a line of VBA to pick the list of cells but not the blanks (this range would be contagious)
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

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

    Re: how do you select (or copy) a dynamic range

    What type of data is in the column?

    How contagious is the range?
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: how do you select (or copy) a dynamic range

    the formula in the cell is

    =IF(B4="","",D4+E4)

    all the way down for 1000ish rows

    by contagious I just mean the list will always be

    value
    value
    value
    value
    value (until blank then)
    blank
    blank
    blank
    blank (for the remainder)

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: how do you select (or copy) a dynamic range

    bump please

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

    Re: how do you select (or copy) a dynamic range

    So you mean it's contiguous rather than contagious?

    Is it numbers in the column?

    Which column is it?
    Last edited by Norie; 12-03-2012 at 10:08 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: how do you select (or copy) a dynamic range

    yes sorry my mistake.

    as for the column it will be on several columns (which is why I need the general principle to apply to more)

    the column is F in this case and the value in the cells will be numbers up to approx 1000

  7. #7
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: how do you select (or copy) a dynamic range

    Hi -

    Is the filter method not applicable?

    Regards,
    Event

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: how do you select (or copy) a dynamic range

    nope i need to have a few things done all in the click of a button (its not for my use but someone with no excel knowledge so the less they do the better)

  9. #9
    Valued Forum Contributor
    Join Date
    11-15-2008
    Location
    ph
    MS-Off Ver
    2007/2010/2016
    Posts
    479

    Re: how do you select (or copy) a dynamic range

    Hi -

    Post a sample file showing before and after.

    Regards,
    Event

+ 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