Open workbook to same worksheet and next empty row

  • Thread starter inta251 via OfficeKB.com
  • Start date
I

inta251 via OfficeKB.com

To open workbook to same worksheet I using macro

Private Sub Workbook_Open()
Sheets (“tripsâ€).Select
End Sub

Is that possible add to this macro,
open to the next empty row or next empty cell in Column A?

Thanks in advance.
Sincerely, Igor. (inta251)
 
G

Gord Dibben

Amended code below assuming no blanks in column A

Private Sub Workbook_Open()
Sheets (“trips”).Select
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
End Sub

Assuming first blank cell down.

Private Sub Workbook_Open()
Sheets("trips").Select
Range("A1").End(xlDown).Offset(1, 0).Select
End Sub
Is that possible add to this macro,
open to the next empty row or next empty cell in Column A?

Thanks in advance.
Sincerely, Igor. (inta251)


Gord Dibben MS Excel MVP
 
G

Guest

Yes but we really have to know the data layout. Suppose that before the next
empty row there is data in all the cells of column A, then the code would be
[A1].End(XLDown).Offset(1,0).Select
 
I

inta251 via OfficeKB.com

Thanks for respond.
Both formulas working for me perfectooo.
THANKS again.
Good weekend.
Sincrely, Igor (inta251)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top