0
  lastrow = Sheets("User Interface").Cells(Rows.Count, "AB19").End(xlUp).row

I'm trying to find the last used row of a column starting at a specific cell, AB19. But there is an error. I'm still new to VBA so help is appreciated.

hyerii
  • 23
  • 4
  • I didn't quite find the answer i'm looking for. what i'm trying to do is to find the last row of the column but starting at a specific cell like column AB at row 19,cell AB19 and count to the last used row. – hyerii Mar 28 '22 at 04:26

1 Answers1

1

The second factor of Cells is column, so you just put column reference there, i.e. "AB" instead of "AB19":

  lastrow = Sheets("User Interface").Cells(Rows.Count, "AB").End(xlUp).row

I did try and this worked.

navafolk
  • 103
  • 5