Sub Tedaynui()
Dim i As Integer, j As Integer
For i = 1 To 5
    For j = 2 To 20
        If Cells(j, i) = 1 And Cells(j, i + 5) = "" Then
            Cells(j, i + 5) = 1
            With Cells(j, i + 5)
                .Font.ColorIndex = 3
                .Font.Bold = True
            End With
        End If
    Next j
Next i
For i = 6 To 10
    For j = 2 To 20
        If Cells(j, i) = 1 And Cells(j, i - 5) = "" Then
            Cells(j, i - 5) = 1
            With Cells(j, i - 5)
                .Font.ColorIndex = 3
                .Font.Bold = True
            End With
        End If
    Next j
Next i
End SubVậy bạn có thể sử dụng đoạn code ở bài #2bluecat đã viết:Nếu cả hai đều blank thì để trống.
