Excel Subtotal if adjacent column is not blank
- by Head of Catering
I'm trying to create a subtotal for a range that excludes rows that don't have a wholesale price. I have a range of products, prices and units that have subtotals by brand, although the brand subtotal is a sum and not a subtotal because the total needs to be displayed regardless of what the user chooses to filter. These subtotal rows do not have wholesale prices.
Here is the sumif formula I'm using to calculate totals in the summary area above the range:
=SUMIF(B5:B12, "", D5:D12)
I need to have a subtotal formula that works the same way. Is there an equivalent to the sumif formula for subtotals? Or maybe a worksheet function I can use?
I need to be able to do this without using VBA.