I have some times that I am trying to analyze through the use of a helper column. In Column B I have a list of operation numbers, in Column G I have a list of time differences. In the helper column I want to check if the next 5 time differences for the same operation are under 7 minutes. In the event that the 5 times are all under 7 minutes, I want to post a 1. The latest iteration of the formula that I've tried is below:
<time(0,7,0),if(index(g3:g1000,match(b2,b3:b1000,0))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),2))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),3))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),4))<time(0,7,0),1,""),""),""),""),"")
<time(0,7,0),
<time(0,7,0),
<time(0,7,0),
<time(0,7,0),
<time(0,7,0),
=IF(G2<TIME(0,7,0),
IF(INDEX(G3:G1000,MATCH(B2,B3:B1000,0))<TIME(0,7,0),
IF(INDEX(G3:G1000,SMALL(IF(B3:B1000=B2,ROW(B3:B1000)-ROW(INDEX(B3:B1000,1,1))+1),2))<TIME(0,7,0),
IF(INDEX(G3:G1000,SMALL(IF(B3:B1000=B2,ROW(B3:B1000)-ROW(INDEX(B3:B1000,1,1))+1),3))<TIME(0,7,0),
IF(INDEX(G3:G1000,SMALL(IF(B3:B1000=B2,ROW(B3:B1000)-ROW(INDEX(B3:B1000,1,1))+1),4))<TIME(0,7,0),
1,""),""),""),""),"")
I know the issue lies inside of the If(Index(Small( as those won't run even if I break off the rest of the code, but I can't figure out what the error is.
I'm somewhat new to matrix equations like this so I feel like I am probably making this harder than it needs to be, but I appreciate any help. Thanks</time(0,7,0),
</time(0,7,0),
</time(0,7,0),
</time(0,7,0),
</time(0,7,0),
</time(0,7,0),if(index(g3:g1000,match(b2,b3:b1000,0))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),2))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),3))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),4))<time(0,7,0),1,""),""),""),""),"")
<time(0,7,0),if(index(g3:g1000,match(b2,b3:b1000,0))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),2))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),3))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),4))<time(0,7,0),1,""),""),""),""),"")
<time(0,7,0),
<time(0,7,0),
<time(0,7,0),
<time(0,7,0),
<time(0,7,0),
=IF(G2<TIME(0,7,0),
IF(INDEX(G3:G1000,MATCH(B2,B3:B1000,0))<TIME(0,7,0),
IF(INDEX(G3:G1000,SMALL(IF(B3:B1000=B2,ROW(B3:B1000)-ROW(INDEX(B3:B1000,1,1))+1),2))<TIME(0,7,0),
IF(INDEX(G3:G1000,SMALL(IF(B3:B1000=B2,ROW(B3:B1000)-ROW(INDEX(B3:B1000,1,1))+1),3))<TIME(0,7,0),
IF(INDEX(G3:G1000,SMALL(IF(B3:B1000=B2,ROW(B3:B1000)-ROW(INDEX(B3:B1000,1,1))+1),4))<TIME(0,7,0),
1,""),""),""),""),"")
I know the issue lies inside of the If(Index(Small( as those won't run even if I break off the rest of the code, but I can't figure out what the error is.
I'm somewhat new to matrix equations like this so I feel like I am probably making this harder than it needs to be, but I appreciate any help. Thanks</time(0,7,0),
</time(0,7,0),
</time(0,7,0),
</time(0,7,0),
</time(0,7,0),
</time(0,7,0),if(index(g3:g1000,match(b2,b3:b1000,0))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),2))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),3))<time(0,7,0),if(index(g3:g1000,small(if(b3:b1000=b2,row(b3:b1000)-row(index(b3:b1000,1,1))+1),4))<time(0,7,0),1,""),""),""),""),"")