السلام عليكم
Sub Abu_Ahmed()
[D3:D100].ClearContents: K = 1
For i = 3 To 33
If Cells(i + 1, 3) - Cells(i, 3) > 1 Then
r = Cells(i + 1, 3) - Cells(i, 3)
For e = 1 To r - 1
Cells(i + K, 4) = Cells(i, 3) + K
K = K + 1
Next
K = 1
End If
Next
End Sub
شاهد المرفق
receipt vouchers.rar