如何基于2个条件中的特定数据在Excel中使用索引匹配

时间:2019-01-10 14:19:35

标签: excel

我有一个Excel文件,其中1张纸有2张纸,我的数据如下;

ITM_CD      ITM_NM          CUST_PN       PROD_DT           DAILY_PROD
110100001   Base Deniro     1632208-03      -                   0
110100002   Base Hopkins    1608912-04      -                   0
110100003   Base Cassette   1653428-02      -                   0
110100004   Base ENB8.5     1632216-03      -                   0
110100005   Base OPT ENB    1610802-03      -                   0
110100006   Base Paper      1611072-03      -                   0
110100007   Base Stacker    1609489-01      -                   0
110100008   Button          1439864-00      -                   0
110100009   Cam APG Front   1572483-03  1/9/2019               110
110100009   Cam FN45        1572483-03  1/10/2019              632

在Sheet2中,我手动创建了日期列,我想基于2个条件(ITM_CD和PROD_DT)制作如下数据:

ITM_CD        ITM_NM         CUST_PN      SIMULATION    1-Jan   2-Jan   3-Jan   4-Jan   5-Jan   6-Jan   7-Jan   8-Jan   9-Jan   10-Jan
110100001    Base Deniro     1632208-03   Production       -      -      -        -       -       -       -       -       -        -
110100002    Base Hopkins    1608912-04   Production       -      -      -        -       -       -       -       -       -        - 
110100003    Base Cassette   1653428-02   Production       -      -      -        -       -       -       -       -       -        - 
110100004    Base ENB8.5     1632216-03   Production       -      -      -        -       -       -       -       -       -        - 
110100005    Base OPT ENB    1610802-03   Production       -      -      -        -       -       -       -       -       -        - 
110100006    Base Paper      1611072-03   Production       -      -      -        -       -       -       -       -       -        - 
110100007    Base Stacker    1609489-01   Production       -      -      -        -       -       -       -       -       -        - 
110100008    Button          1439864-00   Production       -      -      -        -       -       -       -       -       -        - 
110100009    Cam APG Front   1572483-03   Production       -      -      -        -       -       -       -       -       10      632
110100010    Cam Slider      1538129-01   Production       -      -      -        -       -       -       -       -       -        -
110100011    Cassete Assy    1648105-00   Production       -      -      -        -       -       -       -       -       -        -

这是我的公式

=IFERROR(INDEX(Production!$E:$E,MATCH(MASTER!$N$1:$O$1,Production!$D:$D,0)),"-")

请问这里有人可以帮助我纠正此问题。预先谢谢你。

0 个答案:

没有答案