Slight amendment for Ron's solution:

Formula: copy to clipboard
=LARGE(INDEX(($M$30:$M$500={"Equity","Fixed"})*$N$30:$N$500,0),ROW(A1))



Regards, TMS