Reputation: 203
i have values in column A and column B, where value in Row A is definitely part of Row B. now i want to check if values in column A is the beginning of Column B, or the end of column B. Is there any way?
example of data:
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)
Thanks a lot in advance!
Upvotes: 0
Views: 99
Reputation: 17475
Sure, that is possible:
=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")))
Upvotes: 1