وعليكم السلام ورحمة الله وبركاته ...
Sub FindFirstEmpty()
Application.ScreenUpdating = False
Cells.Select
myrows = Selection.Rows.Count
mycols = Selection.Columns.Count
myrows = 1501
mycols = 1
origraw = myrows
ActiveCell.Select
For i = 5 To myrows - 1
For j = 0 To mycols - 1
If ActiveCell.Offset(i, j).FormulaR1C1 <> "" Then
GoTo newrow
End If
Next
MsgBox "Done "
ActiveCell.Offset(i, j).Activate
ActiveCell.EntireRow.Select
Exit Sub
' ActiveCell.Offset(1, 0).Activate
' myrows = myrows - 1
newrow:
Application.StatusBar = " checking ...." & _
Format(i / origraw, "0.0%") & " Please Wait......."
Next i
Application.ScreenUpdating = True
Application.StatusBar = False
End Sub
والله الموفق