Trunghieutin10
Thành viên mới

- Tham gia
- 10/6/15
- Bài viết
- 33
- Được thích
- 10
Mã:
i = 2
While i <= Sheets(nWks).Cells(Rows.Count, 1).End(xlUp).Row
Sheets(nWks).Select
nMH = ""
nBanVe = Cells(i, 1)
For m = 15 To iCol
If Cells(i, m) <> "" Then
If nMH = "" Then
nMH = Cells(1, m).Address
Else
nMH = nMH & "," & Cells(1, m).Address
End If
End If
Next
Range(nMH).Select
Selection.Copy
For m = 1 To Sheets.Count
Sheets(m).Select
If ActiveSheet.Name = nBanVe Then
Range(Cells(68, 33), Cells(68, 33)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
Exit For
End If
Next
i = i + 1
Wend
Cảm ơn các anh chị nhiều.