简体   繁体   English

从与另一行中的单元格相对应的行中获取值(在同一列中)

[英]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.

相关问题 如何获取VBA代码以检查单元格值是否与列标题匹配并从同一行中的另一个单元格返回值? - How to get VBA code to check if cell value matches column heading and return value from another cell in the same row? 从该行的另一列获取单元格信息 - Get cell info from another column in the row 如果在另一列上找到一个单元格的值,如何从与同步单元格在同一行的另一列返回该单元格的值? - If a cell's value is found on another column, how to return the cell's value from another column which is on same row with the synced cell? 从同一行的其他单元格获取值 - Get value from other cell on same row 如果同一行中的另一个单元格的值大于0,则仅索引另一张工作表中一列的单元格 - Index only cells in a column from another sheet if another cell in same row has a value greater than 0 搜索Excel列,并从同一行但位于不同列中的另一个单元格中输出值 - Search Excel column and give out the value from another cell which is in the same row but in a different column 公式,以获取列中的最后一个值,然后获取同一行中另一个单元格的值 - Formula to get last value in columns then value of another cell in the same row 将显式列与另一工作表中的单元格值用于行 - Using an explicity Column with a cell value from another sheet for Row 根据行/列索引从另一个工作表中查找单元格值 - Finding the cell value from another sheet basing on row/column index 如果在同一行的另一个单元格中找到相同的值,则删除整行 - Delete entire row if the same value is found in another cell on the same row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM