'Tach chuoi
Sub abc()
Application.ScreenUpdating = False
i = Cells(Rows.Count, "A").End(xlUp).Row
Do While i > 0
temp = Split(Cells(i, 1).Value, ",")
For j = UBound(temp) To 0 Step -1
Rows(i).Insert
Cells(i, 3).Value = temp(j)
Next
i = i - 1
Loop
Application.ScreenUpdating = True
End Sub
'Sort
Sub loc()
Range("C1:C" & Range("C" & Rows.Count).End(3)(1).Row).Select
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Sub AZ()
abc
loc
End Sub
'Ghep chuoi
Function NoiChuoi(vung As Range)
Dim cell As Range, tam
For Each cell In vung
If cell <> "" Then
tam = tam & "," & cell
End If
Next
NoiChuoi = Replace(tam, ",", "", 1, 1)
End Function