Convert loop with Match function to avoid nested loop???
From: Kobayashi (Kobayashi.137u6b_at_excelforum-nospam.com)
Date: 03/16/04
- Next message: Bernie Deitrick: "Re: count cells after"
- Previous message: luvgreen: "Re: PasteSpecial with formulas only question"
- Next in thread: *** Kusleika: "Re: Convert loop with Match function to avoid nested loop???"
- Reply: *** Kusleika: "Re: Convert loop with Match function to avoid nested loop???"
- Messages sorted by: [ date ] [ thread ]
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/
- Next message: Bernie Deitrick: "Re: count cells after"
- Previous message: luvgreen: "Re: PasteSpecial with formulas only question"
- Next in thread: *** Kusleika: "Re: Convert loop with Match function to avoid nested loop???"
- Reply: *** Kusleika: "Re: Convert loop with Match function to avoid nested loop???"
- Messages sorted by: [ date ] [ thread ]