Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
953 views
in Technique[技术] by (71.8m points)

indexing - Excel INDEX MATCH to find exact location name from string text

I have in my Excel workbook two tables:

  1. In first table I have string text full sentence (in colunmn C) in many rows where is described in sentence some place names (some rows don't have those location names) and
  2. in second table I have place names list (every place name have also geographical X (latitude) and Y (longitud) coordinates.

I want to search inside first table string text location names which have exact match to the placename_table list and show founded place name in first tabele column D. I tried this formula in column D, it almost working, but it finds first match of placename_tabele and it is not correct what was mean in first table string.

I use Excel 2013

=IFERROR(INDEX(Placename_table; SMALL(IF(COUNTIF($C2;"*"&Placename_table&"*"); MATCH(ROW(ANIMI); ROW(Placename_table)); ""); COLUMNS($A$1:A1))); "-")

placename_tabels

enter image description here

question from:https://stackoverflow.com/questions/65841406/excel-index-match-to-find-exact-location-name-from-string-text

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You may try FILTERXML() with index. Put below formula in D2 cell then drag down and right.

=IFERROR(INDEX(FILTERXML("<t><s>"&SUBSTITUTE($C2," ","</s><s>")&"</s></t>","//s[starts-with(., 'placement')]"),COLUMN(A$1)),"")

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...