Hello Everyone,

Can you please help me with the below code, I am having trouble averaging the specified range. What is the problem with my code?

Set ln1a1 = ln1a1.Offset(0, 3)
Set ln1a2 = ln1a1
Do While Left(ln1a1.Offset(0, -14), 2) <> "C."
        Set ln1a1 = ln1a1.Offset(1)
Loop

 lvre = WorksheetFunction.Average(ln1.Range(ln1a2.Offset(2), ln1a1.Offset(-2)))
Thank you