Sub GhepDuLieu444()
Sheet4.Range("I2:ae30").,,ClearContents
Dim All_Col As Integer,,,cot1 As Long,,,cot2 As Integer,,,i As Long
Dim Arr As String,,, Arr1 As String,,,Arr2 As String
All_Col = [A3].CurrentRegion.Columns.Count
ReDim kq(1 To (All_Col) ^ (7),,,1 To 5) As String
For cot1 = 1 To All_Col - 1
For cot2 = cot1 + 1 To All_Col
Arr = Cells(3,,, cot1).Value & Cells(3,,,cot2).Value
Arr1 = Cells(4,,,cot1).Value & Cells(4,,,cot2).Value
Arr2 = Cells(5,,, cot1).Value & Cells(5,,, cot2).Value
i = i + 1
kq(i,,,1) = IIf(Len(Arr) = 2,,, Arr,,, Space(0))
kq(i,,,2) = IIf(Len(Arr1) = 2,,,Arr1,,,Space(0))
kq(i,,, 3) = IIf(Len(Arr2) = 2,,,Arr2,,,Space(0))
Next cot2
Next cot1
Cells(3,,, All_Col + 4).Resize(i,,,1).Value = kq
Cells(4,,,All_Col + 5).Resize(i,,,2).Value = kq
Cells(5,,,All_Col + 6).Resize(i,,,3).Value = kq
End Sub