Hi,
I have a requirement in whch I need to traverse through all the rows and depending on condtion, I would like to settle amount.
For example, see the input file-
Sector Amount
C71 -10
C72 -20
C73 70
C74 90
So
If Sector =C71 and Amount < 0 Then Amount becomes zero BUT I have to settle this amount in Sector C73, meaning C73 becomes (70-10) = 60
Similarly
If Sector =C72 and Amount < 0 Then Amount becomes zero BUT I have to settle this amount in Sector C74, meaning C74 becomes (90-20) = 70
So the output file should look this this -
Sector Amount
C71 0
C72 0
C73 60
C74 70
The idea is to settle the negatives of C71 in C73 and C72 in C74 so that the total amount remains same(130).
Please find attached input file.
Thanks
Areeba