简体   繁体   中英

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". However when I using vlookup of index/match getting blank cell by obvious reasons.

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? For example if match text is in A322 then return value will be B318, because cells in range B322 up to B319 are blank.

Index/Match

You need to locate the last text in column B down to the row you locate ECJ in.

=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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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