简体   繁体   English

另一个工作表的交叉引用文本,并且在相邻单元格中显示匹配项

[英]Cross Reference Text from another sheet and display match in adjacent cell

I am using Excel 2010 and have a table of actions on Sheet 1 as follows: 我正在使用Excel 2010,并且在工作表1上有一个操作表,如下所示:

**Actions**
Normal - No Action
Satifactory - No Action Required
Contact - Repeat In
Contact - Arrange Telecon With
Appointment Already Made
Ask Reception To
Already Dealt With
Letter Required

I then have an imported list of these actions assigned to people on Sheet 2 as shown below in column A, but some of the actions may include additional free text added to the end of each action (which I have highlighted only in this example between the asterisks): 然后,我在工作表2上导入了分配给人员的这些动作的列表,如下A列所示,但是其中一些动作可能包括添加到每个动作末尾的其他自由文本(我仅在本示例中以星号):

**ACTION LIST**
Contact - Arrange Telecon With *ABCD*
Contact - Arrange Telecon With *efgh*
Appointment Already Made *17/07/2016*
Appointment Already Made *15/08/16*
Contact - Repeat In *2w*
Contact - Repeat In *3m*
Contact - Repeat In *1y*
Contact - Repeat In *6m*
Ask Reception To *Blah Blah*
Ask Reception To *Blah Blah Blah*
Satisfactory - No Action Required

I need to count up how many actions there are in the list above EXCLUDING the additional free text that has been added to some of the actions, so that the outcome would look like this in the adjacent cell ie column B: 我需要计算上面列表中有多少个动作(不包括已添加到某些动作中的其他自由文本),以便结果在相邻单元格(即B列)中看起来像这样:

**Action Outcome for Counting**
Contact - Arrange Telecon With
Contact - Arrange Telecon With
Appointment Already Made
Appointment Already Made
Contact - Repeat In
Contact - Repeat In
Contact - Repeat In
Contact - Repeat In
Ask Reception To
Ask Reception To
Satifactory - No Action Required

Is there an Excel formula I can use to create the last table of text? 我可以使用Excel公式来创建最后一个文本表吗? Can a formula match the text of the actions in the 1st table to that of the 2nd table. 公式是否可以使第一个表中的动作文本与第二个表中的动作文本匹配。 Note: The Action text in the 2nd table will always begin with the text from the 1st table, the additional freetext is always added to the end of an Action. 注意:第二个表中的操作文本将始终以第一个表中的文本开头,其他自由文本始终添加到操作的末尾。

I need to count how many actions (in the 1st table) have been used in the 2nd table? 我需要计算第二个表中使用了多少个操作(在第一个表中)?

Use an Array form of INDEX/MATCH with Search to compare the substrings: 使用带有搜索的INDEX / MATCH数组形式来比较子字符串:

=INDEX($E$1:$E$8,MATCH(TRUE,ISNUMBER(SEARCH( $E$1:$E$8,A1)),0))

My list of Actions is in column E. 我的动作列表在E列中。

Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when leaving edit mode. 作为数组公式,退出编辑模式时必须使用Ctrl-Shift-Enter而不是Enter进行确认。 If done correctly then Excel will put {} around the formula. 如果操作正确,则Excel会将{}放在公式周围。

在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM