Hi Aladin
Thank you for the notes.
This will fail when there is either no text or no numeric data.
I had rather assumed, that if the OP had a totally empty column, then he
wouldn't be looking for the last used row, hence the #N/A return from a
totally blank column didn't really seem to be material.
BTW, the OP is asking for the row number, not the address
Yes, on re-reading the original post, the OP does ask for row and not cell
address. The formula should be amended to
=CELL("Row",INDEX(A:A,MAX(MATCH(99999999,A:A),MATCH("ZZZZ",A:A))))
However, did you consider endless variations the people may come up with,
causing a jungle of constants, hard to explain to new comers?
No, I didn't. But I did give the formula for a large numeric value or large
text value if the user chose to use those instead.
Neither did I go on to explain that in reality, I use defined names for
large numbers and large text values, which I use in my formulae rather than
having to count how many 9's I am entering every time I use this type of
Lookup, and enabling the call of the REPT() function to be made once, rather
than throughout every formula.
Insert>Name>Define
Name BigN Refers to =9.99999999999999E+307
Name BigT Refers to =REPT("Z",255)
(these were tips I picked up from Bob Phillips)
=CELL("Row",INDEX(A:A,MAX(MATCH(BigN,A:A),MATCH(BigT,A:A))))
I think it is sometimes of more value to the OP to get a rapid answer that
answers their immediate need, rather than wait longer for a comprehensive
answer that suits everyone.
But then again, perhaps I am wrong.<g>
Regards
Roger Govier