apologies for the very basic question but I've created a home-made expenses tracker on Google Sheet just for fun and to improve my skills but I'm struggling to make this formula work.
In tab 1 I have a calendar that looks like this:
In tab 2 I have all my transactions:
My idea was to use sumifs in tab 1 so that for the earnings I can sum all transactions that were done in December 2022 and define that all amounts need to be greater than 0, similarly, for the expenses, all transactions would be less than 0.
I did try this formula which obviously doesn't work as I don't know how to specify whether transactions need to be greater or less than 0:
=SUMIFS(transactions!$D:$D,transactions!$A:$A,$B3,transactions!$D:$D,transactions!D3>0)
I'd really appreciate your help, thank you!
CodePudding user response:
try:
=SUM(FILTER(transactions!D:D, transactions!A:A=B3, transactions!D:D>0))
or:
=BYROW(B3:B11, LAMBDA(x, SUM(
FILTER(transactions!D:D, transactions!A:A=x, transactions!D:D>0))))