获取一行中的最后一个非空单元格 [英] Getting the last non-empty cell in a row

查看:29
本文介绍了获取一行中的最后一个非空单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在想办法解析"和排序"我的 Excel 电子表格时遇到了很多困难.我基本上需要做的是从每一行中获取最后一个非空单元格并将其剪切/粘贴到一个新列中.

I am having a lot of difficulty trying to come up with a way to 'parse' and 'order' my excel spreadsheet. What I essentially need to do is get the last non empty cell from every row and cut / paste it a new column.

我想知道是否有一种简单的方法可以做到这一点?

I was wondering if there is an easy way to do this?

我感谢任何建议.非常感谢!

I appreciate any advice. Many thanks in advance!

推荐答案

你的值是数字还是文本(或者两者都有)?

Are your values numeric or text (or possibly both)?

对于数字,使用 Z2 中的此公式获取最后一个值

For numbers get last value with this formula in Z2

=LOOKUP(9.99E+307,A2:Y2)

或文本....

=LOOKUP("zzz",A2:Y2)

或者对于...

=LOOKUP(2,1/(A2:Y2<>""),A2:Y2)

无论数据中是否有空格,所有公式都有效......

all the formulas work whether you have blanks in the data or not......

这篇关于获取一行中的最后一个非空单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆