Line break with a concatenate

Solved
DeutschWorker Posted messages 27 Status Membre -  
DeutschWorker Posted messages 27 Status Membre -
Hello everyone,

I currently have a macro that allows me to concatenate information from a table into a single cell:

Function Concatener1(Plage As Range) As String Dim C As Range Dim Texte As String For Each C In Plage If C <> "" Then Texte = Texte & C.Value & "; " End If Next C If Len(Texte) > 0 Then Concatener1 = Left(Texte, Len(Texte) - 2) End Function


I would like to know if it is possible for each piece of data to be on a new line instead of being separated by a simple "; "?

Thank you for your attention to this post.
Best regards,
Charles

PS: Please excuse my spelling mistakes.

10 réponses

via55 Posted messages 14730 Registration date   Status Membre Last intervention   2 755
 
Hello,

Replace the & "; " with & Chr(10)

Best regards
Via

--
"Imagination is more important than knowledge." A. Einstein
0