Tìm địa chỉ ô cuối cùng có chứa dữ liệu
Function tìm địa chỉ ô cuối cùng có chứa dữ liệu trong một sheet nào đó :
Function LastCell(StWs As String) As String
Dim LastRowCell as long, LastColCell as long
On Error Resume Next
With Sheets(StWs)
LastRowCell = .Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
LastColCell = .Cells.Find(What:="*", _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByColumns).Column
LastCell = StWs & "!" & .Cells(LastRowCell, LastColCell).Address
End With
End Function
www.giaiphapexcel.com/diendan/threads/t%E1%BB%95ng-h%E1%BB%A3p-v%E1%BB%81-ph%C6%B0%C6%A1ng-th%E1%BB%A9c-t%C3%ACm-ki%E1%BA%BFm-find-find-method.15116/
Khóa học Power PI – Ứng dung trong Nhân sự
TỔNG QUAN KHÓA HỌC: POWER BI CHO NGÀNH NHÂN SỰ Khóa học Power BI cho Nhân sự được thiết kế dành riêng cho các...
Xem khóa học
Bình luận