zookeepertx
Well-known Member
- Joined
- May 27, 2011
- Messages
- 589
- Office Version
- 365
- Platform
- Windows
This is just infuriating me!
Within my macro is the following code:
As an example, for 3 of the rows, the value in J is
<colgroup><col style="mso-width-source:userset;mso-width-alt:15506;width:318pt" width="424"> </colgroup><tbody>
[TD="width: 424"]10100225056,10100214600,10100212827,10100204778,10100204779,[/TD]
</tbody>
Within my macro is the following code:
Code:
For i = lr To 2 Step -1
If InStr(Range("J" & i).Value, Range("K" & i).Value) Then
Rows(i).Delete
End If
Next i
As an example, for 3 of the rows, the value in J is
10100225056,10100225315,10100214598,10100212827,10100204778 |
10100225056,10100225315,10100214600,10100212827,10100157361, while K is empty. However, all of the lines are being deleted. I've tried everything I can think of to fix this with NO luck. I've spent a large part of the morning on this and am about to chuck the computer out the window. Can someone please tell me what I'm doing wrong?? Thanks! Jenny |
<colgroup><col style="mso-width-source:userset;mso-width-alt:15506;width:318pt" width="424"> </colgroup><tbody>
[TD="width: 424"]10100225056,10100214600,10100212827,10100204778,10100204779,[/TD]
</tbody>