I would like to locate the last row of data in column z and then delete everything in the worksheet below that row. Many thanks in advance to anyone willing to help. Test.zip
I would like to locate the last row of data in column z and then delete everything in the worksheet below that row. Many thanks in advance to anyone willing to help. Test.zip
![]()
Dim LR as Long LR = Range("Z" & Rows.Count).End(xlUp).Row + 1 Range(LR & ":" & Rows.Count).ClearContents
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Thank you for your help JBeaucaire. One more question if you don't mind. I'd like to take the contents of cell "T2" and copy and paste it in all cells below it until the LR referenced in your code above. I did attempt to do this on my own but I'm not getting the syntax quite right.
---------- Post added at 10:49 AM ---------- Previous post was at 10:35 AM ----------
I tried this but it's not working
![]()
Range("T2").AutoFill Destination:=Range("t3:T" & LR), Type:=xlFillDefault
---------- Post added at 11:49 AM ---------- Previous post was at 10:49 AM ----------
Anyone can feel free to correct my code, it doesn't have to be Jbeaucaire... and thanks in advance.
I don't use Autofill.
![]()
Range("T2").Copy Range("T3:T" & LR)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks