Forum Discussion
Needs a formula to return true if a cell contains three or more consecutive letters
- Apr 27, 2022
That formula won't work in Office 2013.
Try this. It is an array formula that has to be confirmed with Ctrl+Shift+Enter.
With a value such as 12ABS34 in A2:
=MAX(FREQUENCY(IF(ISERROR(-MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)),ROW(INDIRECT("1:"&LEN(A2)))),IF(ISNUMBER(-MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)),ROW(INDIRECT("1:"&LEN(A2))))))>=3
The formula can be filled down if required.
- HansVogelaarApr 27, 2022MVP
If you have Microsoft 365 or Office 2021:
=LET(n,LEN(A2),s,SEQUENCE(n),a,MID(A2,s,1),b,ISERROR(-a),c,","&TEXTJOIN(",",TRUE,b)&",",ISNUMBER(FIND(",TRUE,TRUE,TRUE,",c)))
- jpsaini91Apr 27, 2022Copper ContributorI am using office 2013. And this formula returned pop-up error.
- HansVogelaarApr 27, 2022MVP
That formula won't work in Office 2013.
Try this. It is an array formula that has to be confirmed with Ctrl+Shift+Enter.
With a value such as 12ABS34 in A2:
=MAX(FREQUENCY(IF(ISERROR(-MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)),ROW(INDIRECT("1:"&LEN(A2)))),IF(ISNUMBER(-MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)),ROW(INDIRECT("1:"&LEN(A2))))))>=3
The formula can be filled down if required.