Hello-
I have a large macro that copies formulas all the way down to the bottom of the worksheet. Well, I need to clean up the rows below my actual data. So I've come up with the following:
Dim EndRow As Range
Set EndRow = Range("I3").Value
Rows("EndRow:EndRow").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
The Cell I3 is populated with the Row Number that I want to start deleting at. I've tested the Variable EndRow and it does return the correct value. This snippent is part of a much larger macro, but the debugger takes me right to the Set Line above.
Is this possible? Can I pass a value from a variable to the row number?
Please let me know, if I can get this to work it will save me many hours of work.
Thanks!!
I have a large macro that copies formulas all the way down to the bottom of the worksheet. Well, I need to clean up the rows below my actual data. So I've come up with the following:
Dim EndRow As Range
Set EndRow = Range("I3").Value
Rows("EndRow:EndRow").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
The Cell I3 is populated with the Row Number that I want to start deleting at. I've tested the Variable EndRow and it does return the correct value. This snippent is part of a much larger macro, but the debugger takes me right to the Set Line above.
Is this possible? Can I pass a value from a variable to the row number?
Please let me know, if I can get this to work it will save me many hours of work.
Thanks!!