Copier coller colonne

Bonjour

J'ai dans un fichier en "colonne A" une liste de nom à l'aide d'un code je supprime le dernier caractère.

Sub SupprCaract()
Dim C As Range, x$
For Each C In Columns(1).SpecialCells(xlCellTypeConstants, 2)
x = Trim(C): C.Value = Left(x, Len(x) - 1)
Next

End Sub

J'aimerai que lorsqu'il supprime le dernier caractère il copie la liste de la colonne "A" dans la colonne "J"

Je vous remercie de votre aide

Cordialement

Max

7sup-caract2.xlsm (15.70 Ko)

Bonjour valmax,

Un essai :

Sub SupprCaract()

Dim C As Range, x$
Dim DernLigne As Long
    DernLigne = Range("A" & Rows.Count).End(xlUp).Row

For Each C In Columns(1).SpecialCells(xlCellTypeConstants, 2)
x = Trim(C): C.Value = Left(x, Len(x) - 1)
Next

For i = 4 To DernLigne
    Range("A" & i).Copy Range("J" & i)
Next i

End Sub

Cordialement,

Re,

Plus simplement,

Sub SupprCaract()

Dim C As Range, x$

For Each C In Columns(1).SpecialCells(xlCellTypeConstants, 2)
x = Trim(C): C.Value = Left(x, Len(x) - 1)
Next

Columns(1).Copy Columns(10)

End Sub

Bonjour xorsankukai

Je te remercie juste une petite modif j'aimerai qu'il copie à partir de "A5".

Merci et bonne journée

Max

Re,

Je te remercie juste une petite modif j'aimerai qu'il copie à partir de "A5".

Il te suffit de remplacer

For i = 4 To DernLigne

par

For i = 5 To DernLigne
Sub SupprCaract()

Dim C As Range, x$
Dim DernLigne As Long
    DernLigne = Range("A" & Rows.Count).End(xlUp).Row

For Each C In Columns(1).SpecialCells(xlCellTypeConstants, 2)
x = Trim(C): C.Value = Left(x, Len(x) - 1)
Next

For i = 5 To DernLigne
    Range("A" & i).Copy Range("J" & i)
Next i

End Sub
Rechercher des sujets similaires à "copier coller colonne"