Search code examples
google-sheetssumifs

Google sheets SUMIF by Name and Date


I need some help regarding Google sheets and SUMIF instruction.

I have a table where I collect some inputs from a form. I contains a date, name and value. Now I want to summarize by the name and date. Means person x spends € in month April. Or person y spends € in this month. My approach was this:

=SUMIFs(Formularantworten!B2:B; Formularantworten!E2:E; "x"; Month(Formularantworten!C2:C); Month(now()))

But as it seems, sheets can't handle dates within SUMIF. Plan is to have a table, where the sum for each person and month is noted and a filed where you can see the current month.

Do anybody has a idea to solve this?

Thanks in advance. Kai


Solution

  • You need to use an array formula to use the month function on all values in the range C2:C:

    =SUMIFs(Formularantworten!B2:B; Formularantworten!E2:E; "Sabi"; Arrayformula(Month(Formularantworten!C2:C)); Month(now()))

    Reference: