How do I use range with lastrow in this case?
(this is what I tried, but it didn't work)![]()
Please Login or Register to view this content.
If lastrow were 26, for example, it should be Range("B25":"D25")
How do I use range with lastrow in this case?
(this is what I tried, but it didn't work)![]()
Please Login or Register to view this content.
If lastrow were 26, for example, it should be Range("B25":"D25")
Try this
![]()
Please Login or Register to view this content.
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
Do you need it to be in one line?
...but that can be combined into one line.![]()
Please Login or Register to view this content.
There are many ways to do that.
<---If my answer helped, please click *
It worked!! Thank you =)
...I would avoid the .Select method whenever possible.
Why? And what could I use to replace it?
Luuzmachado,
I'd have to see how it's being used. Occasionally, you do need .Select, but I often see it used unnecessarily.
.Select methods take up a lot of time and if it's used to .Copy/.Paste, there are better ways, namely: ws_dest.Range("A1").Cells.Value = rng_toCopy.Cells.Value.
For more information about .Select alternatives and why there are better methods, see: http://www.businessprogrammer.com/po...-using-select/
Practically speaking, it may not matter if you don't write a lot of code or if you're just moving a few things around.
*The more you know*
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks