Now we are getting much closer!
If everything in the base data is as i should be, it works fine 
Two cases where it doesn't want to cooperate;
I still get the Run-time error "1004": Cannot use that command on overlapping, when executing and when I look at the spreadsheet (the big one),
it could possible be because a student ID that is replacing an older student-ID is then in it's turn being replaced by another even newer student-ID.
It seems like this i creating some kind of evil loop... This system is pretty stupid but it is managed on another level, where I can't influence it..
The second case is if there are one student-id that replaces two older student-ids, then there are two new lines created with the new student-ID, one replacing the first older and one replacing the second older.
In this case it is not possible to add these together since that would mean that the original test values from the new student-id gets added twice which makes it wrong..
The reason for these extra student-ids is that not all students are enrolled in classes as a part of their program but rather enroll as an extra course and in these cases they are assigned a new student-id and sometimes this changes during the program. Stupid? yes quite so...
I have made some very small modification to your code and would like to change the two rows that I have commmented out to a formula that makes N(row)=O(row)/M(row)
Q=R(row)/S(row)
T=U/S
W=X/V
Z=AA/Y
AC=AD/AB
And Holger, where do I send you the coupon for a free case of beer?
Bookmarks