开发者

Get value from a row that corresponds (in the same column) to a cell in another row

This is related to: excel function to get value of another cell (but slightly different)

I want to get the date (on Row D), that corresponds

to the last non-blank value in another row.

See below for what I am trying to describe.

  | D2  | D3  | D4  | D5   <- Dates
-------------------------
A | X2  | X3* | X4* | X5   <- A should get D4, X4 is the last non-blank value
B | Y2* | Y3* | Y4*开发者_运维知识库 | Y5*  <- B should get D5, Y5 is the last non-blank value

Asterisk (*) denotes a non-blank cell/value.

Can somebody please help me with the formula? Thanks.

Get value from a row that corresponds (in the same column) to a cell in another row


Try this in $E$7. It's an array formula, so you have to hit ctrl+shift+enter.

=INDEX($A$2:$AF$2,1,MAX(IF(ISBLANK(L7:AF7),0,COLUMN(L7:AF7))))

If that works, you can copy and paste it to $E$11 and $E$15.


Formula in cell A1 =OFFSET(B1, 0, COUNTA(B1:F1) - 1)
Formula in cell A2 =OFFSET(B2, 0, COUNTA(B2:F2) - 1)

Get value from a row that corresponds (in the same column) to a cell in another row

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜