=IF(AND(B5<>"",B7<>"",B9<>"",B11<>""),SUMIFS(InvoiceDatabase!G:G,InvoiceDatabase!C:C,B5,InvoiceDatabase!E:E,B7,InvoiceDatabase!B:B,B9,Table2[Category],InvoicingForm!B11),IF(AND(B5<>"",B7<>"",B9<>""),SUMIFS(InvoiceDatabase!G:G,InvoiceDatabase!C:C,B5,InvoiceDatabase!E:E,B7,InvoiceDatabase!B:B,B9),IF(AND(B5<>"",B7<>""),SUMIFS(InvoiceDatabase!G:G,InvoiceDatabase!C:C,B5,InvoiceDatabase!E:E,B7),IF(AND(B5<>"",B9<>""),SUMIFS(InvoiceDatabase!G:G,InvoiceDatabase!C:C,B5,InvoiceDatabase!B:B,B9),IF(B5<>"",SUMIFS(InvoiceDatabase!G:G,InvoiceDatabase!C:C,B5),0)))))
With this formula, I don't think it captures the anomalies as I mentioned earlier. For example, if I only had Company Name and Category selected, it wouldn't add it up since the formula doesn't capture it. Please let me know if there is a formula that captures the anomalies as well. If there is no better way to do this, please tell me that I'm crazy.
Bookmarks