SUBTOTAL() has been improved upon for Excel 2010+ with the introduction of the AGGREGATE() function.

http://www.excelfunctions.net/Excel-...-Function.html