简体   繁体   中英

Google Spreadsheet ARRAYFORMULA() with INDIRECT() and ROW()

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

每日收支

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

每月收入和支出

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?

我认为这可以作为 SUMIF 使用 - 尝试:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM