在EXCEL中,如何从地址中提取县或市信息?例子如下:
B1单元格书写公式
= if(len(a 1)-len(substitute(a 1," city "," "))> 1,MID(A1,FIND ("city ",A1)+1,FIND ("city ",A1)+65438。IF(COUNT(FIND ("county ",A1),FIND ("district ",A1),FIND ("district ",A1)+1)),mid (a1,FIND("。FIND("县",A1),FIND("区",A1),FIND("区",A1)+1)-FIND("市",a 1)。FIND ("City ",A1)+1,If (Count ("County ",A1)),FIND ("County ",A1),FIND ("District ",A1)。MID(A1,FIND("省",A1)+1,FIND("市",A1)-FIND("省",A1))
下拉复制公式
公式很长,但是考虑了包括自治区和市辖区在内的省份名称。