Hello,
I'm wondering if someone could help me with a loop.
Now I'm hardcoding the ranges (marked with red) in a loop and it takes a long time to go through all rows.
First range: ("A2:U2")
Second : ("A3:U3")
etc.
It should loop Until every cell in range("A*:U*") IsEmpty.

Here is the code I have so far:

            Do While Len(FileName) > 0
                Set wbk = Workbooks.Open(Path & FileName, UpdateLinks:=0)
                
                'Extract workbook name to Column "X", (adjacent to its value from "R19" or "P19", in Column "W" (see below))
                wbdest.Worksheets("Sheet1").Range("X" & Rows.count).End(xlUp).Offset(1) = wbk.Name
           
                    wbdest.Worksheets("Sheet1").Range("Y" & Rows.count).End(xlUp).Offset(1).Formula = "=MID(RC[-1],FIND(""ABC"",RC[-1])+3,6)"
                   
                        If wbdest.Worksheets("Sheet1").Range("Y" & Rows.count).End(xlUp) < 160813 Then
                       
                            wbk.Sheets(1).Range("B39:S39") = wbdest.Worksheets("Sheet1").Range("A2:U2").Value
                            wbdest.Worksheets("Sheet1").Range("W" & Rows.count).End(xlUp).Offset(1) = wbk.Sheets(1).Range("R19")
                        Else
                            wbk.Sheets(1).Range("B39:S39") = wbdest.Worksheets("Sheet1").Range("A2:U2").Value
                            wbdest.Worksheets("Sheet1").Range("W" & Rows.count).End(xlUp).Offset(1) = wbk.Sheets(1).Range("P19")
                        End If
                
                wbk.Close SaveChanges:=False
                FileName = Dir
            Loop
    
        With Range("W2", Cells(Rows.count, "W").End(xlUp))
        'Chose what to delete before calc. average
            .Cells.Find(Application.Max(.Cells), lookat:=xlWhole).ClearContents
            '.Cells.Find(Application.Max(.Cells), lookat:=xlWhole).ClearContents
            '.Cells.Find(Application.Max(.Cells), lookat:=xlWhole).ClearContents
            '.Cells.Find(Application.Min(.Cells), lookat:=xlWhole).ClearContents
            '.Cells.Find(Application.Min(.Cells), lookat:=xlWhole).ClearContents
            
            .Cells(.Cells.count).Offset(1, 0) = "=Average(" & .Cells.Address & ")"
        End With

    'Copy last row from "W" to "V", adjacent to Range("A2:U2") etc. (Not sure this works).
    ActiveSheet.Range("V" & Rows.Count).End(xlUp).Offset(1) = ActiveSheet.Range("W" & Rows.Count).End(xlUp)
Any help would be much appreciated