I have a formula below
=SUBTOTAL(9,$H$18:$H$190)+SUMPRODUCT(SUBTOTAL(9,OFFSET($G$18,ROW($G$18:$G$190)-ROW($G$18),0)),($H$18:$H$190="")+0,($J$18:$J$190<>"Red")+0)+SUBTOTAL(9,$D$193:$D$300)
What this does is sum colomn H (when filtered), adds the sum of colomn G as long as there is no number in Col H next to it and the colomn J hasnt got the word "Red" in it. It then also adds the sum of Colomn D to the result.
This took me ages to figure out and it looks far more complex than it should be, but it does do the trick....am i missing something really obvious that can shorten this code?
Bookmarks