DenisSmo
Если "в лоб", то можно так:
Код: Sub Main()
Dim i As Long, j As Long: Application.ScreenUpdating = False: j = 1
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
Cells(j, 2) = Cells(j, 2) & ", " & Cells(i, 1)
If i Mod 20 = 0 Then
If Cells(j, 2) <> "" Then Cells(j, 2) = Right(Cells(j, 2), Len(Cells(j, 2)) - 2)
j = j + 1
End If
Next
If Cells(j, 2) <> "" Then Cells(j, 2) = Right(Cells(j, 2), Len(Cells(j, 2)) - 2)
End Sub
Если "в лоб", то можно так:
Код: Sub Main()
Dim i As Long, j As Long: Application.ScreenUpdating = False: j = 1
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
Cells(j, 2) = Cells(j, 2) & ", " & Cells(i, 1)
If i Mod 20 = 0 Then
If Cells(j, 2) <> "" Then Cells(j, 2) = Right(Cells(j, 2), Len(Cells(j, 2)) - 2)
j = j + 1
End If
Next
If Cells(j, 2) <> "" Then Cells(j, 2) = Right(Cells(j, 2), Len(Cells(j, 2)) - 2)
End Sub