Sub Ajouter_lextension_au_nom_des_anciens_fichiers()
Dim ext$, tablo, i&
Supprimer_lextension_au_nom_des_anciens_fichiers
ext = Feuil1.[I11]
With Feuil1.UsedRange.Columns(1)
If .Cells.Count = 1 Then Exit Sub 'sécurité
tablo = .Value 'matrice, plus rapide
For i = 2 To UBound(tablo)
If tablo(i, 1) <> "" Then tablo(i, 1) = tablo(i, 1) & ext
Next
.Value = tablo
End With
End Sub
Sub Supprimer_lextension_au_nom_des_anciens_fichiers()
Feuil1.[A:A].Replace [I14], "", xlPart
Feuil1.[A:A].Replace ".xls", ""
End Sub
Sub Ajouter_lextension_au_nom_des_nouveaux_fichiers()
Dim ext$, tablo, i&
Supprimer_lextension_au_nom_des_anciens_fichiers
ext = Feuil1.[I11]
With Feuil1.UsedRange.Columns(2)
If .Cells.Count = 1 Then Exit Sub 'sécurité
tablo = .Value
For i = 2 To UBound(tablo)
If tablo(i, 1) <> "" Then tablo(i, 1) = tablo(i, 1) & ext
Next
.Value = tablo
End With
End Sub
Sub Supprimer_lextension_au_nom_des_nouveaux_fichiers()
Feuil1.[B:B].Replace [I14], "", xlPart
Feuil1.[B:B].Replace ".xls", ""
End Sub