+ Reply to Thread
Results 1 to 7 of 7

Macro to insert row and formulas.

  1. #1
    Registered User
    Join Date
    07-29-2008
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Macro to insert row and formulas.

    Hi All

    I seem not to get the “find the next empty row of a range” commands in my head, to even begin to right one out.

    Could anyone know how to build a macro that will insert an extra row below the last range? Then copy down the formulas from the last cell range. It also needs to be done for each Category and its range of data.

    Thanks
    Attached Files Attached Files
    Last edited by Matso; 08-07-2009 at 01:40 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to insert row and formulas.

    Hi

    This is pretty specific to the format of your example so I hope your example is a good reflection of what you want to do.

    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    07-29-2008
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Macro to insert row and formulas.

    Thanks for the Reply rylo.

    However it is stopping at:
    firstadd = findit.Address

    I have read the help field when the debugger comes up and I still do not know what it means I need to do.

    Is it setting up a condition?(don't know if thats the word)

    Matso

    PS Yes the format is the exact same format I intend to use.

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to insert row and formulas.

    Hi

    Does it do it when run on the example file, or on your real file?

    rylo

  5. #5
    Registered User
    Join Date
    07-29-2008
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Macro to insert row and formulas.

    Quote Originally Posted by rylo View Post
    Hi

    Does it do it when run on the example file, or on your real file?

    rylo
    I copied and pasted it in the real file.

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro to insert row and formulas.

    Hi

    Do you have the relevant sheet selected, and does it have the word Totals on that sheet?

    When it errors, debug it and see if you can see if findit has been set. Do something like ?findit.address in the immediate window. If it hasn't then the find statement hasn't worked, so it can't find what it is searching for.

    rylo

  7. #7
    Registered User
    Join Date
    07-29-2008
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Macro to insert row and formulas.

    Quote Originally Posted by rylo View Post
    Hi

    Do you have the relevant sheet selected, and does it have the word Totals on that sheet?

    When it errors, debug it and see if you can see if findit has been set. Do something like ?findit.address in the immediate window. If it hasn't then the find statement hasn't worked, so it can't find what it is searching for.

    rylo
    Thanks rylo

    I had a reference formula in the cells therefore did not recognise the macro command. Now fixed.

    Thanks for your help.

    Matso

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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