doctortt
03-28-2011, 11:08 PM
Can someone help? I want to check 5 cells whether they're blank or not.
They're (4,3) (6,3) (8,3) and (4,7) (6,7)
The probelm is after row 6, there is only one cell left to check, which is (8,3). However, the codes below will check (8,7) and definately throw out an error message. Is there a way to fix the codes and make Excel to bypass (8,7)? I'm new to this so my codes might not be the perfect way to do what I want.
Row = 4
For I = 1 To 3
If (IsEmpty(Cells(Row, 3))) Or (IsEmpty(Cells(Row, 7))) Then
MsgBox ("No Blank")
Exit Sub
Else
Row = Row + 2
End If
Next I
They're (4,3) (6,3) (8,3) and (4,7) (6,7)
The probelm is after row 6, there is only one cell left to check, which is (8,3). However, the codes below will check (8,7) and definately throw out an error message. Is there a way to fix the codes and make Excel to bypass (8,7)? I'm new to this so my codes might not be the perfect way to do what I want.
Row = 4
For I = 1 To 3
If (IsEmpty(Cells(Row, 3))) Or (IsEmpty(Cells(Row, 7))) Then
MsgBox ("No Blank")
Exit Sub
Else
Row = Row + 2
End If
Next I