Sub Test_BASE_0()
Dim arr, Resultat
arr = Array("a", "b", "c", "d", "e", "f", "g")
Resultat = Rotation(arr, "c")
[A2].Resize(1 + UBound(arr), 1) = Application.Transpose(arr)
[B2].Resize(1 + UBound(Resultat), 1) = Application.Transpose(Resultat)
End Sub
Sub Test_BASE_1()
Dim arr, Resultat
arr = Application.Transpose([A2:A8].Value)
Resultat = Rotation(arr, "c")
[B2].Resize(UBound(Resultat), 1) = Application.Transpose(Resultat)
End Sub
Function Rotation(Tablo, Début)
Dim Pos%, i%, Taille%
Pos = Application.Match(Début, Tablo, 0) - Abs(LBound(Tablo) = 0)
Taille = UBound(Tablo)
ReDim T(LBound(Tablo) To Taille)
For i = LBound(Tablo) To Taille
If Pos > Taille Then Pos = LBound(Tablo)
T(i) = Tablo(Pos)
Pos = Pos + 1
Next i
Rotation = T
End Function