Bonsoir à tous,
Je n'arrive pas à faire un retour ligne au milieu d'une formule,
Range("f2:f" & Lg) = "=CONCATENATE(TEXT(RC[-4],""jj/mm/aaaa"")&"" ""&TEXT(RC[-3],""jj/mm/aaaa"")&"" ""&RC[-2])"
y aurait-il une astuce ?
Code complet avec séparation avant la formule
Sub Concat()
'Macros par Claude Dubois pour "kalish13" Excel-Pratique le 29/03/10
Dim Lg%, i%, J%
Lg = Range("A65536").End(xlUp).Row
Application.ScreenUpdating = False
Range("f2:f" & Lg) = _
"=CONCATENATE(TEXT(RC[-4],""jj/mm/aaaa"")&"" ""&TEXT(RC[-3],""jj/mm/aaaa"")&"" ""&RC[-2])"
For i = 2 To Lg
J = i + 1
Do While Cells(J, 1) = Cells(i, 1)
Cells(i, 6) = Cells(i, 6) & " " & Cells(J, 6)
Cells(J, 1).ClearContents
J = J + 1
Loop
Cells(i, 6) = Cells(i, 1) & " " & Cells(i, 6)
i = J - 1
Next i
Range("a2:a" & Lg).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("a:e").Delete
Range("a:a").EntireColumn.AutoFit
End Sub
Amicalement
Claude