hello i need some help to count characters within a string, if there is any repeated number, return "paired" or something. if anyone can help I would appreciate it, follow the example
CodePudding user response:
try:
=INDEX(IF(3=QUERY(SPLIT(UNIQUE(FLATTEN(ROW(A1:A2)&"×"&SPLIT(A1:A2; "♦♣♠"))); "×");
"select count(Col1) group by Col1 label count(Col1)''"); "not paired"; "paired"))
update:
=INDEX(IF(3=QUERY(SPLIT(UNIQUE(FLATTEN(FILTER(ROW(A5:A), A5:A<>"")&"×"&
SPLIT(FILTER(A5:A, A5:A<>""), "♦♣♠"))), "×"),
"select count(Col1) group by Col1 label count(Col1)''"),
"not paired", "paired"))
CodePudding user response:
see:
=ARRAYFORMULA(IF(F5:F="",,
IF((MID(F5:F, 4, 1)=MID(F5:F, 1, 1))
(MID(F5:F, 4, 1)=MID(F5:F, 7, 1)),
"1 - paired", "2 - not paired")))