Forum Discussion
MaryK170
Jul 19, 2022Copper Contributor
Moving value form one sheet to another, and choosing a cell based on negative or positive value.
I have a sheet 'Calculations' where a sum of values is being calculated. Sometimes that sum is positive sometimes it's negative. On another sheet 'Recap', I have a debit and credit columns. I want ...
OliverScheurich
Jul 19, 2022Gold Contributor
=IF(AND(SUMIF(Calculations!$B$2:$B$11,Recap!$B2,Calculations!$C$2:$C$11)>0,C$1="debit"),SUMIF(Calculations!$B$2:$B$11,Recap!$B2,Calculations!$C$2:$C$11),IF(AND(SUMIF(Calculations!$B$2:$B$11,Recap!$B2,Calculations!$C$2:$C$11)<0,C$1="credit"),SUMIF(Calculations!$B$2:$B$11,Recap!$B2,Calculations!$C$2:$C$11),""))You can try this formula for the data layout of the example. I copied the formula across range C2:D6.