[英]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) 这涉及到: excel函数获取另一个单元格的值 (但略有不同)
I want to get the date (on Row D), that corresponds 我想获取日期(在D行上),该日期对应
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.
谢谢。
Try this in $E$7. 试试$ E $ 7。 It's an array formula, so you have to hit ctrl+shift+enter.
这是一个数组公式,因此您必须按ctrl + shift + enter。
=INDEX($A$2:$AF$2,1,MAX(IF(ISBLANK(L7:AF7),0,COLUMN(L7:AF7)))) = 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. 如果可行,您可以将其复制并粘贴到$ E $ 11和$ E $ 15。
Formula in cell A1 =OFFSET(B1, 0, COUNTA(B1:F1) - 1)
单元格A1中的公式
=OFFSET(B1, 0, COUNTA(B1:F1) - 1)
Formula in cell A2 =OFFSET(B2, 0, COUNTA(B2:F2) - 1)
单元格A2中的公式
=OFFSET(B2, 0, COUNTA(B2:F2) - 1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.