I want to quickly be able to find the right most column and last row of a non contiguous range of data without using UsedRange
. I have not found a quicker way than this method out there. Any ideas?
Function Range_Find_Method(ws As Worksheet)
Dim lRow As Long
Dim lCol As Long
With ws
lRow = .Cells.Find(What:="*", _
After:=.Range("A1"), _
LookAt:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
lCol = .Cells.Find(What:="*", _
After:=.Range("A1"), _
LookAt:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Column
End With
Debug.Print lRow
Debug.Print lCol
end function
Thank you