|
Sujet : Excel : comment remplacer un carractere par un espace ? |
| Guru |
Tu peux essayer avec une macro du genre :
Sub Macro1()
Dim strTmp As String
Dim strNew As String
Dim iChar As Integer
Dim iLoop As Integer
Dim iLoopEnd As Integer
strTmp = ActiveCell.Value
iLoopEnd = Len(strTmp)
strNew = ""
For iLoop = 1 To iLoopEnd
iChar = Asc(Mid(strTmp, iLoop, 1))
If (iChar > 31) And (iChar < 168) Then
strNew = strNew & Chr(iChar)
Else
If (iChar = 10) Or (iChar = 13) Then
strNew = strNew & vbCrLf
End If
End If
Next
ActiveCell.Value = strNew
End Sub
|
Après libre à toi d'adapter en fonction du résultat que cela donne. |