Insert Row(s) keeping only formulas and totals row below

  • Hello Guys, below is code that I've built that inserts a row or rows depending on the selection from the user. This works ok but is lacking a few things to make it perfect.
    1st issue: Using the code below, the rows get inserted either above or below the ACTIVE cell. Id like it to just find the last used cell in column "A" above the totals row and do the insert there. (last row needs to stay the last row by just moving down, there is no data in column A on the totals row)
    2nd issue: When the code does the copy, paste, I'm not getting the formulas or the borders in the inserted rows. Id like it to copy just the format and the formulas into the rows pasted.


    Any assistance is GREATLY appreciated



    [TABLE="border: 1, cellpadding: 1, width: 500"]

    [tr]


    [td]

    DATA

    [/td]


    [td]

    DATA

    [/td]


    [td]

    DATA

    [/td]


    [/tr]


    [tr]


    [td]

    DATA

    [/td]


    [td]

    DATA

    [/td]


    [td]

    DATA

    [/td]


    [/tr]


    [tr]


    [td]

    INSERT ROW

    [/td]


    [td]

    INSERT ROW

    [/td]


    [td]

    INSERT ROW

    [/td]


    [/tr]


    [tr]


    [td]

    NO DATA

    [/td]


    [td]

    SUBTOTALS

    [/td]


    [td]

    TOTALS

    [/td]


    [/tr]


    [/TABLE]


    Hope this helps and makes sense

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!