Boucle supprimer caractères

Bonsoir le forum

Je cherche un code qui me me permettrait de supprimer les 3 premiers caractères dans les cellules de la colonne "I"

soit passer de : "PB PT 003217" à "PT 003217" et ainsi de suite

je joint un fichier

Si quelqu'un avait ça en stock

Merci pour votre aide et pour votre disponibilité

103cara.xlsm (19.54 Ko)

Bonsoir,

Sub Suppr3Car()
    Dim kk, n%, i%
    Application.ScreenUpdating = False
    With ActiveSheet
        n = .Cells(.Rows.Count, 9).End(xlUp).Row
        For i = 1 To n
            If .Cells(i, 9) <> "" Then
                kk = Split(Trim(.Cells(i, 9))): kk(0) = ""
                .Cells(i, 9) = Trim(Join(kk))
            End If
        Next i
    End With
End Sub

Cordialement.

5eole33-3cara.xlsm (26.94 Ko)

Salut Eole,

Salut, MFerrand, comment vas-tu?

Dim tTab
'
iRow = Cells(Rows.Count, 9).End(xlUp).Row
tTab = Range("I1:I" & iRow)
For x = 1 To UBound(tTab)
    If tTab(x, 1) <> "" Then tTab(x, 1) = Right(tTab(x, 1), Len(tTab(x, 1)) - 3)
Next
Range("I1:I" & iRow) = tTab

A+

103cara.xlsm (25.35 Ko)

Bonjour le forum

Bonjour MFerrand et curulis57

Merci pour votre aide et pour votre disponibilité

Super les deux codes me vont

Merci beaucoup

Rechercher des sujets similaires à "boucle supprimer caracteres"