[英]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:你能告诉我如何写一个公式:
Karl Jane Adam Pete Dona
300 0 200 100 0
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)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.