PDA

View Full Version : Select last empty row with header



av8tordude
06-02-2020, 07:47 PM
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

Fluff
06-03-2020, 04:52 AM
How about
Range("A"&Rows.Count).End(xlUp).Offset(1).activate

SamT
06-04-2020, 06:42 PM
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.

Fluff
06-05-2020, 03:51 AM
@SamT
That's very true, but if where getting technical I think it should be

Range("A"&Rows.Count).activateFor the "Last" empty row. :)