+ Reply to Thread
Results 1 to 3 of 3

auto add rows to ranges

  1. #1

    auto add rows to ranges

    is there any way when i insert a row to have it join a range? I want to
    define one row as a range and then any rows i insert on top of it to be
    added to that range automatically. Nay ideas? Thanks for any help.


  2. #2
    Tom Ogilvy
    Guest

    Re: auto add rows to ranges

    Use a defined name as the definition of the range

    Insert => Name => Define

    Name: List
    RefersTo: =Offset(Sheet1!$A$1,0,0,CountA(Sheet1!$A:$A),10)

    change 10 to reflect the number of columns.

    Then in you code you can use

    set rng = Range("list")

    or as advised before


    set rng = Range("A1").CurrentRegion

    would do the same.

    --
    Regards,
    Tom Ogilvy

    <[email protected]> wrote in message
    news:[email protected]...
    > is there any way when i insert a row to have it join a range? I want to
    > define one row as a range and then any rows i insert on top of it to be
    > added to that range automatically. Nay ideas? Thanks for any help.
    >




  3. #3
    David
    Guest

    RE: auto add rows to ranges

    Hi,
    This is a non VB, low tech solution and it does not not work, if the named
    range includes Row 1. Include the row above what you want in the named range
    and when you insert a row, it will automatically be included. Example,
    desired named range is B3-B5, the relavant range, but when you establish the
    range make it B2-B5. When you insert a row at B3, it will be included in the
    existing named range.

    "[email protected]" wrote:

    > is there any way when i insert a row to have it join a range? I want to
    > define one row as a range and then any rows i insert on top of it to be
    > added to that range automatically. Nay ideas? Thanks for any help.
    >
    >


+ 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