excel多条件find,如果包含A,B则属于1区如果包含C,D则属于2区,如果包含E,F则属于3区

2024-12-28 07:41:34
推荐回答(3个)
回答1:

=IF(COUNTIF(B1,{"*A*","*B*"}),"1区",IF(COUNTIF(B1,{"*C*","*D*"}),"2区",IF(COUNTIF(B1,{"*E*","*F*"}),"3区",IF(COUNTIF(B1,{"*G*","*H*"}),"4区",""))))

回答2:

用lookup函数好点吧
=lookup(A1,{FIND("A",B1),FIND("b",B1),FIND("c",B1),...),{"1区","2区","3区"...})

回答3:

公式
=CEILING(MATCH(,0/FIND({"A","B","C","D","E","F","G","H"},B1),)/2,1)&"区"