sorry Norie, this is not what I mean.
The number 79 applies only in this example.
When I will make more entries , this number will change.
You said On the first iteration of the loop this is the formula that's evaluated
=SUMPRODUCT(--(ISNUMBER(MATCH($B$3:$B$100,aircrafts,0))),$G$3:$G$100,--($A$3:$A$100>((TODAY()+1)-90)))"
OK. But it should not stop because the criteria is still not met. In this case myvar = 3:00 which is not less than date2.
So the code should continue and the second iteration should be
=SUMPRODUCT(--(ISNUMBER(MATCH($B$3:$B$100,aircrafts,0))),$G$3:$G$100,--($A$3:$A$100>((TODAY()+2)-90)))"
Also in this case, the criteria is still not met...
So it will continue until "i" will become 79 in this case
=SUMPRODUCT(--(ISNUMBER(MATCH($B$3:$B$100,aircrafts,0))),$G$3:$G$100,--($A$3:$A$100>((TODAY()+79)-90)))"
where the condition will be true: myvar(2:00) < date2 (3:00)
Bookmarks