excel - How to do Multi Criteria Match Index Function
问题描述
I am trying to use Index/Match function to populate Column B of Sheet 1 based on the data in Sheet 2.
Sheet 1:
Below is how the sheet 2 looks like. Row 1 contains the line number. Column B and Column C belong to Line 1, and Column D and E belong to Line 2, etc.
I need to match the Project ID first. Then match the Activity Line # (Column C of sheet 1 with B1:G1 of sheet 2), then find the corresponding Activity #.
For example, on sheet one, it is asking for Activity # of Project 0000002/Activity Line 2, which should be "ES" based on the sheet 2.
So, ideally, the result should look like below
This is what I have for now, but it’s giving me a #REF! error…</p>
=IFNA(INDEX('Sheet2'!$B:$G, MATCH('Sheet1'!C2, INDEX('Sheet2'!$B$1:$G$1, MATCH('Sheet1'!A2, 'Sheet2'!$A:$A,0),0),0)),"")
解决方案
利用:
=IFERROR(INDEX('Sheet2'!$B:$G,MATCH(A2,'Sheet2'!$A:$A,0),MATCH(C2,'Sheet2'!$B$1:$G$1,0)),"")
推荐阅读
- mongodb - mongodb:使用字段名称的动态参数对嵌套数组进行排序
- r - 我需要在一张图上绘制两个图
- powerpoint - 如何使用 OpenXML 将幻灯片插入另一个 PowerPoint 幻灯片?
- typescript - 发布应用程序中缺少 ag-dnd-ghost 元素
- sed - 用于附加目录中特定文件扩展名的 Bash 脚本
- rust - 如何在 Rust 中定义 &mut [u8]
- node.js - 如何以角度向现有的pdf文档添加水印?
- html - 主图标未在浏览器中呈现
- jenkins - jenkins gnutls_handshake() 失败:握手失败
- postgresql - max_parallel_workers 与 max_parallel_workers_per_gather