Sub TestRotation()
Dim MySeq, DerL As Long, VA, x As Long, Cpt As Byte, i As Byte, StrSeq$
MySeq = Array(1, 2, 3, 4, 5, 1, 2, 3, 4, 5)
DerL = Cells(Rows.Count, 1).End(xlUp).Row
VA = Range("A3:C" & DerL).Value
For x = LBound(VA) To UBound(VA)
Cpt = 0
For i = VA(x, 2) To UBound(MySeq)
If MySeq(i) <> VA(x, 1) Then
StrSeq = StrSeq & MySeq(i) & ","
Cpt = Cpt + 1
End If
If Cpt = 3 Then Exit For
Next
VA(x, 3) = Mid(StrSeq, 1, 5): StrSeq = ""
Next
VA = Application.Index(VA, Evaluate("Row(1:" & UBound(VA) & ")"), [{3}])
Cells(3, 3).Resize(UBound(VA)).Value = VA
End Sub