Hello,
See if this works:
Sub Concat_Long_Text2()
Dim rngA As Range, c As Range
For Each rngA In Range("A2", Range("A" & Rows.Count).End(xlUp)).SpecialCells(xlCellTypeConstants).Areas
If Application.CountA(rngA.Offset(, 6)) > 1 Then
rngA(rngA.Count + 1, 9).Value = Replace(Replace(Join(Application.Transpose(rngA.Offset(, 6))), "*", ""), "-", "")
rngA(rngA.Count + 1, 10).FormulaR1C1 = "=LEN(RC[-1])"
For Each c In rngA.Resize(, 1)
c.Offset(, 7) = "'" & Replace(c, "-", "")
Next c
ElseIf Application.CountA(rngA.Offset(, 6)) = 1 Then
rngA(rngA.Count + 1, 9).Value = Replace(Replace(rngA.Offset(, 6), "*", ""), "-", "")
rngA(rngA.Count + 1, 10).FormulaR1C1 = "=LEN(RC[-1])"
For Each c In rngA.Resize(, 1)
c.Offset(, 7) = "'" & Replace(c, "-", "")
Next c
End If
Next
End Sub
Bookmarks