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

  • Thread starter Thread starter Kobayashi
  • Start date Start date
K

Kobayashi

Can anybody help convert the following? If (not) IsError(res) then
I would like to delete the entire row (which I can do) instead o
simply changing the value but, and this is the bit that I'm stuck on,
would also like to delete the entire matching row in the looku
range???
I can do this by nesting another loop inside this one but thought ther
must be a more efficient way? Perhaps using INDEX with the existin
MATCH function?
As always, any help is much appreciated, even if it's only a pointer i
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,

Adria
 
Dick,

Fantastic! I've implemented and it works really well!

Can't thank you enough!

Many thanks indeed!

Adrian
:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top