+ Reply to Thread
Results 1 to 8 of 8

Copying a formula down to the last active cell starting from the last populated cell

  1. #1
    Registered User
    Join Date
    10-29-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Copying a formula down to the last active cell starting from the last populated cell

    I have date in column A which is a formula =today()-1 to give yesterdays date, i have text to column in my macros and want to include the autofill of column A with this formula from the cell in which the text for todays data is placed, can anyone help

    p.s. im a complete newbie with excel and macros so am happy to offer further clarification

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

    Re: Copying a formula down to the last active cell starting from the last populated cell

    If i understood you correctly, you mean you would want to copy down the formula in column A from row 2 to the last populated row in your file?

    Which is the column that has the last populated row?
    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]

  3. #3
    Registered User
    Join Date
    10-29-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Copying a formula down to the last active cell starting from the last populated cell

    yeah from column B

  4. #4
    Registered User
    Join Date
    10-29-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Copying a formula down to the last active cell starting from the last populated cell

    This is the code:

    Please Login or Register  to view this content.
    but the autofill will only work one cell at a time, i want it to go down to the last active cell, as if i were double clicking it to drag it to the finish

    Thanks in advance for your help!!
    Last edited by arlu1201; 10-30-2012 at 06:16 AM. Reason: Use code tags in future.

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

    Re: Copying a formula down to the last active cell starting from the last populated cell

    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 below this post.

  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: Copying a formula down to the last active cell starting from the last populated cell

    Maybe i can help you re-structure the code. Can you please attach a sample file showing how the raw data (sample data) looks like before you do the text to columns?

    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.

  7. #7
    Registered User
    Join Date
    10-29-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Copying a formula down to the last active cell starting from the last populated cell

    It should be attached now

  8. #8
    Registered User
    Join Date
    10-29-2012
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Copying a formula down to the last active cell starting from the last populated cell

    second time lucky
    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)

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