MrExcelPlayground15.xlsx | ||||
---|---|---|---|---|
A | B | |||
1 | 100000 | TRUE | ||
2 | 100002 | |||
3 | 100003 | |||
4 | 100005 | |||
5 | 100007 | |||
6 | 100009 | |||
7 | 100010 | |||
8 | 100011 | |||
9 | 100012 | |||
10 | 100016 | |||
11 | 100017 | |||
12 | 100021 | |||
13 | 100022 | |||
14 | 100023 | |||
15 | 100024 | |||
16 | 100025 | |||
17 | 100026 | |||
18 | 100030 | |||
Sheet22 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1 | B1 | =LET(a,A1:A18,b,SEQUENCE(ROWS(a)-1),c,--(INDEX(a,b+1)-INDEX(a,b)=1),d,SEQUENCE(ROWS(c)-2),e,(INDEX(c,d)=1)*(INDEX(c,d+1)=1)*(INDEX(c,d+2)=1),SUM(e)>0) |
Thank you! But I’m not sure if that’s what I need. I might need to try to explain better…I have a list of numbers such as-Not sure what you are looking for exactly, but here is a 365 function that will find if a set has 4 or more consecutive digits in it:
MrExcelPlayground15.xlsx
A B 1 100000 TRUE 2 100002 3 100003 4 100005 5 100007 6 100009 7 100010 8 100011 9 100012 10 100016 11 100017 12 100021 13 100022 14 100023 15 100024 16 100025 17 100026 18 100030 Sheet22
Cell Formulas Range Formula B1 B1 =LET(a,A1:A18,b,SEQUENCE(ROWS(a)-1),c,--(INDEX(a,b+1)-INDEX(a,b)=1),d,SEQUENCE(ROWS(c)-2),e,(INDEX(c,d)=1)*(INDEX(c,d+1)=1)*(INDEX(c,d+2)=1),SUM(e)>0)
MrExcelPlayground15.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
25 | 1 | 5 | 12 | 24 | 25 | 30 | TRUE | |||
26 | 3 | 4 | 5 | 6 | 9 | 17 | FALSE | |||
27 | 5 | 8 | 13 | 44 | 45 | 46 | TRUE | |||
28 | 22 | 24 | 25 | 29 | 40 | 41 | TRUE | |||
29 | ||||||||||
30 | ||||||||||
31 | 1 | 5 | 12 | 24 | 25 | 30 | ||||
32 | 5 | 8 | 13 | 44 | 45 | 46 | ||||
33 | 22 | 24 | 25 | 29 | 40 | 41 | ||||
Sheet22 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H25:H28 | H25 | =LET(a,A25:F25,b,SEQUENCE(COLUMNS(a)-1),c,--(INDEX(a,b+1)-INDEX(a,b)=1),d,SEQUENCE(ROWS(c)-2),e,(INDEX(c,d)=1)*(INDEX(c,d+1)=1)*(INDEX(c,d+2)=1),SUM(e)=0) |
A31:F33 | A31 | =FILTER(A25:F28,H25:H28) |
Dynamic array formulas. |
=LET(a,VALUE(TEXTSPLIT(H1," ")),b,SEQUENCE(COLUMNS(a)-1),c,--(INDEX(a,b+1)-INDEX(a,b)=1),d,SEQUENCE(ROWS(c)-2),e,(INDEX(c,d)=1)*(INDEX(c,d+1)=1)*(INDEX(c,d+2)=1),SUM(e)=0)
Use the textsplit function to break your cells apart.
Excel Formula:=LET(a,VALUE(TEXTSPLIT(H1," ")),b,SEQUENCE(COLUMNS(a)-1),c,--(INDEX(a,b+1)-INDEX(a,b)=1),d,SEQUENCE(ROWS(c)-2),e,(INDEX(c,d)=1)*(INDEX(c,d+1)=1)*(INDEX(c,d+2)=1),SUM(e)=0)