Hi There, I tried all sort of methods to get solution for adjusting the negative amounts with the highest amount within the program. But couldn't be lucky to get to the solution. Could you someone help me out on this. Attached is the screenshot of Input data and output data for reference. Appreciate for your help.
e.g.: -63 amount to be adjusted with 120 within A program.
| Program | Event | Amount | | >>> | | Program | Event | Amount | Status |
| A | A1 | 120 | | | | A | A1 | 57 | |
| A | A2 | 35 | | | | A | A2 | 35 | |
| A | A3 | -63 | | | | A | A3 | -63 | Adjusted |
| B | B1 | 78 | | | | B | B1 | 78 | |
| B | B3 | -96 | | | | B | B2 | -96 | Not Adjusted |