Why doesn't my small-formula return a value

I have the following array formula in one column of my spreadsheet:

{=SMALL(IF('PFMEA 2020-2021'!$N$16:$N$1048576="H";ROW('PFMEA 2020-2021'!$N$16:$N$1048576);"-");1)}

where the final argument of the small-formula increases by one for each row.

As you can see from the screenshot below, at least some of the values in the array generated by the inner if-statement are numbers:

enter image description here

So how come the A10 returns a #N/A-error instead of the smallest value? Likewise with why A11 doesn't return the second smallest value, etc.


There turned out to be a couple of lines in the other sheet which returned errors. When I removed these, the formula worked again. It turns out SMALL only accepts some non-numeric values in the input array, error values not being one of those.