Nho a e GPE giai thich ho e Code sau voi nhe:
Sub insert_no()
i = 0
Do
If Worksheets("Don gia chi tiet").Cells(6 + i, 1).Value <> "" Then
k = Worksheets("Don gia chi tiet").Cells(6 + i, 1).Value
End If
If Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value = "Chi phÝ vËt liÖu" Then
Worksheets("Don gia chi tiet").Cells(6 + i, 4) = k
End If
If Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value = "Chi phÝ nh©n c«ng" Then
Worksheets("Don gia chi tiet").Cells(6 + i, 5) = k
End If
If Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value = "Chi phÝ m¸y thi c«ng" Then
Worksheets("Don gia chi tiet").Cells(6 + i, 6) = k
End If
i = i + 1
Loop While Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value <> ""
End Sub
Sub insert_no()
i = 0
Do
If Worksheets("Don gia chi tiet").Cells(6 + i, 1).Value <> "" Then
k = Worksheets("Don gia chi tiet").Cells(6 + i, 1).Value
End If
If Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value = "Chi phÝ vËt liÖu" Then
Worksheets("Don gia chi tiet").Cells(6 + i, 4) = k
End If
If Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value = "Chi phÝ nh©n c«ng" Then
Worksheets("Don gia chi tiet").Cells(6 + i, 5) = k
End If
If Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value = "Chi phÝ m¸y thi c«ng" Then
Worksheets("Don gia chi tiet").Cells(6 + i, 6) = k
End If
i = i + 1
Loop While Worksheets("Don gia chi tiet").Cells(6 + i, 7).Value <> ""
End Sub