Search code examples
excelexcel-formulaexcel-2010excel-2007

Equalizing the summation of the amounts of two column which contains different set of amounts


I have two column (A,B), both contains 10 rows (A1-A10, B1-B10).

On A I have the amount 7000 and on A2 its 5000. On B1 I have 1500, on B2 I have 500, on A3 its 700, on A4 its 1100 and on A5 its 900.

On A10 I have the formula: =SUM(A1:A9) On B10 I have the formula: =SUM(B1:B9) Both the balance should be equal, to do that I want to put a formula on B9 which will be the amount that is needed to equal the balance.

What I have tried so far is: =A10-SUM(B1:B8) That works fine. But I want to know that is there any other way to do it?


Solution

  • So this is an account. A is debit and B is credit. Last row is balance.

    You could have the balance variable on which side it occurs and so never lower than 0 according to historic accounting rules:

    enter image description here

    Formula in A10:

    =IF(SUM(B2:B9)>SUM(A2:A9),SUM(B2:B9)-SUM(A2:A9),0)
    

    and in B10:

    =IF(SUM(A2:A9)>SUM(B2:B9),SUM(A2:A9)-SUM(B2:B9),0)
    

    If sum debit is greater than sum credit, then balance is on credit side and vice versa.