abenitez77
Board Regular
- Joined
- Dec 30, 2004
- Messages
- 149
I use this line below to get the last row with data and it works fine. In a search, the last row came back with 1,048,532. It did have some text in a cell, so it worked properly. How can I limit the search so that it does not come back with a row greater than 10,000 ?
lastrow = ActiveSheet.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
lastrow = ActiveSheet.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row