I am looking to group a list of numbers based on their sums to a target value. The database is large and would need to be a scalable solution. For instance, if my target value was 10, this would look like the following:
What are the formulas I can do this in the Total and Group columns?
Item | Value | Total | Group |
---|---|---|---|
A | 4 | I | |
B | 3 | I | |
C | 4 | 11 | I |
D | 3 | II | |
E | 2 | II | |
F | 7 | 12 | II |
G | 10 | 10 | III |
H | 12 | 12 | IV |
What are the formulas I can do this in the Total and Group columns?