Last populated cell in a column

R

RedFive

I am trying to write a formula that will recognize the last populated cell in
a given column, and then display what is in that cell. Is there a function
that will recognize the last populated cell in a given column?
 
M

Mike H

Hi,

=INDIRECT("A"&SUMPRODUCT(MAX((ROW(A1:A1000))*(A1:A1000<>""))))

or if you know its a number
=LOOKUP(10^23,A:A)

or if you know its text
=MATCH(REPT("z",255),A:A)

Mike
 
R

Rick Rothstein

=INDIRECT("A"&SUMPRODUCT(MAX((ROW(A1:A1000))*(A1:A1000<>""))))

A little bit shorter...

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

Mike H

Rick,

I've posted that a dozen time for something like

=LOOKUP(2,1/(A1:A65535="This"),B1:B65535)

But never considered it for finding the last value in the same column Nice
one. But it can be made even shorter

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


Mike
 
R

Rick Rothstein

I'm glad you posted that back to me. As it turns out, I have both versions
of that formula in my "library" for some reason. I know in the past I used
the version you posted; but for some reason I grabbed the other one this
time. I have now updated my "library" so that only the one version of the
formula now exists in it. Thanks.
 
M

Mike Graham

=LOOKUP(2,1/(O1:O65535<>""),O:O)

Hi Rick,

I've been looking for something like this for a while, this is doing exactally what I need, thanks.

However, so far I can only get it working on a column in the same worksheet, what do I need to add to this to get it looking at a column on a different worksheet.

Regards,

Mike
 

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