简体   繁体   English

从范围中返回所查找的任何值的值

[英]Returning value from range for any of the values that are looked up



I have the following data set: 我有以下数据集:

在此处输入图片说明

and use the index/match function to check if the value in column A has a corresponding value in column b compared to values that are in another sheet called Data: 并使用index / match函数来检查A列中的值与b列中的值(与另一张名为Data的表中的值相比)是否具有对应的值:

=IFERROR(INDEX(B:B,MATCH('Data A1'!,A:A,0)),"")

The goal of this exercise is to identify there is value in column B for any value in column A and here is where my formula fails, because for value 2 the formula returns an empty cell, because it is only checking for the first value in the list and not all values. 本练习的目的是确定B列中是否有A列中的任何值 ,这就是我的公式失败的地方,因为对于值2而言,该公式返回一个空单元格,因为它只检查了第一个值。列出而不是所有值。

Any ideas on how I can fix the formula to reflect ABC when the value 2 is in the list? 关于值2在列表中时如何修正公式以反映ABC的任何想法? I am hoping for an outcome like this: 我希望这样的结果:


在此处输入图片说明

Thanks for your help! 谢谢你的帮助!

It may be better to use a blank column to do this. 最好使用空白列来执行此操作。 In a blank column put the following formula in the first row: 在空白列中,将以下公式放在第一行:

=IF(B1="",SUMPRODUCT(($B$1:INDEX($B:$B,MATCH(1E+99,$A:$A))="")*($A$1:INDEX($A:$A,MATCH(1E+99,$A:$A))=A1)),B1)

Then Copy down the range. 然后复制范围。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从查找的行/范围中获取最大值列 - Get max value column from looked up row/range 如何从Excel中的查找范围进行计数 - How to count from an looked up range in excel 使用VLOOKUP,但是一旦它在单元格/查找中,就将其与查找分离 - Use VLOOKUP but detach the value from the lookup once it is in the cell/looked up 如何使用查找值将记录插入SQL? - How to insert records to SQL with looked up values? 如何使用 VBA 从重复项中水平返回查找值 [图片] - How to horizontally return looked up values from duplicates w VBA [pic] 有没有办法用一个输入单元格和一个 output 单元格对从数组中查找的多个值求和? - Is there a way to sum multiple values looked up from an array, with a single input cell and a single output cell? 检查单个单元格中是否存在一系列值中的任何值 - Check if any value from a range of values is present in a single cell 列出/将不同的查找值放在一个单元格中 - List/Put together in one cell different looked up values Excel 中的条件格式,在另一个表中查找了 HEX/RGB 值 - Conditional formatting in Excel with HEX/ RGB value looked up in another table Excel-从第一个非空白值开始的范围内返回值 - Excel - returning the values from a range starting with the first non-blank value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM