最后没有空单元格行Excel VBA [英] Last not empty cell in row; Excel VBA
本文介绍了最后没有空单元格行Excel VBA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个excel表格,我需要在特定列中找到最后一个非空单元格。
I have an excel sheet in which I need to find the last non empty cell in a specific column.
我该怎么做这个?
下面将为我选择这个,但它会选择第一个不是空的单元格,我需要最后一个不是空的单元格该行。
The below will select this for me, but it will select the first not empty cell, I need the last not empty cell in the row.
工作表(DTC)。范围(A29)。结束(xlToRight)。选择
推荐答案
我认为可能会从另一个方向进行搜索,所以就像:
I think it might work just search from the other direction, so something like:
Worksheets("DTCs").Range("IV29").End(xlToLeft).Select
尽管可能需要根据Excel的版本将其更改为其他内容(这似乎在2003年起)。
Though maybe the IV would need to be changed to something else depending on the version of Excel (this seems to work in 2003).
这篇关于最后没有空单元格行Excel VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文