明显的逻辑问题啊。
如果找到了,则对该单元格做条件判断,如果不满足条件则查找下一个含有abc的单元格。
如果找到了,则对该单元格做条件判断,做完条件判断也需要再查找下一个,跟你的这个条件是没有关系的。。
所以应该是:
Do
If criterior_Check(currentRow, c1.Row, conType) Then
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Set c1 = .FindNext(c1)
Else
Set c1 = .FindNext(c1)
End If
Loop While Not c1 Is Nothing And c1.Address <> firstAddress
2个问题
Set c1 = .FindNext(c1) 改成 Set c1 = .FindNext(After:=c1)
Loop While Not c1 Is Nothing And c1.Address <> firstAddress
改成 Loop Until (c1 Is Nothing) Or (c1.Address=firstAddress)