+ Reply to Thread
Results 1 to 12 of 12

Copy formulas down to last row of report

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    27

    Copy formulas down to last row of report

    Hi,

    I get a travel report every month (grey headers) and I need to add columns with department sale and managers name (green headers) right next to the report using a table and copy the formula down to the last row of the report. I have recorded a macro but as you can see it will stop on row 10, how can I make it copy formulas based on the rows of the report and not based where I stoped recording.

    Thank you !


    Please Login or Register  to view this content.
    Last edited by arlu1201; 09-12-2012 at 02:48 PM.

  2. #2
    Registered User
    Join Date
    05-08-2012
    Location
    Golden, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: Copy formulas down to last row of report

    embed a [counta(F:F)] to get the total number of rows from column F
    use this to adjust the range you are selecting and use the FillDown function.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy formulas down to last row of report

    aurisab,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy formulas down to last row of report

    This is the code you need -
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-05-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Copy formulas down to last row of report

    Arlette,


    Thanks for your help, I was able to use you code but It will only fill in column F to the last row, and will also do row G2 to H2 and the last row G10 and H10 of the range, yet it will not do anything for in between the range G3 to H9.

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy formulas down to last row of report

    Which is the column that will have data always? I have considered column A, is it some other column?

  7. #7
    Registered User
    Join Date
    09-05-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Copy formulas down to last row of report

    Yes column A will have all data.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy formulas down to last row of report

    It will be good if you attach a sample file so that i can check it.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  9. #9
    Registered User
    Join Date
    09-05-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Copy formulas down to last row of report

    Find it attached.
    Attached Files Attached Files

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy formulas down to last row of report

    I changed the line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    and it worked fine.

  11. #11
    Registered User
    Join Date
    09-05-2012
    Location
    Miami, FL
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Copy formulas down to last row of report

    Wonderful, it works ....

    Thanks a lot!

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Copy formulas down to last row of report

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    I will do it for you this time.

+ 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