Hi vadimtrofi,
I'm not quite sure what are you storing in your table so it's hard to adjust your formula directly. Taking some similar formula as an example:
=(A1:A12)*(B2:B12)
Let's assume that the result of this formula (F9) is exactly the same:
{0:0:0:0:0:1:1:0:0:0:1:0}
If you want to retrieve the row number of the last "1", you need to use the following Array formula (Ctrl+Shift+Enter):
=LARGE(IF((A1:A12)*(B1:B12),ROW(A1:A12),""),1)
The result of this formula is 11. Hope you will find it helpful.