Sumif within a subtotal?

I have a set of data similar to the table below. I want to be able to filter by name(s) (I'm currently using the filter tab), calculate the total invoices assigned to that name(s) (I have used a subtotal formula), and then sum only the paid invoices assigned to that name(s) (this is the formula I can't work out). I want to do this without having to apply a further filter to the Paid(Yes/No) column as I want to still display unpaid invoices. My current workaround is a 4th hidden column containing an IF formula but this isn't very elegant. Any solutions? Thanks

Name Invoice Paid (Yes/No)
Tom 1 Yes
Dick  2 Yes
Harry 3 Yes
Tom 4 No
Dick 5 No
Harry 6 No
Total  =SUBTOTAL(9,InvoiceRange) what formula?

June 10th, 2015 5:03am

Hi Jmiall,

Not quite sure if this is what you are looking for, but using a Insert Pivot with below settings gives the desired results I suppose.

Row:Name

Column:Paid

Values: Invoice

Sum of Invoice Column Labels    
Row Labels No Yes Grand Total
Dick 5 2 7
Harry 6 3 9
Tom 4 1 5
Grand Total 15 6 21

Only catch being your data is not dynamically updated, you need to generate the pivot everytime. If the output format servers your purpose we can think up of something else which would replicate your requirement.

How to create a dynamic pivot table and refresh automatically in exc

June 10th, 2015 8:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics