+ Reply to Thread
Results 1 to 4 of 4

Macro to Insert New Row and Update =Row() formula

  1. #1
    Registered User
    Join Date
    04-15-2014
    Location
    Washington, USA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Macro to Insert New Row and Update =Row() formula

    I have two data tables on a worksheet with Auto Numbering (1,2,3,…) in the first column.
    I am using =Row() –<row#> to auto populate these numbers.
    When I add a new row to the first table it throws the numbering sequence off in the second.
    Is it possible to create a macro that will insert a new row in the first table and update the =Row-<row# +1> formula in the second table so both tables will be correct?
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Macro to Insert New Row and Update =Row() formula

    May be use other function, like:
    Please Login or Register  to view this content.
    in row 4
    and copy down.


    Of course in row 18
    Please Login or Register  to view this content.
    and copy down.

    Shall be resistant to rows inserting.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-15-2014
    Location
    Washington, USA
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Macro to Insert New Row and Update =Row() formula

    Thanks Kaper

    Im not sure what I did wrong but it doesn't seem to be working for me. Is it possible for you to share the excel file with this working.

    Thanks in advance.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Macro to Insert New Row and Update =Row() formula

    See attached.
    There new function is only in second table.
    If you want it also in first one, then in macro make sure that after inserting a row in first table the new formula is copied down.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 05-16-2013, 02:15 AM
  2. Automatically insert/update a formula
    By peterkm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-19-2013, 06:38 PM
  3. [SOLVED] Macro to insert row and copy cells and update graphs, and recommend VB Introduction Book
    By gjrr4x1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2013, 12:36 PM
  4. Insert Line & Update Macro
    By Foxcan in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-08-2009, 02:10 PM
  5. [SOLVED] Row insert fails to update Sum formula
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-03-2005, 06:06 PM

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