In a formula, how can I refer to the last row of a column?
In Sheet1, I have a formula:
=IF(ISNA(VLOOKUP(A2, Sheet2!A$2:A????, 1, FALSE)), "NO", "YES")
In Sheet2, I have numbers in column A. However, I don't want to hard code the row number of the last row in the above formula because the number of rows keeps changing.
Is there something I can substitute for "????" ? I'm not looking for a VBA/macro way of doing it.
I'll be applying this formula to several thousand rows in Sheet1. So, it would also be nice to know if I can save the last row's number into say Sheet2!B1 and then use B1 in place of "????".