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.
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.
Please use Code Tags (see below)
Regards, TMSPlease Login or Register to view this content.
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
Forgot to say: I rarely, if ever, use Autofill. If you know the range, you can usually drop the formula straight in.
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?
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?
It's in the code ...
ThenPlease Login or Register to view this content.
Please Login or Register to view this content.
Great input, I see what you are saying. I have attached it into my formula like so :
However, it is not doing anything/autofilling. My brain is slow at the moment, and I have never approached it like this.Please Login or Register to view this content.
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
You did it! Thank you for teaching me to look twice and than again for mistakes like this. Again, much obliged.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks