Hi All,
Could I please request your help with building a workflow to process the dataset below?
What I want to achieve is: offset the positive values (from right to left) using the first negative value found from the right. The goal is to turn the positive values into zero by deducting the negative amount, and leave any remaining negative balance in its original column.
For example, in the case below, the value -750 will first offset 2805.95, making it 0, and the resulting cell will contain 2805.95 - 750.
If -750 was a larger value, it would offset 2805.95 first, then move on to 4906.7, continuing until the negative amount is fully used or no more positive values are available.
4906.7 | 2805.95 | 0 | 0 | -750 | 0 | 0 |
Thanks in advance
Input sample -
A | B | C | D | E | F | G |
0 | 0 | 0 | -444 | 0 | 0 | 64.43 |
0 | 0 | 0 | 0 | 0 | 1182.98 | -54 |
0 | 0 | 679.76 | 0 | 0 | 0 | -1577.81 |
0 | 5647 | 0 | 0 | 0 | 0 | -614.83 |
0 | 0 | 1240 | 0 | 0 | 0 | -3120 |
0 | 0 | 367 | 0 | 0 | -6500 | 0 |
0 | 0 | 0 | 0 | 0 | -2484 | 1930.7 |
236.4 | 0 | 0 | 0 | 0 | 155 | -11640.75 |
0 | 0 | 0 | 55 | 0 | -55.1 | 0 |
0 | 0 | 0 | 0 | 0 | -1543.1 | 225 |
0 | 0 | 0 | 0 | 0 | 78 | -225 |
0 | 0 | 0 | 0 | 0 | 631.14 | -577.67 |
0 | 0 | 1884 | 0 | 0 | 0 | -4466 |
0 | 0 | 0 | 0 | -166.04 | 177.39 | 0 |
18 | -6 | 0 | 0 | 0 | 0 | 0 |
4906.7 | 2805.95 | 0 | 0 | -750 | 0 | 0 |
Is this an assignment question or something?
For 2 different users to post the same question with a different dataset within 2 days of each other. Both with no workflow showing an attempt...
RecordID, Transpose, and Multi-row are your friend here. Once transposed, you can sort it whatever way you want and then RunningTotal it with a formula afterwards to work out whether you've exceeded your capacity.
User | Count |
---|---|
109 | |
89 | |
77 | |
54 | |
40 |