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.
 
Top