Bonjour,
Je ne peux pas remplacer les caractères souhaités avec le code ci-dessous, prière de me le corriger.
Sub Test_Remplacement_Caracteres()
Workbooks("Test VBA.xlsm").Sheets("Test Code").Activate
For l = 2 To 20
For c = 5 To 5
Cells(l, c).Select
If Cells(l, c) Like "*/*" Then
Replace(Cells(l, c), "/", "")
ElseIf Cells(l, c) = "*\*" Then
Replace(Cells(l, c), "\", "")
ElseIf Cells(l, c) = "*-*" Then
Replace(Cells(l, c), "-", "")
ElseIf Cells(l, c) = "*_*" Then
Replace(Cells(l, c), "_", "")
ElseIf Cells(l, c) = "*,*" Then
Replace(Cells(l, c), ",", "")
ElseIf Cells(l, c) = "*;*" Then
Replace(Cells(l, c), ";", "")
ElseIf Cells(l, c) = "*:*" Then
Replace(Cells(l, c), ":", "")
ElseIf Cells(l, c) = "*.*" Then
Replace(Cells(l, c), ".", "")
ElseIf Cells(l, c) = "* *" Then
Replace(Cells(l, c), " ", "")
End If
Next
Next
End Sub
Merci par avance pour votre support.