Convert loop with Match function to avoid nested loop???

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kobayashi (Kobayashi.137u6b_at_excelforum-nospam.com)
Date: 03/16/04


Date: Tue, 16 Mar 2004 08:48:13 -0600

Can anybody help convert the following? If (not) IsError(res) then
I would like to delete the entire row (which I can do) instead of
simply changing the value but, and this is the bit that I'm stuck on, I
would also like to delete the entire matching row in the lookup
range???
I can do this by nesting another loop inside this one but thought there
must be a more efficient way? Perhaps using INDEX with the existing
MATCH function?
As always, any help is much appreciated, even if it's only a pointer in
the right direction?

For ni = nirange.Rows.Count To 1 Step -1
res = Application.Match(nirange.Cells(ni, 1).Value, cirange, 0)
If IsError(res) Then
nirange.Cells(ni, 0).Value = "New Items"
Else
nirange.Cells(ni, 0).Value = "Old Items"
End If
Next ni

Regards,

Adrian

---
Message posted from http://www.ExcelForum.com/

Quantcast