Hi I am trying to select a column from M2, till the last row with data. Then copy it.
Heres my code so far but it copies only the last cell with data.
Hi I am trying to select a column from M2, till the last row with data. Then copy it.
Heres my code so far but it copies only the last cell with data.
Re: select and copy column from top till the lastrow with data
Nearly there, change
to
You could also just use:
Re: select and copy column from top till the lastrow with data
Ok thank you works perfectly.
A bit off topic but how/where did you learn vba?
Re: select and copy column from top till the lastrow with data
Completely self taught! I started by recording macros and playing with them, then looked at other peoples macros and playing with them. Then after a while I found myself on chip pearson's website quite a bit. Then finally I came across Ozgrid and never looked back! There are also plenty of people on here with their own sites that are a goldmine of free information that you should definitely check out if you want to learn VBA. But essentially you can get everything you need right here on Ozgrid
Re: select and copy column from top till the lastrow with data
That sounds about the same as me, well right now im just recording macros and playing with my own codes. BUt thanks again.
Re: select and copy column from top till the lastrow with data
No worries - stick at it you'll pick it up in no time
Don’t have an account yet? Register yourself now and be a part of our community!