first empty value

K

Karol_tom

Hi,
I use this code:

n = Range("B1").End(xlDown).Row + 1
Cells(n, 2).Select


to select first empty cell in column B...but I discover that it's not
perfect
if there are some break (one empty cell between cells with values) it will
choose it - there's some another function ?
 
G

Gord Dibben

To exclude interior blanks, go to bottom of sheet and work up.

Sub findbottom()
ActiveSheet.Cells(Rows.Count, 2).End(xlUp) _
.Offset(1, 0).Select
End Sub


Gord Dibben MS Excel MVP
 

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