Hey all,
I am having trouble with a small piece of code right now. Basically I want the last row, go 2 rows up and delete the the whats below. There are three total rows at the end of the worksheet I want to get rid of. The code I have is below:
I get a mismatch error at the Rows line of code. I thought sense it lrow is an integer I could just use that as a designation of the row I wanted to delete...
Thanks for the help.
I am having trouble with a small piece of code right now. Basically I want the last row, go 2 rows up and delete the the whats below. There are three total rows at the end of the worksheet I want to get rid of. The code I have is below:
Code:
Dim lROW As Integer
Range("A5").Select
lROW = Selection.End(xlDown).Offset(-2, 0).Row
MsgBox lROW
[b]Rows("lrow:lrow+4").Delete shift:=xlUp[/b]
I get a mismatch error at the Rows line of code. I thought sense it lrow is an integer I could just use that as a designation of the row I wanted to delete...
Thanks for the help.