I am running a function with a defined range and when trying to use End.(xlDown).Select I get a message "Select method of Range class failed".
I have edited the code below to show only the problem piece. After literally two hours of trying everything, I cannot get it to work.
The annoying part is that I have to use defined ranges since the function is part of a much larger Sub that doesn't work as intended once Select and Activate are used.
Function OutputFunction()
    Dim rng8 As Range
    Set rng8 = ThisWorkbook.Worksheets(5).Range("A2")
    rng1.ClearContents 'Works like a charm.
    rng2.Copy 'No problem here either.
    rng8.End(xlDown).Select 'Fails misserably.
    ActiveCell.Offset(0, 13).Select
    Range(Selection, Range("N3")).Select
    ActiveSheet.Paste
 
     
     
     
     
    