Consulting

Results 1 to 4 of 4

Thread: Select last empty row with header

  1. #1

    Select last empty row with header

    I'm using the code below to move to the last empty row. However if the last empty row is below the header (Header is at row 6), it selects the header. How can I select the last empty row without adding +1 to the code or using an if statement?

    Cells(Range("A" & Rows.Count).End(xlUp).Row, 1).Activate

  2. #2
    How about
    Range("A"&Rows.Count).End(xlUp).Offset(1).activate

  3. #3
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    How can I select the last empty row without adding +1 to the code
    You can't.

    Technically, Fluff is "adding 1." Just doesn't look like it.
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  4. #4
    @SamT
    That's very true, but if where getting technical I think it should be
    Range("A"&Rows.Count).activate
    For the "Last" empty row.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •