dmtdmtbb
Biệt danh: xDelx
- Tham gia
- 24/5/07
- Bài viết
- 306
- Được thích
- 438
Code 1
Dim CheckA As String, CheckB As String, CheckD As String
For i = 7 To 500
...CheckA = "A" & i
...CheckB = "B" & i
...CheckD = "D" & i
...Range(CheckA).Select
.....If ActiveCell.FormulaR1C1 = "" Then
.......Range(CheckB).Select
..........If ActiveCell.FormulaR1C1 = "" Then
...............Range(CheckD).Select
...............If ActiveCell.FormulaR1C1 = "" Then
....................Range(CheckB).Select
....................Exit Sub
...............End If
..........End If
.....End If
Next i
-----------------------------------------------------
Code 2
For i = 7 To 1000
.....If Cells(i, 1).Select = "" Then
.......... If Cells(i, 2).Select = "" Then
...............If Cells(i, 4).Select = "" Then
....................Cells(i, 2).Select
....................Exit Sub
...............End If
..........End If
.....End If
Next i
------------------------------------------------
2 code này hoạt động không giốn nhay, bác nào biết giải thích dùm !!!
ọc ọc ọc
Dim CheckA As String, CheckB As String, CheckD As String
For i = 7 To 500
...CheckA = "A" & i
...CheckB = "B" & i
...CheckD = "D" & i
...Range(CheckA).Select
.....If ActiveCell.FormulaR1C1 = "" Then
.......Range(CheckB).Select
..........If ActiveCell.FormulaR1C1 = "" Then
...............Range(CheckD).Select
...............If ActiveCell.FormulaR1C1 = "" Then
....................Range(CheckB).Select
....................Exit Sub
...............End If
..........End If
.....End If
Next i
-----------------------------------------------------
Code 2
For i = 7 To 1000
.....If Cells(i, 1).Select = "" Then
.......... If Cells(i, 2).Select = "" Then
...............If Cells(i, 4).Select = "" Then
....................Cells(i, 2).Select
....................Exit Sub
...............End If
..........End If
.....End If
Next i
------------------------------------------------
2 code này hoạt động không giốn nhay, bác nào biết giải thích dùm !!!
ọc ọc ọc
Lần chỉnh sửa cuối: