I’m trying to figure out how to use multiple manual criteria in a DSUM function in Google Sheets. I know how to use a single criterion like this:
=DSUM(A1:C50, "Amount", {"Type";"Expense"})
But when I try to add another criterion like this:
=DSUM(A1:C50, "Amount", {"Type";"Expense";"Status";"Paid"})
It only uses the first criterion and ignores the rest. How can I make it use both criteria without creating a separate table for them? Is there a way to do this directly in the function? I’d really appreciate any help or examples on how to make this work. Thanks!
I’ve been using DSUM with multiple criteria for years, and I can assure you it’s quite straightforward once you get the hang of it. The key is in the array structure. Instead of separating criteria with semicolons, you need to use commas within each criterion pair and semicolons between different criteria.
Here’s how I’d write it:
=DSUM(A1:C50, “Amount”, {“Type”,“Expense”;“Status”,“Paid”})
This setup tells the function to sum ‘Amount’ where ‘Type’ is ‘Expense’ AND ‘Status’ is ‘Paid’. You can add as many criteria as you need by following this pattern.
One thing to watch out for: make sure your column headers in the database range exactly match the criteria names you’re using. I’ve wasted hours debugging only to realize I had a typo in a column name. Trust me, it’s an easy mistake to make!
I’ve encountered this issue before, and there’s a simple solution. For multiple criteria in DSUM, you need to structure your criteria array differently. Instead of separating each criterion with semicolons, use commas within each row and semicolons between rows. Here’s the correct format:
=DSUM(A1:C50, “Amount”, {“Type”,“Expense”;“Status”,“Paid”})
This tells DSUM to look for rows where Type is Expense AND Status is Paid. You can add more criteria by including additional rows in the array. For example:
=DSUM(A1:C50, “Amount”, {“Type”,“Expense”;“Status”,“Paid”;“Category”,“Office”})
Hope this helps solve your problem!
hey, i’ve dealt with this before. the trick is to use commas between criteria and semicolons between rows. try this:
=DSUM(A1:C50, “Amount”, {“Type”,“Expense”;“Status”,“Paid”})
it’ll sum ‘Amount’ where Type is Expense AND Status is Paid. You can add more criteria following this pattern. hope this helps!