匹配查找值顺序

时间:2018-01-20 03:21:48

标签: excel match

我尝试按以下顺序实现返回查找值{“TYPE 3”,“TYPE 4”,“TYPE 1”,“TYPE 6”,“TYPE 2”,“TYPE 5”,“OK”}

我在H3 = IF(MATCH(F $ 2,$ A $ 2,0),VLOOKUP($ F3,$ A $ 4:$ C $ 58,MATCH(F $ 1,$ B $ 2,0))中应用以下公式+ 2,FALSE))但查找仅返回第一个值。

请帮助我。

截图
enter image description here

DATA                    ELECTRICAL      
VT245   ELECTRICAL              VT245   DESIRED RESULT  FORMULA RETURN
SIZE    ITEM    TEXT            3936    TYPE 3  TYPE 1
3936    2856    TYPE 1          4016    TYPE 4  TYPE 1
3936    2857    TYPE 2          4011    TYPE 1  TYPE 1
3936    2858    TYPE 3          2311    TYPE 6  TYPE 1
3936    2859    TYPE 4          4000    TYPE 2  TYPE 1
3936    2860    TYPE 5          4028    TYPE 5  TYPE 1
3936    2861    TYPE 6          4031    OK  OK
3936    2862    OK                  

4016    2856    TYPE 1                  
4016    2857    TYPE 2                  
4016    2858    TYPE 3                  
4016    2859    TYPE 4                  
4016    2860    TYPE 5                  
4016    2861    TYPE 6                  
4016    2862    OK                  

4011    2856    TYPE 1                  
4011    2857    TYPE 2                  
4011    2858    TYPE 3                  
4011    2859    TYPE 4                  
4011    2860    TYPE 5                  
4011    2861    TYPE 6                  
4011    2862    OK                  

2311    2856    TYPE 1                  
2311    2857    TYPE 2                  
2311    2858    TYPE 3                  
2311    2859    TYPE 4                  
2311    2860    TYPE 5                  
2311    2861    TYPE 6                  
2311    2862    OK                  

4000    2856    TYPE 1                  
4000    2857    TYPE 2                  
4000    2858    TYPE 3                  
4000    2859    TYPE 4                  
4000    2860    TYPE 5                  
4000    2861    TYPE 6                  
4000    2862    OK                  

4028    2856    TYPE 1                  
4028    2857    TYPE 2                  
4028    2858    TYPE 3                  
4028    2859    TYPE 4                  
4028    2860    TYPE 5                  
4028    2861    TYPE 6                  
4028    2862    OK                  

4031    2856    OK                  
4031    2857    OK                  
4031    2858    OK                  
4031    2859    OK                  
4031    2860    OK                  
4031    2861    OK                  
4031    2862    OK                  

1 个答案:

答案 0 :(得分:0)

在G2中并向下复制以适应:

="TYPE "&IF(F3=4031,"OK",MATCH(F3,{4011,4000,3936,4016,4028,2311},0))