Super Suarez
Registered User.
- Local time
- Today, 15:33
- Joined
- Jul 10, 2013
- Messages
- 36
Hi All,
I have the following code which returns me the number of rows in an excel sheet:-
Lastrows = .Worksheets(1).Cells.Find(What:="*", SearchDirection:=2, SearchOrder:=1).Row
How do I mod the code to find the last 'used' row in the sheet?
The sheet is automatically generated daily, so I can't change anything in that area. It's always 2000 rows long and usually only has around 1100-1200 rows of data.
It's just that I do a for loop later on in my code for 1 to Lastrows and would like it as exact as I can.
Hope you can help.
I have the following code which returns me the number of rows in an excel sheet:-
Lastrows = .Worksheets(1).Cells.Find(What:="*", SearchDirection:=2, SearchOrder:=1).Row
How do I mod the code to find the last 'used' row in the sheet?
The sheet is automatically generated daily, so I can't change anything in that area. It's always 2000 rows long and usually only has around 1100-1200 rows of data.
It's just that I do a for loop later on in my code for 1 to Lastrows and would like it as exact as I can.
Hope you can help.