0

In Apple numbers I tried to sum cells if the date is in a specific month. So I have a column A with a date and column B has a price.

Date Price
29-07-2021 12,50
16-06-2021 15,00

I use the function sum.if and the function month that returns the number of the month. My formule look like this som.if(month(Date));7;Price);

But this generates an error numbers can only check one date and not for each row for counting.

Is there anybody who can help me with this?

Thanks a lot!

BigBen
  • 46,229
  • 7
  • 24
  • 40
Bert
  • 67
  • 5

1 Answers1

0

Use SUMPRODUCT() instead. I am using US-EN version of excel. So, decimal separator and formula definition may differ.

=SUMPRODUCT((B2:B3)*(MONTH(A2:A3)=7))

If you want to use SUNIFS() then can try-

=SUMIFS(B2:B3,A2:A3,">="&DATE(2021,7,1),A2:A3,"<="&DATE(2021,7,31))

If you have Excel-365 then can use FILTER() function like-

=SUM(FILTER(B2:B3,MONTH(A2:A3)=7))

enter image description here

Harun24hr
  • 30,391
  • 4
  • 21
  • 36