+ Reply to Thread
Results 1 to 4 of 4

Macro Autofill to last row - how?

  1. #1
    Registered User
    Join Date
    01-31-2005
    Posts
    1

    Macro Autofill to last row - how?

    Hi there

    I know little about writing VBA code, and this is probably a no-brainer to you gurus out there, so please be gentle.

    I have formulas in column C, D & E that I want to autofill down in a macro to the last row in column B. The number of rows in column B may vary every time I complete this sheet.

    I have turned the "relative reference" button on while creating the macro, but I see in the VBA code that the cell number still appears ie. "A1:C66". How do I make it go to the bottom of column B despite how many rows there are?

    This is what is appearing in the code:
    Please Login or Register  to view this content.

    Many many thanks
    Lisa
    Last edited by alansidman; 04-19-2018 at 04:08 PM.

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Use the following instead of your 3 lines:

    Please Login or Register  to view this content.

    - Mangesh
    Last edited by alansidman; 04-19-2018 at 04:09 PM.

  3. #3
    Registered User
    Join Date
    04-19-2018
    Location
    USA
    MS-Off Ver
    DONT KNOW
    Posts
    1

    Re: Macro Autofill to last row - how?

    I have been looking for a solution for this and finally found it...thank you so much you've been so helpful, gee i spent about 3 hours in this...thank you

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Macro Autofill to last row - how?

    Lisa and Mangesh

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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