Search code examples
arraysif-statementgoogle-sheetssplitnested-if

couting values of a string in a cell and return 'paired' or not 'paired'


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

enter image description here


Solution

  • 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")))
    

    enter image description here