Well yes I'm afraid that's what the SUBTOTAL function does - it only looks at visible rows thus if you filter by date the hidden rows are ignored.
On aside your formula in I16 could be:
=SUMPRODUCT(--($H$2:$H$6=$H16),SUBTOTAL(3,OFFSET($H$2,ROW($H$2:$H$6)-MIN(ROW($H$2:$H$6)),,1)))
copy down to I18
It is also not an Array (per se) so does not need to be confirmed with CTRL + SHIFT + ENTER, ie confirm with Enter as per other normal formulae (ie { } not required)
Worth pointing out also perhaps that the above formula will be pretty bad performance wise as it is Volatile (see link in sig. for more info) - have you thought perhaps of using a Pivot Table ?
Bookmarks