2016-09-22 99 views
0

在excel中,我們在郵件主題行中設置關鍵字並創建錯誤類型的子類別。在Excel中使用函數創建子類別的關鍵字文本匹配

現在關鍵字列表日益增多。所以我試圖創建一個公式來處理數組結構。

**Sub_Category**         **Mathcing_Keywords** 
Switch/ Port utilization      threshold of high utilization 90 exceeded 
Loan Related/HMDA Reports/Other Reports  loan restore 
VDI Issues          VDI 
Alerts For Zenoss        Process not running 


**Subject_Line**           **Created_Sub_Category_using function** 
Subject: Please install SQL Client VDI Assigned to me VDI Issues 
Subject: RE: Facing issue with VDI machine    VDI Issues 

公式當前我們正在使用的公式創建子類別。

=IFERROR(IF(SEARCH($B$2,D2),$A$2,1),IFERROR(IF(SEARCH($B$3,D2),$A$3,1),IFERROR(IF(SEARCH($B$4,D2),$A$4,1),IFERROR(IF(SEARCH($B$5,D2),$A$5,1),"NA")))) 

對函數的任何提示或幫助將用於創建數組以完成工作。

回答

1

假設關鍵字是在稱爲Keywords不同片如下:

enter image description here

使用以下公式,從受試者得到相應的關鍵字:

=INDEX(Keywords!$A$2:$A$5,MAX(IF(ISERROR(FIND(Keywords!$B$2:$B$5,A2)),-1,1)*ROW(Keywords!$B$2:$B$5)-1)) 

這是一個數組公式,以便按Ctrl + Shift + 進入

結果如下:

enter image description here

注:FIND是大小寫敏感的,所以如果你想匹配不區分大小寫,使用SEARCH函數。

+1

謝謝Mrig哇!我曾使用過相同的功能,但它不完整。 謝謝..它像一個冠軍.. – sandeep

相關問題