简体   繁体   English

Excel公式匹配A列中的值,并且不返回空白列B

[英]Excel formula match value in column A and return not blank cell column B

Need some help with creating a formula. 在创建公式时需要一些帮助。

In column AI have text like "EAJ, ECJ, EDJ...", in column B there is text which I need to return, in this case "C1". AI列中有类似“ EAJ,ECJ,EDJ ...”的文本,B列中有我需要返回的文本,在这种情况下为“ C1”。 However when I using vlookup of index/match getting blank cell by obvious reasons. 但是,当我使用索引/匹配的vlookup时,由于明显的原因,导致空白单元格。

Is there any way to build a formula which will match text in column A and will return first not empty cell above in column B? 有什么方法可以建立公式来匹配A列中的文本,并首先返回B列上方的第一个非空单元格? For example if match text is in A322 then return value will be B318, because cells in range B322 up to B319 are blank. 例如,如果匹配文本在A322中,则返回值将为B318,因为范围B322至B319的单元格为空。

Index/Match 索引/匹配

You need to locate the last text in column B down to the row you locate ECJ in. 您需要在B列中找到最后一个文本,直到找到ECJ所在的行。

=INDEX(B:B, MATCH("zzz", B$1:INDEX(B:B, MATCH("ECJ", A:A, 0))))

Substitute "ECJ" for a cell on the worksheet cotaining ECJ or any other value to be matched in column A. 用工作表上包含ECJ或要在A列中匹配的任何其他值的单元格替换"ECJ"

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM