1
votes

I have a google spreadsheet in which I enter daily income and expenses:

Daily Income and Expenses

On another sheet, I am trying to calculate the monthly income and expenses for every month:

Monthly income and expenses

I am using this formula to calculate the monthly income ('s1' is the daily sheet):

=ARRAYFORMULA(SUM(FILTER(s1!B2:B; MONTH(s1!A2:A)=MONTH(INDIRECT("A" & ROW())))))

but it does work for the whole column.

Is there any way to make the arrayformula work with the indirect and row functions?

1

1 Answers

1
votes

I think this would work as a SUMIF instead - try:

=ArrayFormula(IF(A2:A="",,SUMIF(MONTH(s1!A2:A),MONTH(A2:A),s1!B2:B)))