+ Reply to Thread
Results 1 to 3 of 3

Code to add rows and continue formulas needs tweaking

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Code to add rows and continue formulas needs tweaking

    Im trying to make some code to add new rows below the active cell (user defined) and continue the formulas in columns A, B, C and F. I found the following code online which does this but it needs some tweaking:
    Please Login or Register  to view this content.
    The main issue I have with it is it seems like it duplicates the values in the newly created rows first, then the values get erased. I have a change event code for this sheet which is interrupting this process. Is it possible to have the code simply duplicate the formulas to the new rows while keeping the values blank in each cell at all times (this would prevent my change event code from triggering and interrupting)
    Also it seems as if it appears to be searching for values/formulas to duplicate on the entire row (which must be slowing the process down). My records just go to K, and the formulas I want to copy down are just in columns A, B, C and F. Can it be set to only duplicate the formulas from these columns to save time?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,042

    Re: Code to add rows and continue formulas needs tweaking

    If you convert your table to a "Table", then when you enter new data below the last line of data, it will automatically create a new row and copy all formulas down for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Code to add rows and continue formulas needs tweaking

    Most of the time the code will be used to add rows in between existing records.

+ 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. [SOLVED] Code to add rows and continue formulas
    By Nitefox in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-26-2014, 10:03 PM
  2. Tweaking of Macro Code to sort rows
    By swoosh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2012, 02:14 PM
  3. VBA code tweaking needed.
    By percy83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-29-2009, 09:58 AM
  4. [SOLVED] Tweaking Code
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2006, 03:20 PM
  5. [SOLVED] Tweaking Code
    By Richard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2006, 10:25 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