Forum Discussion
Mohsin Pasha
May 12, 2018Copper Contributor
Formula to count a value appearing consecutively 2 or more times in multiple columns
Hi There, I am looking for a formula, basically to count a string value appearing consecutively for 2 or more times in multiple columns. Have got an idea, however not sure about the implementatio...
JKPieterse
May 14, 2018Silver Contributor
The first test can be achieved with a formula like this (assuming you are using Excel 2016):
=IF(ISERROR(FIND("Pass|Pass",TEXTJOIN("|",FALSE,B2:G2))),"No","Yes")
The Twice column needs a similar formula:
=IF(ISERROR(FIND("Pass|Pass|Pass",TEXTJOIN("|",FALSE,B2:G2))),"No","Yes")
And the Thrice column:
=IF(ISERROR(FIND("Pass|Pass|Pass|Pass",TEXTJOIN("|",FALSE,B2:G2))),"No","Yes")
=IF(ISERROR(FIND("Pass|Pass",TEXTJOIN("|",FALSE,B2:G2))),"No","Yes")
The Twice column needs a similar formula:
=IF(ISERROR(FIND("Pass|Pass|Pass",TEXTJOIN("|",FALSE,B2:G2))),"No","Yes")
And the Thrice column:
=IF(ISERROR(FIND("Pass|Pass|Pass|Pass",TEXTJOIN("|",FALSE,B2:G2))),"No","Yes")