是否可以通过此方法获取所选最后一行的值/数据/内容?我怎么得到它。谢谢。
Dim WhatChapter As String
WhatChapter = InfoForm.Chapter
If WhatChapter <> "" Then
With ActiveSheet
lastRow = Cells(.Rows.Count, "A").End(xlUp).Row
End With
End If
答案 0 :(得分:0)
您的问题有很多可行的方法。
我通常做的是,找到工作表中的最低范围并结束xlUp
之类的,
Dim rLastNonBlankCell as Range
Dim LastRow as Long
Set rLastNonBlankCell = Sheet[x].Range("A1048576").End(xlUp)
LastRow = rLastNonBlankCell.Row
答案 1 :(得分:0)
我找到了解决此问题的简便方法。
如果要从lastRow获取VALUE,可以使用以下方法:
Dim rows As String
Dim value As String
Dim concat As String
rows = Range("A1048576").End(xlUp).Row
Dim a As String
'Column
a = "A"
concat = a & rows
'Value in last low is below
value = Range(concat).value
MsgBox (value)
我希望此解决方案对其他人有帮助