Home > Mobile >  Is there way a to find if consecutive rows have the same value in Google Sheets and produce a statem
Is there way a to find if consecutive rows have the same value in Google Sheets and produce a statem

Time:01-13

enter image description here

enter image description here

I have tried to use =IF(AND(ARRAYFORMULA(I4={J4:AB4})),"stop","keep") but I can only choose the first value in the formula. For example, if Trade 4 turns to zero then I should be able to stop at Trade 4 and don't enter any value at Trade 5. I want to be able to at any point in the series determine if there are 3 zeros in a row and produce a string to say "stop" in the H column. Any advice?

CodePudding user response:

Try this formula in cell H3:

=if( 
  regexmatch(textjoin("", true, I3:3), "000"), 
  "Stop", 
  "Continue" 
)
  • Related