Try this in A1:
{=IF(MAX(N(ISNA($E$1:$E$23)=TRUE)*ROW($E$1:$E$23))>0,MAX(N(ISNA($E$1:$E$23)=TRUE)*ROW($E$1:$E$23)),"")}
This is an array formula, so enter it using Control+Shift+Enter
Suppose that you need to use the MATCH function in some (array) formula like
=INDEX(C:C,MATCH(A1&B1,$A$1:$A$3&$B$1:$B$3,0))
Copied to range, this may lead to one or more #N/A.
Such an outcome can be controlled by rewriting the above formula as follows:
=IF(ISNA(MATCH(A1&B1,$A$1:$A$3&$B$1:$B$3,0)),"NoValue",INDEX(C:C,MATCH(A1&B1,$A$1:$A$3&$B$1:$B$3,0)))
You may use anything informative instead of NoValue that figures in the formula.
If you don't want to change #N/A producing formula in B:B, you might use
A1 =IF(NOT(OR(ISTEXT(B1),ISNUMBER(B1))),ROW(),"") [ copy down as far as needed ]
Hope this helps.
Aladin