amokoura Posted April 30, 2007 Share Posted April 30, 2007 (edited) Problem solved.What's the best solution to find the last empty row of an excel sheet.I'm trying to add data to the bottom of a sheet but haven't yet found a realiable solution. I've tried "Range(##).End"-trick but it seems unreliable sometimes.Could some SQL-thingies come in picture?? Edited April 30, 2007 by amokoura Link to comment Share on other sites More sharing options...
phkninja Posted April 30, 2007 Share Posted April 30, 2007 (edited) This will work in VBA Worksheets(<Sheetname>).Cells.Find(What:="*", SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row This gves the row number. so to use have Dim RowNum as Integer RowNum = Worksheets(<Sheetname>).Cells.Find(What:="*", SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row Edited April 30, 2007 by phkninja Link to comment Share on other sites More sharing options...
amokoura Posted April 30, 2007 Author Share Posted April 30, 2007 (edited) Thanks for the Find method! For some reason I didn't get the expected result but I found another solution. The method will come handy in other problems, thx!Problem solved. Edited April 30, 2007 by amokoura Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now