J'ai un tableau allant de range("A49") à range("E" & indéfini)
je voudrais contatener les lignes allant de 49 à indéfini ligne par ligne
enxemple
a49="12 rue de noisy" b49="93" c49="PARIS" d49="toto"
e49="100"
je voudrais qu'en vba il me transforme la ligne a49 en
12 rue de noisy - 93 - PARIS - toto - 100&(symbole euros)
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Daniel.C
Bonjour. Essaie :
Sub test4() Dim i As Long, col As Integer, txt As String For i = 49 To [A65536].End(xlUp).Row txt = "" For col = 1 To 5 txt = txt & Cells(i, col) & " - " Next col txt = Left(txt, Len(txt) - 3) Range(Cells(i, 1), Cells(i, 5)) = "" Range(Cells(i, 1), Cells(i, 5)).Merge Cells(i, 1) = txt Next i End Sub
Cordialement. Daniel
Bonjour
J'ai un tableau allant de range("A49") à range("E" & indéfini)
je voudrais contatener les lignes allant de 49 à indéfini ligne par ligne enxemple a49="12 rue de noisy" b49="93" c49="PARIS" d49="toto" e49="100" je voudrais qu'en vba il me transforme la ligne a49 en 12 rue de noisy - 93 - PARIS - toto - 100&(symbole euros)
a 49 se trouvant donc une cellule fusionnée
merci d'avance
Bonjour.
Essaie :
Sub test4()
Dim i As Long, col As Integer, txt As String
For i = 49 To [A65536].End(xlUp).Row
txt = ""
For col = 1 To 5
txt = txt & Cells(i, col) & " - "
Next col
txt = Left(txt, Len(txt) - 3)
Range(Cells(i, 1), Cells(i, 5)) = ""
Range(Cells(i, 1), Cells(i, 5)).Merge
Cells(i, 1) = txt
Next i
End Sub
Cordialement.
Daniel
Bonjour
J'ai un tableau allant de range("A49") à range("E" & indéfini)
je voudrais contatener les lignes allant de 49 à indéfini ligne par ligne
enxemple
a49="12 rue de noisy" b49="93" c49="PARIS" d49="toto" e49="100"
je voudrais qu'en vba il me transforme la ligne a49 en
12 rue de noisy - 93 - PARIS - toto - 100&(symbole euros)
Sub test4() Dim i As Long, col As Integer, txt As String For i = 49 To [A65536].End(xlUp).Row txt = "" For col = 1 To 5 txt = txt & Cells(i, col) & " - " Next col txt = Left(txt, Len(txt) - 3) Range(Cells(i, 1), Cells(i, 5)) = "" Range(Cells(i, 1), Cells(i, 5)).Merge Cells(i, 1) = txt Next i End Sub
Cordialement. Daniel
Bonjour
J'ai un tableau allant de range("A49") à range("E" & indéfini)
je voudrais contatener les lignes allant de 49 à indéfini ligne par ligne enxemple a49="12 rue de noisy" b49="93" c49="PARIS" d49="toto" e49="100" je voudrais qu'en vba il me transforme la ligne a49 en 12 rue de noisy - 93 - PARIS - toto - 100&(symbole euros)