+ Reply to Thread
Results 1 to 2 of 2

Tricky problem to solve - adding a row and then changing place

  1. #1
    Forum Contributor
    Join Date
    07-05-2012
    Location
    Stockholm
    MS-Off Ver
    Excel 2010
    Posts
    162

    Tricky problem to solve - adding a row and then changing place

    Hi, I have an issue that I hope someone can help me with.

    I have a button connected to a macro that adds a row within a certain area. When it adds a row, it adds it to the end of the area. The problem is that on another sheet I have calculations running and when a row is added with the macro, the formula (calculation) does not include the added row.

    So, perhaps a solution could be that the row is added at the top and then moved down (inserted) at the bottom of the area? Or does anyone have any other ideas?

    Here is the code that is used to add a row. I have not written it so I don't know what changes that should be made for this to work.

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Tricky problem to solve - adding a row and then changing place

    Use a dynamic named range for your data, this will grow, when data is inserted.

    A range from a1 to as many rows as there is data, would be a named range of =offset($a$1,0,0,counta($A:$A),1) so then you can just use the range name in your calculations

+ 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