简体   繁体   English

根据另一个单元格值返回行中的最后一个值

[英]Return last value in a row, based on another cell value

I have a sheet with the following basic format: 我的工作表具有以下基本格式:

User:     Steve          Latest  9

Name       Period 1        Period 2        Period 3         Period 4

Colin         3               9               7                
Jo            1               6               0       
Steve         4               2               9       
Kate          2               8               1       

So basically, I want to populate the value of 'Latest' with the last value in the row, based on the value of 'User'. 因此,基本上,我想基于“用户”的值,用行中的最后一个值填充“最新”的值。

So if I changed the value of 'User' to a different person, it would return the last value in that particular row. 因此,如果我将“用户”的值更改为其他人,它将返回该特定行中的最后一个值。 (eg User: Colin Latest: 7) (例如,用户:Colin最新:7)

I can retrieve the value of a single column using =INDEX(B5:B8,MATCH(B1,A5:A8,0)) however I'm struggling when it comes to the array. 我可以使用=INDEX(B5:B8,MATCH(B1,A5:A8,0))检索单个列的值,但是在处理数组时我很费力。

I've tried going doing the path of embedding a LOOKUP within INDEX / MATCH, and also array formulas to return the nth value, but none of them seem to work. 我尝试过在INDEX / MATCH中嵌入LOOKUP的路径,以及数组公式以返回第n个值的方法,但是它们似乎都不起作用。 Also having zero luck using something like =MAX(ROW(A3:A7)*(--(B1=A3:A7))) 也使用=MAX(ROW(A3:A7)*(--(B1=A3:A7)))东西来获得零运气

I think I've worked myself down a blind alley, so a nudge in the right direction would be much appreciated. 我想我已经在一条小巷子里工作了,所以朝着正确的方向轻推将不胜感激。

This will return the last number in the row that matches the input: 这将返回与输入匹配的行中的最后一个数字:

=INDEX($5:$8,MATCH($B$1,$A$5:$A$8,0),MATCH(1E+99,INDEX($5:$8,MATCH($B$1,$A$5:$A$8,0),0)))

在此处输入图片说明

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

相关问题 根据另一张纸上的另一个单元格值返回一行中的最后一个值 - Return last value in a row, based on another cell value on another sheet 根据另一个单元格值返回一个单元格值 - Return a cell value based on another cell value 基于行值中最后一个单元格的自动编号 - Autolnumber based on last cell in a row value 在工作表的最后一行中用另一个替换单元格值 - Replacing a cell value with another in the last row of a sheet 根据单元格中的值将行复制到另一张工作表 - Copy row to another sheet based on value in a cell 公式中的行根据另一个单元格中的值更改 - Row in formula change based on value in another cell 在行中查找最后一个条目,然后在该列的顶部行中返回单元格的值 - Find Last Entry in Row, then Return Value of Cell in Top Row of That Column 公式,以获取列中的最后一个值,然后获取同一行中另一个单元格的值 - Formula to get last value in columns then value of another cell in the same row 使用条件和另一个单元格的返回值找到范围的最后一个值 - Find The Last Value of Range With Criteria and Return Value of Another Cell 如果另一个单元格在同一行中匹配,则返回一个单元格的值 - return value of a Cell if another cell is matched in the same row
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM