Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to sum up the rows with the follwing conditions.
should display totals when CODE=7 and Total should be sum of the amounts of FROM to TO ACCOUNTNO.
It should sum if REVSIGN=0 and subtract if REVSIGN=1.
Example from below table for 107 is
sum (108,109,115)-sum(101,102,103) i.e. (2070+2080+2140)-(2000+2010+2020)=260.
this 260 should be displayed against the AMOUNT of 107 ACCOUNTNO.
Excel is attached for your reference.
ACCOUNT NO | FROM | TO | ID | AMOUNT | CODE | REVSIGN |
101 | 1001 | 2000 | 1 | |||
102 | 1002 | 2010 | 2 | |||
103 | 1003 | 2020 | 3 | |||
104 | 1004 | 2030 | 4 | |||
105 | 1005 | 2040 | 5 | |||
106 | 1006 | 2050 | 6 | |||
107 | 101 | 103 | 1007 | 7 | 1 | |
107 | 108 | 109 | 1007 | 7 | 0 | |
107 | 115 | 115 | 1007 | 7 | 0 | |
108 | 1008 | 2070 | 1 | |||
109 | 1009 | 2080 | 2 | |||
110 | 1010 | 2090 | 3 | |||
111 | 1011 | 2100 | 4 | |||
112 | 1012 | 2110 | 5 | |||
113 | 1013 | 2120 | 6 | |||
114 | 104 | 106 | 1014 | 7 | 1 | |
114 | 110 | 113 | 1014 | 7 | 0 | |
115 | 1015 | 2140 | 1 |
Thanks in advance
Veman Reddy
Hi Veman,
Her is a solution to your problem. The solution also allows you to have sum-accounts that includes other sum-accounts.
Br,
Thomas