nad582
Thành viên thường trực




- Tham gia
- 7/6/11
- Bài viết
- 317
- Được thích
- 48
CHÀO CÁC BẠN TRONG GPE! MÌNH CÓ DỌN CODE TÍNH LẬP NHƯ SAU:
'tính lập
Dim k As Integer
k = 15
Do While Cells(k, "B") <> ""
'lần 1
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 2
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 3
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 4
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 5
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
k = k + 1
Loop
VẬY CHO MÌNH HỎI LÀM SAU ĐỂ GỢP CODE LẠI MÀ NÓ VẪN CHẠY 5 LẦN....
XIN CÁC BẠN HIỆU CHỈNH DÙM MÌNH...XIN CẢM ƠN RẤT NHIỀU...
'tính lập
Dim k As Integer
k = 15
Do While Cells(k, "B") <> ""
'lần 1
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 2
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 3
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 4
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
'lần 5
If Cells(k, "Q") = "!!" Then
Cells(k, "N") = Cells(9, "G")
Else
Cells(k, "N") = Cells(k, "Q")
End If
k = k + 1
Loop
VẬY CHO MÌNH HỎI LÀM SAU ĐỂ GỢP CODE LẠI MÀ NÓ VẪN CHẠY 5 LẦN....
XIN CÁC BẠN HIỆU CHỈNH DÙM MÌNH...XIN CẢM ƠN RẤT NHIỀU...