Option Explicit
Sub Satır_sayısı()
Dim U As Long
Application.ScreenUpdating = False
For U = 1 To [a65536].End(3).Row
If Cells(U, 1) = 1 Then
Cells(U, 2).FormulaR1C1 = "=IF(RC[-1]=1,MAX(R1C2:R[-1]C)+1,"""")"
Range("B:B").Value = Range("B:B").Value
Application.ScreenUpdating = True
End If
Next
End Sub