Hi, a relative newbie to macro writing so please go easy on me!
I have a macro in which the number of populated columns will vary. I'm trying to select from B1 to the last occupied cell in a row 1, copy, then paste the data into another location.
So far i have selected the final cell using
But then i run into problems selecting from B1 to this cell. Logic told me that
Would work but guess what, it didnt!
Also, i'd like to delete the 3 columns to the right of the final value, but as of yet have no idea of the code for when the final column changes.
Thanks for any help you can give!
I have a macro in which the number of populated columns will vary. I'm trying to select from B1 to the last occupied cell in a row 1, copy, then paste the data into another location.
So far i have selected the final cell using
Code:
Range("IV1").End(xlToLeft).Select
But then i run into problems selecting from B1 to this cell. Logic told me that
Code:
Range("B1:ActiveCell").Select
Would work but guess what, it didnt!
Also, i'd like to delete the 3 columns to the right of the final value, but as of yet have no idea of the code for when the final column changes.
Thanks for any help you can give!