+ Reply to Thread
Results 1 to 10 of 10

Can't nail down AUTOFILL!

  1. #1
    Registered User
    Join Date
    01-26-2015
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    7

    Can't nail down AUTOFILL!

    Hello,

    I have the following piece of VBA and I am trying to autofill to last row, I know I am missing something but I can not remember for the life of me. Any input would be appreciated.

    Please Login or Register  to view this content.
    Last edited by PetarM; 02-10-2015 at 05:07 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Can't nail down AUTOFILL!

    Please use Code Tags (see below)

    Please Login or Register  to view this content.
    Regards, TMS



    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 here
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Can't nail down AUTOFILL!

    Forgot to say: I rarely, if ever, use Autofill. If you know the range, you can usually drop the formula straight in.

  4. #4
    Registered User
    Join Date
    01-26-2015
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    7

    Re: Can't nail down AUTOFILL!

    Thanks for the reminder, I have fixed the post.

    If the last row is always going to be different, how would I approach the range?

  5. #5
    Registered User
    Join Date
    01-26-2015
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    7

    Re: Can't nail down AUTOFILL!

    Thanks for the reminder, I have fixed the post.

    If the last row is always going to be different, how would I approach the range?

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Can't nail down AUTOFILL!

    It's in the code ...

    Please Login or Register  to view this content.
    Then

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-26-2015
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    7

    Re: Can't nail down AUTOFILL!

    Great input, I see what you are saying. I have attached it into my formula like so :

    Please Login or Register  to view this content.
    However, it is not doing anything/autofilling. My brain is slow at the moment, and I have never approached it like this.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Can't nail down AUTOFILL!

    Dohhhhh ... we're both missing something. You're using column D to try to determine how many rows of data there are so that you can put a formula in column D ...

    You need to pick a fully populated column, that is, other than column D, to determine the last row of data, maybe column A.


    Regards, TMS

  9. #9
    Registered User
    Join Date
    01-26-2015
    Location
    Dallas
    MS-Off Ver
    2013
    Posts
    7

    Re: Can't nail down AUTOFILL!

    You did it! Thank you for teaching me to look twice and than again for mistakes like this. Again, much obliged.

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,428

    Re: Can't nail down AUTOFILL!

    You're welcome.


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


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Autofill base on Active Cell and Autofill by row count of another sheet
    By enyak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2014, 10:06 PM
  2. [SOLVED] Display specific range of cells on the thumb nail of excel file
    By vignesh805 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-06-2013, 12:10 AM
  3. Macro for Autofill removes header info when there is no data to autofill
    By esturan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-06-2012, 01:42 PM
  4. Replies: 1
    Last Post: 06-17-2005, 04:05 PM
  5. Replies: 0
    Last Post: 03-02-2005, 12:06 PM

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