AVRAHAMROOS
New Member
- Joined
- Nov 24, 2016
- Messages
- 21
Given a column of random letters, I want to identify sequences of a minimum of 3 consecutive letters from the alphabet. For example, if the following letters are given in a column: a,b,c,x, l,m,n, p,g,m,n,o,p,p,g (series1) or a,b,c, k, l,m,n,p,g,m,n,o,p,p,g (series2), I want to get TRUE for the letters in bold.
I have created a complicated nested IF formula for cell 3 which I copy with autofill downwards in the column (I deal with cells 1 and 2 differently):
=IF(C3="","",((IF(CODE(C5)=(CODE(C4)+1),IF(CODE(C4)=CODE(C3)+1,TRUE,(IF(CODE(C2)=CODE(C1)+1,FALSE))),(IF(CODE(C3)=(CODE(C2)+1),IF(CODE(C4)=(CODE(C3)+1),TRUE,IF(CODE(C2)=CODE(C1)+1,TRUE,FALSE)))))))
The formula works (!), except in cases where two series meet or are separated by one unrelated character. In series 1 "x" (cell 4) is marked TRUE (while this should be FALSE) and in series 2 "c" (cell 3) is marked FALSE while this should be TRUE.
My questions:
1. What can I do to solve this?
2. Is there maybe a much easier way to achieve the desired result?
THANK YOU!!
I have created a complicated nested IF formula for cell 3 which I copy with autofill downwards in the column (I deal with cells 1 and 2 differently):
=IF(C3="","",((IF(CODE(C5)=(CODE(C4)+1),IF(CODE(C4)=CODE(C3)+1,TRUE,(IF(CODE(C2)=CODE(C1)+1,FALSE))),(IF(CODE(C3)=(CODE(C2)+1),IF(CODE(C4)=(CODE(C3)+1),TRUE,IF(CODE(C2)=CODE(C1)+1,TRUE,FALSE)))))))
The formula works (!), except in cases where two series meet or are separated by one unrelated character. In series 1 "x" (cell 4) is marked TRUE (while this should be FALSE) and in series 2 "c" (cell 3) is marked FALSE while this should be TRUE.
My questions:
1. What can I do to solve this?
2. Is there maybe a much easier way to achieve the desired result?
THANK YOU!!