=LEN(MID(MID(MID(C4;FIND("A";C4)+1;LEN(C4)-FIND("A";C4));FIND("A";MID(C4;FIND("A";C4)+1;LEN(C4)-FIND("A";C4)))+1;LEN(C4)-FIND("A";MID(C4;FIND("A";C4)+1;LEN(C4)-FIND("A";C4))));1;FIND("B";MID(MID(C4;FIND("A";C4)+1;LEN(C4)-FIND("A";C4));FIND("A";MID(C4;FIND("A";C4)+1;LEN(C4)-FIND("A";C4)))+1;LEN(C4)-FIND("A";MID(C4;FIND("A";C4)+1;LEN(C4)-FIND("A";C4)))))-1))