Do you mean that you want to clear the contents of a named range from a certain row in that range to the end of the range?
I assume Range("wienerOutputT") is a named range
If so try this
Sub ClearRangeContents()
Dim rng As Range
Dim n As Long
Set rng = Range("wienerOutputT")
n = 10
With rng
If n >= .Rows.Count Then Exit Sub
If n = 0 Then n = 1
Range(Cells(.Row + n, .Column), Cells(.Row + .Rows.Count - 1, .Column + .Columns.Count - 1)).ClearContents
End With
Set rng = Nothing
End Sub
If you just want to find the last used row in a column
LastRow = Range("A" & Rows.Count).End(xlUp).Row
Perhaps if you were to post a sample workbook showing before and after we might give a clearer answer.
[EDIT]
I have added a demo workbook
Change n in the code as you wish
I have used .Select in the example to show how it works
You should use .ClearContents in your final code
or perhaps use this line instead
Range(Cells(.Row + n, .Column), Cells(.Row + .Rows.Count - 1, .Column + .Columns.Count - 1)) = ""
Select the whole table and drag it any where in the sheet and the code will still work.
Hope this helps
Bookmarks