Find Last Cell Address

Assuming range starts from cell A1 downwards.

=ADDRESS(COUNTA(A:A),1)

(This does not work with blanks)

For Text

=ADDRESS(MATCH(REPT("z",255),A:A),COLUMN(A:A))

For Numbers

=ADDRESS(MATCH(9.99999999999999E+307,A:A),COLUMN(A:A))

(You can probably use a smaller number than 9.99999999999999E+307, but make sure it is bigger than any number you might use in your file)

For Text or Numbers

This is a way that I thought up (but I may not be the first)

In B1 enter =IF(A1="","",ROW()) and drag down

Then in C1 enter =ADDRESS(MAX(B:B),COLUMN(A:A)) or =ADDRESS(MAX(B:B),1)

or

For a range such as A1:A100, use this formula (it will work with entire rows but not entire columns, change ROW to COLUMN for working with rows)

{=ADDRESS(MAX(NOT(ISBLANK(A1:A100))*ROW(A1:A100)),1)}

Must be entered as an array. (Push Ctrl, Shift and Enter simultaneously)



© Copyright andrewsexceltips.net All Rights Reserved.