edge37
Board Regular
- Joined
- Sep 1, 2016
- Messages
- 102
- Office Version
- 365
- Platform
- Windows
Hello, is it possible to distribute a value in a cell (in my case they are extra points) between other cells that already have a note (but not going above the maximum value assigned)? In my gradebook I have a cell with extra points, and I want to distribute them between the assignments that I already graded. As you can see in the example I sent, I have 5 and 3 extra points for each student, HW1 max value in John's grades is 7 points, but he got only 6, so the macro would add 1 point more so the value would reach 7. Then 4 extra points are remaining, so the same would be with other cells until those 5 extra points are distributed. If a cell has the maximun number of points then nothing would happen there, if the cell value is below the max then the extras could be distributed there. If there is no room for more points then the value of extras wouldn't change, if all extra points are distributed the Extra Point cell will show a 0.
I've never heard of this before, but, if possible, can you help me with a macro to do this for all students?
I've never heard of this before, but, if possible, can you help me with a macro to do this for all students?
example.xlsx | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | Name | HW 1 | HW 2 | HW 3 | HW 4 | HW 5 | HW 6 | HW 7 | XTRA | |||
2 | 7 points | 5 points | 5 points | 5 points | 6 points | 7 points | 8 points | |||||
3 | John | 6 | 3 | 4 | 3 | 6 | 0 | 8 | 5 | |||
4 | Mary | 7 | 5 | 2 | 1 | 6 | 7 | 8 | 3 | |||
Sheet1 |