Find first empty cell in column

T

TomHull

Hi,

I need a formula that finds the first empty cell at the bottom of a column
of data. I have tried using the find and select function in a macro and it
fails to find cells often. Have also tried using a MATCH formula but it
doesnt seem to like finding an empty cell.

Any Help,

Thanks

Tom
 
B

Bernard Liengme

last nonblank
Non-array, non-volatile formula for contents of last, non-blank cell in a
range:

=LOOKUP(2,1/(A1:A100<>""),A1:A100)

For last non-blank text

=LOOKUP(REPT("z",255),Sheet1!e1:e100,Sheet1!e1:e100)

You can shorten that to:

=LOOKUP(REPT("z",255),Sheet1!e1:e100)

Last non-zero
=LOOKUP(2,1/(B7:H7<>0),B7:H7)
 
J

Jacob Skaria

Since you have tried a macro..try the below..If the first cell is not blank
try the below....

Dim varFound As Variant
Set varFound = Columns(1).Find("", LookIn:=xlValues, lookat:=xlWhole)
MsgBox varFound.Address

If this post helps click Yes
 

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