我在A列和B列中有值,其中行A中的值肯定是行B的一部分。 现在我想检查A列中的值是B列的开头还是B列的结尾。有什么办法吗?
数据示例:
Column A Column B Beijing Beijing, China (A is the beginning of B) Baslow United Kingdom England Bakewell Baslow (A is the end of B)
提前多多感谢!
答案 0 :(得分:1)
当然,这是可能的:
=IF(ISERROR(SEARCH(A2,B2)),"Not part",IF(SEARCH(A2,B2)=1,"Beginning",IF(SEARCH(A2,B2)=LEN(B2)-LEN(A2)+1,"End","in the middle")))