Private Sub Parth(ByVal Z As Range)
Dim Trg As Variant, Ttab As Variant, Phrase As String, Parth As String, i As Integer ' Les Variable
Trg = Z.Value ' ................................................................ Transfert la plage Range dans Variables tableau
For i = LBound(Trg, 1) To UBound(Trg, 1) ' ..................................... Boucle pour toutes les Phrases de la plage
Ttab = Split(Trg(i, 1), "(") ' ............................................ La Phrase découpé en Tableau
Parth = "(" & Ttab(UBound(Ttab)) ' ........................................ Ajoute ( a Parth
ReDim Preserve Ttab(UBound(Ttab) - 1) ' ................................... Supprime Parth
Phrase = Join(Ttab, " ") ' ................................................ Phrase
Z(1)(i, 1).Value2 = Replace(Replace(Phrase, ")", " "), " ", " ") & Parth ' Phrase & Parth / Position de la phase avec Range : Z(1)(i, 1).Value2
Erase Ttab: Parth = Empty: Phrase = Empty ' ............................. Efface le contenu des variables
Next i ' ...................................................................... Fin de la boucle
End Sub
Sub MiseEnForme()
Dim Rgn As Range ' Plage
Set Rgn = Range(Cells(8, 5), Cells(13, 5)) ' .................................. La plage en question
Parth Rgn ' ................................................................... Vers la procédure privé Parth
End Sub