What I usually do here is make a dummy column that's set to 1 if you want to count that row and 0 if you don't. Then just SUMPRODUCT the price with that dummy column.
For example, let's say column A is invoice number, B is item ordered, and C is price. You also have cell D1 with the invoice number you're filtering for. You'd add column E, and in E1 you'd type =IF(A1=$D$1, 1, 0), and copy that all the way down column E. Then the sum of that particular invoice is =SUMPRODUCT($A$1:$A$9999, $E$1:$E$9999). You're multiplying all prices on different invoices by zero(ignoring them) and on the desired invoice by 1(keeping them), and adding up the total.
|