H
Hari
Hi,
I want to exit a FOR loop if a particular cell's value meets one of the
target values and would not want to wait till all conditions are checked.
No.of possible target /desired values are 19 and if the cells' value is not
equal to any of those 19 then color the cell with a yellow color and
increase the count for Nooferrors by one.
I just wanted to ask whether the LOGIC in the following loop is correct. (
My syntax seems to be fine as Im able to compile the project without any
problem)
Please advise.
For m = 0 To 18
definedtype = False
temp = UCase(Sheets(sheetName).Cells(n, 3))
If reasons(m) = temp Then
definedtype = True
Exit For
End If
Next m
If definedtype = False Then
Sheets(sheetName).Cells(n, 3).Interior.ColorIndex = 6
NoOfErrors = NoOfErrors + 1
End If
Regards,
Hari
India
I want to exit a FOR loop if a particular cell's value meets one of the
target values and would not want to wait till all conditions are checked.
No.of possible target /desired values are 19 and if the cells' value is not
equal to any of those 19 then color the cell with a yellow color and
increase the count for Nooferrors by one.
I just wanted to ask whether the LOGIC in the following loop is correct. (
My syntax seems to be fine as Im able to compile the project without any
problem)
Please advise.
For m = 0 To 18
definedtype = False
temp = UCase(Sheets(sheetName).Cells(n, 3))
If reasons(m) = temp Then
definedtype = True
Exit For
End If
Next m
If definedtype = False Then
Sheets(sheetName).Cells(n, 3).Interior.ColorIndex = 6
NoOfErrors = NoOfErrors + 1
End If
Regards,
Hari
India