VLOOKUP Text that is not unique - Excel

二次信任 提交于 2019-12-24 06:37:56

问题


I am trying to vlookup (bring back) all the products that are yes, but only the first result keeps coming back because the vlookup gets stuck on the first piece of data.

I am using much more data than the range below but please see below as example.

A1 = Yes B1 = Product 1
A2 = Yes B2 = Product 2
A3 = Yes C3 = Product 3

=vlookup("Yes",$A$1:$C$3,2,false)

It works if I take out the $ signs but then I just get repeat values.

I am guessing this needs a different function but am unsure what to use.

Thanks

Ian


回答1:


Check this link and understand how that formula works. In your example, put this formula into cell D2 and press CTRL+SHIFT+ENTER and fill down using mouse:

=IFERROR(INDEX($B$1:$B$12, MATCH(0,IF("yes"=$A$1:$A$12,COUNTIF($D$1:D1, $B$1:$B$12),""), 0)),"")


来源:https://stackoverflow.com/questions/40487435/vlookup-text-that-is-not-unique-excel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!