I have the following code to see if 2 cells are equal to each other.
If ws5.Cells(rw.Row, 2) = ws5.Cells(rw.Row, 3) Then
ws5.Cells(rw.Row, 5) = 1
Else
ws5.Cells(rw.Row, 5) = 0
The issue i'm having is that if one of the cells contains #N/A it is returning 1 instead of 0 which is what i want it to do.
Is there a way around this?
If ws5.Cells(rw.Row, 2) = ws5.Cells(rw.Row, 3) Then
ws5.Cells(rw.Row, 5) = 1
Else
ws5.Cells(rw.Row, 5) = 0
The issue i'm having is that if one of the cells contains #N/A it is returning 1 instead of 0 which is what i want it to do.
Is there a way around this?