+ Reply to Thread
Results 1 to 4 of 4

Insert Row directly below a named range.

  1. #1
    Registered User
    Join Date
    06-12-2010
    Location
    Hereford, England
    MS-Off Ver
    Excel 2003
    Posts
    73

    Insert Row directly below a named range.

    Hi guys and girls,

    So here's the problem.
    Lets say that A1:E10 is a named range(namedrange1) and F1:J10 is a named range(namedrange2).
    How do i insert a row between the two named ranges. Specifically I need to know how to do it referencing (namedrange1)

    I know how to do it referencing (namedrange2)

    Please Login or Register  to view this content.
    This code inserts a row above (namedrange2). How do I do the same thing but referencing (namedrange1) so that it inserts the row below (namedrange1). I can't use
    Please Login or Register  to view this content.
    because the cells in (namedrange2) all have a value and so it just inserts the row below the last used cell. Please also bear in mind that the number of rows in a named range is dynamic it could be 5 or 105 so offsetting from the first row of the named range isn't an option.

    If anyone can help it'll be appreciated.

    Thanks in advance
    Kind Regards

    Baz

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Insert Row directly below a named range.

    Maybe:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-21-2013
    Location
    Wiltshire, UK
    MS-Off Ver
    365 Version 2210 Build 16.0.15726.20070
    Posts
    72

    Re: Insert Row directly below a named range.

    I'm a little confused. Both ranges occupy the same rows, so how can you insert a row between them?
    If namedrange1 is A1:E10 and namedrange2 was F11:J20, then you could insert on the row at the start of namedrange2.

    Do you mean insert Column?

    Either way use for rows;

    Please Login or Register  to view this content.
    and this for columns;
    Please Login or Register  to view this content.
    Isskint, i get satisfaction out of helping others

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Insert Row directly below a named range.

    Hi, Baziwan,

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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