[英]How to LOOKUP second from last cell not equal to 0, and return header value
The excel formula: Excel公式:
LOOKUP(2,1/(G698:AW698<>0),G3:AW3) 查找(2,1 /(G698:AW698 <> 0),G3:AW3)
works perfectly in finding the last cell in a row that is not 0 and returning it's header value. 在查找行中不为0的最后一个单元格并返回其标头值时,效果非常好。
How do I apply the same theory to find the 2nd from last, and then 3rd from last value for non-zero cells? 对于非零单元格,我如何应用相同的理论从倒数第二个值开始,然后从倒数第三个值找到第三个值?
You would need to switch to INDEX/AGGREGATE 您需要切换到INDEX / AGGREGATE
=INDEX($3:$3,AGGREGATE(14,6,COLUMN(G698:AW698)/((G698:AW698<>0)*(G698:AW698<>"")),2))
The 2
at the end is what returns the second to last. 最后的
2
是倒数第二个。
Change the 2
at the end to 3
to get the third and so on. 将结尾处的
2
更改为3
以得到第三个,依此类推。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.