Following construct is semi-volatile i.e. it will get re-calculated when the workbook is opened. Functions below are non-volatile.
=COUNTA(A3:INDEX(A2:A1000,MATCH(9E+307,A2:A1000)))
=COUNTA(A3:INDEX(A2:A1000,MATCH(9E+307,A2:A1000))) in this example is an arguable statement.
Reasons are :
1] The COUNTA function is used to count for non-empty cells, that is numeric + text value.
2] In this example, if Cell A7="A", the formula still return 3 (not 4)
3] INDEX(A2:A1000,MATCH(9E+307,A2:A1000)) --> this formula return the last numeric value only.
My proposal is :
=COUNTA(A3:INDEX(A2:A1000,MATCH(2,INDEX(1/(1-ISBLANK(A2:A1000)),))))
Regards
Bosco
Edit :
1] is used if the reference cells are number
=COUNT(A3:INDEX(A2:A1000,MATCH(9.99E+307,A2:A1000)))
2] is used if the reference cells are text
=COUNTA(A3:INDEX(A2:A1000,MATCH("zzzz",A2:A1000)))
3] is used if the reference cells are non-empty (numeric+text value)
=COUNTA(A3:INDEX(A2:A1000,MATCH(2,INDEX(1/(1-ISBLANK(A2:A1000)),))))