简体   繁体   English

Excel中两列之间的部分匹配,一列的返回值

[英]Partial match between two columns in excel, return value of one column

I have a task at hand where I need to create 301 redirect URLS but this falls into the Excel category as I am using that. 我手头有一个需要创建301重定向URL的任务,但这属于我正在使用的Excel类别。

I have a list of text strings in column A, in column BI have a list of text strings, that I need to partially match against the array of values in column A. I would like to do this in column C. 我在A列中有一个文本字符串列表,在BI列中有一个文本字符串列表,我需要与A列中的值数组部分匹配。我想在C列中做到这一点。

So, lookup if content of B is a partial match to Column A and post if there is a match, post the content of column B, in column C 因此,如果B的内容与A列部分匹配,则查找,如果有匹配,则发布,将B列的内容发布到C列

EDIT (TRIED TO ADD DATA): 编辑(尝试添加数据):

A
1: abadia-retuerta-seleccion-especial/
2: albiano-verdicchio-d-cast-di-jesi/
3: alois-lageder-gewurztraminer/
4: anselmi-capitel-foscarino-veneto-bianco/

B
1: agusti-torello-roca
2: abadia-retuerta
3: anselmi
4: alois-lageder

C (EXPECTED VALUES)
1: abadia-retuerta
2: <empty cell>
3: alois-lageder
4: anselmi

Use this array formula: 使用此数组公式:

=IFERROR(INDEX($B$1:INDEX(B:B,MATCH("ZZZ",B:B)),MATCH(1,IF(SEARCH($B$1:INDEX(B:B,MATCH("ZZZ",B:B)),A1),1,0),0)),"")

Put it in C1. 将其放在C1中。 Being an array formula it needs to be confirmed with Ctrl-Shift-Enter when exiting edit mode. 作为数组公式,退出编辑模式时需要使用Ctrl-Shift-Enter进行确认。 If done correctly Excel will put {} around the formula. 如果正确完成,Excel会将{}放在公式周围。 Then copy down. 然后抄下来。

The formula is made to be dynamic, in that no matter how large column B gets it will work. 该公式是动态的,因为无论B列多大,它都将起作用。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 查找两列之间的部分匹配并返回第三列 - Find partial match between two columns and return a third column 将两列的值与其他两列匹配,并在Excel中返回值 - Match values of two columns with other two columns and return value in excel 匹配两列中的值,并使用Excel第三列中的vlookup返回值 - Match values in two columns and return value using vlookup from third column in Excel 2列之间部分匹配,并导致另一列 - Partial match between 2 columns and results in another column Excel - 查找两列之间的匹配值将相邻值返回到新列中 - Excel - Find the matching values between two columns return adjacent value into a new column 比较两列是否匹配或部分匹配,将值从第三列复制到第四列 - Compare two columns for match or partial match, copy value from third column into fourth column 如果Excel中有4列匹配,则返回值 - Return Value if 4 columns match in Excel excel索引匹配vlookup-基于两列中的条件的返回值 - excel index match vlookup - return value based on criteria in two columns Excel:匹配两列中的文本,并返回一个相对于其交点的值 - Excel: Match Text in Two Columns and Return a Value Relative to Their Intersection Excel 两列上的 V-LOOKUP 与一列上最接近的匹配 - Excel V-LOOKUP on two columns with closest match on one column
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM