I'm trying to use an array function in excel, the formula is to return the value of filtered table. this is my formula.

{=INDEX(A:A,MIN(IF(SUBTOTAL(3,OFFSET(A2,ROW(A2:A31)-ROW(A2),0)),ROW(A2:A31))))}

The problem is the returned value is only the first result, i.e. if after filter the first cell is A9 when i drag down the formula it will only return A9 value in all cell. This is my first try at using array function so i don't know what to check, i think the formula itself is correct but because this is my first try maybe i miss something. I already press Ctrl+Shift+Enter for validating.

Actually my goal is to return value's of cells that meets certain criteria, i tried using different function but because it's too complicated then i tried using excel built in filter but because it only hide the cells that doesn't meet the criteria, it won't work with my other formula that use the filtered value. If you have different solutions than the one i used please suggest it, but i prefer ones that not too complicated or using vba. Thanks in advance.