Find the row index of the first cell to satisfy a condition?

What formula should be used so that for a given range and a condition, it returns the row index of the first row for which the condition is true?

In the example below, for the range A1:A5, if the condition is “<0” it will return 1. For “>1” return 3 and for “>2” return 5.

For your example will work formulas

=INDEX(ROW(A1:A5);MATCH( 0 ;FLOOR(A1:A5);0))
=INDEX(ROW(A1:A5);MATCH( 1 ;FLOOR(A1:A5);0))
=INDEX(ROW(A1:A5);MATCH( 2 ;FLOOR(A1:A5);0))

thank you!