Option Explicit
Private Sub Job(d$, c As Byte)
Dim n&: n = Cells(Rows.Count, c).End(3).Row
If n = 1 And IsEmpty(Cells(1, c)) Then Exit Sub
Dim s$, k As Byte, i&
k = Len(d): Application.ScreenUpdating = 0
For i = 1 To n
With Cells(i, c)
s = .Text
If Left$(s, k) = d Then
.Value = Right$(s, Len(s) - k)
End If
End With
Next i
End Sub
Sub SetColA()
If ActiveSheet.Name = "Feuil1" Then Job "2", 1
End Sub
Sub SetColB()
If ActiveSheet.Name = "Feuil1" Then Job "014", 2
End Sub
Bonjour et merci à vous deux
Soan c'était ce que je voulais super encore merci
=SI(GAUCHE(A1)="2";STXT(A1;2;99);""&A1)
=SI(GAUCHE(B1;3)="014";STXT(B1;4;99);""&B1)