Sub GPE()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim Arr(), Tam As String, Vung As String
Arr = Range("A1:A" & Range("A65536").End(xlUp).Row).Value
For i = 7 To UBound(Arr, 1)
If Arr(i, 1) <> Tam And Arr(i, 1) > 0 Or i = UBound(Arr, 1) Then
If Len(DD) > 0 Then Vung = Vung & " " & DD & ":" & IIf(i < UBound(Arr, 1), Cells(i - 1, 1).Address(0, 0), Cells(i, 1).Address(0, 0))
Tam = Arr(i, 1)
DD = Cells(i, 1).Address(0, 0)
End If
Next i
Vung = Replace(Application.WorksheetFunction.Trim(Vung), " ", ",")
With Range(Vung)
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.MergeCells = True
End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub