+ Reply to Thread
Results 1 to 3 of 3

Updating total formula after inserting a row

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    Chatsworth, CA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Unhappy Updating total formula after inserting a row

    Hey all,

    I need your help with a macro that has been driving me crazy. It is probably easiest if you look at the attached spreadsheet, but I'l describe it here too.

    I have a macro that inserts a row where I need it based on my selection in a dropdown box. The row below the newly inserted row is a total row that sums of the rows above (usually 2-8 rows summed). However after I add the new row the total row does not incude the new row into the formula. Thus if I enter values into the new row they are not summed to the total, but I need them to be included in the sum.

    Any help would be really appreciated.

    Thank you!!
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,036

    Re: Updating total formula after inserting a row

    Insert new row between ol ones and not at the top or last cell of range and it will work.
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    09-07-2010
    Location
    Chatsworth, CA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Updating total formula after inserting a row

    That is not working. My macro is shifting the rows down. Can you help me then adjust my current macro.

    Sub InsertRow()
    Dim Rng As Range
    Set Rng = Range("C7:C200").Find(Range("C4").Value, [C7], xlValues, xlWhole, xlByColumns, xlNext, False)
    Rng.EntireRow.Insert Shift:=xlDown
    Rng.Offset(-2, 0).EntireRow.Copy
    Rng.Offset(-1, 0).EntireRow.PasteSpecial xlPasteFormats

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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