confusion123
Active Member
- Joined
- Jul 27, 2014
- Messages
- 400
I use this to find the last row on a particular worksheet:
but what if I don't want to find the last row on a worksheet but only the last row in a specific column in that worksheet?
For example the last entry in column A is in row 100 but the last entry in column D is 10, so I want my function to return 10?
I tried changing:
but it didn't help.
Thanks
Code:
lrow = wks.Cells.Find(What:="*", _
After:=Cells(Rows.Count, Columns.Count), _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
but what if I don't want to find the last row on a worksheet but only the last row in a specific column in that worksheet?
For example the last entry in column A is in row 100 but the last entry in column D is 10, so I want my function to return 10?
I tried changing:
Code:
lrow = wks.Cells.Find(What:="*", _
After:=Cells(Rows.Count, 10), _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
but it didn't help.
Thanks