Peo Sjoblom wrote:
One way
=SUMPRODUCT(--($D$5:$D$12),--($J$5:$J$12),(SUBTOTAL(3,OFFSET($J$5,ROW($J$5:$J$1 2)-MIN(ROW($J$5:$J$12)),,))))/SUBTOTAL(9,$J$5:$J$12)
A bit shorter, also expecting no text-formatted numbers:
=SUMPRODUCT($D$5:$D$12,SUBTOTAL(9,OFFSET($J$5,ROW( $J$5:$J$12)-MIN(ROW($J$5:$J$12)),,)))/SUBTOTAL(9,$J$5:$J$12)
On Excel 2003, I'd turn the data area into a list by running
Data|List|Create List. The setup allows AutoFiltering and the ranges in
the Subtotal formula are automatically updated when new records are
added or records are deleted.
|