+ Reply to Thread
Results 1 to 4 of 4

Macro Add a new line to the top of a table with formulas

  1. #1
    Registered User
    Join Date
    04-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Macro Add a new line to the top of a table with formulas

    I'm trying to add a line at the top of a table and have the formulas included. The macro I'm using is not copying the formulas in column I and not copying the currency format in columns G, H and I . What do I need to add to make it work?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro Add a new line to the top of a table with formulas

    Try


    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    04-14-2014
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Macro Add a new line to the top of a table with formulas

    It did not work; however, This is the first macro I have attempted so it might be operator error.
    I double clicked the "new row button", removed the code I had already done, and cut/ pasted what you had. It did not work. What went wrong?
    Here is the code I have so far. Is there something I can add to just have the formulas added?
    Sheets("INVOICE ENTRY").Range("A27").Select
    ActiveCell.EntireRow.Insert Shift:=xlDown

    Sheets("INVOICE ENTRY").Range("b27:m27").Select
    Selection.Borders.Weight = xlThin

    Sheets("INVOICE ENTRY").Range("b27:m27").Select
    Selection.Interior.ColorIndex = none

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Macro Add a new line to the top of a table with formulas

    Here a remake using your code: see Sub InsertRow2()
    In the first code is the constant HRow = 27 with the right value (header row ) ?
    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. Macro to close table with Bottom line
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-15-2014, 03:43 AM
  2. Replies: 1
    Last Post: 05-23-2013, 03:00 AM
  3. Macro for Line Graph and Asociate Table
    By achirag in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2012, 12:28 PM
  4. Excel Macro to Add Line while Copying Formats/Formulas
    By muckem333 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2009, 01:54 PM
  5. Add line and copy formulas doesn't work with a macro
    By Jehan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2008, 06:39 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