السلام عليكم أستاذ فضل
هذا هو الكود
Sub Serial()
Dim mycl As Range
Dim mycl2 As Range
Set mycl = Range("a3")
Select Case mycl
Case Is = 0
For i = 1 To 20
Cells(i + 2, 1) = i
Next i
Case Is > 80
For i = 1 To 20
Cells(i + 2, 1) = i
Next i
Case Is = 1
For i = 1 To 20
Cells(i + 2, 1) = i + 20
Next i
Case Is = 21
For i = 1 To 20
Cells(i + 2, 1) = i + 40
Next i
Case Is = 41
For i = 1 To 20
Cells(i + 2, 1) = i + 60
Next i
Case Is = 61
For i = 1 To 20
Cells(i + 2, 1) = i + 80
Next i
End Select
Set myrang = Range("a3:a22")
For Each mycl2 In myrang
If mycl2 > 90 Then mycl2 = Empty
Next mycl2
Set mycl = Nothing
Set myrang = Nothing
End Sub
و إليك المرفق
التسلسل-kemas.rar