I would like LastRow to start from the first cell of the input Column and count down.
What I had didn't work
Please help,![]()
Function AvgLastX(N As Integer, MyCol As String) Dim LastRow As Long LastRow = Range(Cells(1, MyCol)).End(xlDown).Row + 1 AvgLastX = WorksheetFunction.Average(Range(Cells(LastRow, MyCol), Cells(LastRow - N, MyCol))) End Function
NTB
Bookmarks