Private C As Range
Private Sub Worksheet_Change(ByVal T As Range)
If Intersect(T, [A7:X10000]) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With Range("Y7:Y10000")
.FormulaR1C1 = "=IF(AND(RC[-24]<>"""",COUNTBLANK(RC[-23]:RC[-1])),1,"""")"
Me.Calculate
.Value = .Value
Set C = .Find(What:="1")
If Not C Is Nothing Then
Cells(C.Row, ActiveCell.Column).Activate
End If
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal T As Range)
If Intersect(T, [A7:X10000]) Is Nothing Then Exit Sub
If Not C Is Nothing Then
Application.EnableEvents = False
Cells(C.Row, ActiveCell.Column).Activate
Application.EnableEvents = True
End If
End Sub