[英]Excel vlookup matching on last column and return row
In excel I have a table on sheet 1: 在excel中,我在工作表1上有一张表:
Within sheet 2 I want to do something like a vlookup which looks for 'not done'in the status column and if found then the whole row is shown in sheet 2. Also an added complication is that I would prefer not to have gaps ie for any rows showing 'done' as below: 在工作表2中,我想做一个类似vlookup的事情,它在状态列中查找“未完成”,如果找到了,则整行显示在工作表2中。另外一个复杂的问题是,我不希望没有空隙,例如任何显示“完成”的行,如下所示:
As I state above I have been trying with VLOOKUP and CHOOSE but I cant get anything to work. 正如我上面所述,我一直在尝试使用VLOOKUP和CHOOSE,但是我什么都无法工作。 Can anyone suggest some ideas? 谁能提出一些想法?
You can use a CSE formula (entered with CTRL+SHIFT+ENTER ). 您可以使用CSE公式(通过CTRL + SHIFT + ENTER输入 )。
If your data is in A1:C7
(including header row), you can put this in E2
and drag right and down: 如果您的数据在A1:C7
(包括标题行),则可以将其放在E2
并向右和向下拖动:
=INDEX(A$2:A$7,SMALL(IF($C$2:$C$7="not done",ROW(A$2:A$7)-ROW(A$2)+1),ROWS(A$2:A2)))
Wrap that in IFERROR([formula above],"")
to hide #NUM
errors when it runs out of results. 当结果用完时,将其包装在IFERROR([formula above],"")
以隐藏#NUM
错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.