简体   繁体   English

Excel 公式检查行中最后一个非零值并从相应列中获取单元格值

[英]Excel formula to check the last non zero value in row and bring cell value from corresponding column

can you please advise how to write a formula to:你能告诉我如何写一个公式:

  • identify the last non zero value in row识别行中的最后一个非零值
  • bring the value from another row at corresponding column将另一行的值带到相应的列
  • example below下面的例子

Karl   Jane   Adam   Pete     Dona    
300       0     200     100      0

  • the result should be Pete结果应该是皮特
  • I tried Lookup to and can find the last non zero value is 100 but how to bring the value from another row?我尝试查找并可以找到最后一个非零值是 100 但如何从另一行获取值? Thank you Tom谢谢你汤姆

Using just the LOOKUP formula, you merely set your result_vector argument to the row from which you want to get the result.仅使用LOOKUP公式,您只需将result_vector参数设置为要从中获取结果的行。

Try:尝试:

=LOOKUP(2,1/(A2:E2>0),$A$1:$E$1)

(If your formula is not in the same row, you can use whole-row references) (如果你的公式不在同一行,你可以使用整行引用)

=LOOKUP(2,1/(2:2>0),$1:$1)

To stick with LOOKUP , you could use it in INDEX :要坚持使用LOOKUP ,您可以在INDEX中使用它:

=INDEX(1:1,LOOKUP(2,1/(2:2>0),COLUMN(2:2)))

If one has the Dynamic Array Formula XLOOKUP:如果有动态数组公式 XLOOKUP:

=XLOOKUP(1,1/(A2:E2>0),A1:E1,"",-1,-1)

在此处输入图像描述

暂无
暂无

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

相关问题 Excel中行中最后一个非零值的列名 - Column name of last non zero value in row in Excel Excel公式:列中唯一单元格的数量,IF对应的行是一定值 - Excel formula: count of unique cells in column, IF corresponding row is certain value EXCEL公式:将SUMIFS结果乘以来自不同列的相应行值 - EXCEL Formula: Multiply SUMIFS outcome with the corresponding row value from a different column 如何在excel中创建一个公式来搜索行中的值,然后从该列中的另一个单元格中获取值? - How do I create a formula in excel that searches for a value in row, and then takes the value from another cell in that column? 确定列中的最后一个非值(可能有公式)行 - Determine last non-value (may have a formula) row in column Excel公式在某一行开始的列中查找最后一个非空白单元格 - Excel formula to find last non blank cell in a column starting on a certain row Excel 公式从行返回最后一个 xth 数值 - Excel formula to return last xth numeric value from row Excel 公式查找行中具有值的最后一个单元格,如果没有空白则添加到相邻单元格 - Excel formula to Find the last cell with value in a row and add to adjacent cell if there aren't blank 如果值以公式开头,则 Excel 从列中复制单元格 - Excel copy cell from a column if value is starting with Formula 使用excel公式查找非空单元格的最后一行 - Find last row of non empty cell using excel formula
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM